Summary: | IMPORT DOCX: Re-use page styles that have identical settings instead of spamming duplicates (Comment 4) | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Telesto <telesto> |
Component: | filters and storage | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | NEW --- | ||
Severity: | enhancement | CC: | bugzilla, jluth, luke.kendall |
Priority: | medium | Keywords: | filter:docx |
Version: | Inherited From OOo | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 108771 |
Description
Telesto
2020-05-26 17:04:26 UTC
repro Version: 6.4.4.2 (x64) Build-ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff CPU-Threads: 4; BS: Windows 10.0 Build 18363; UI-Render: GL; VCL: win; Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE Calc: CL @Justin Feel free to ignore, but seen the all to docx fixes recently and the styles being quite heavy promoted by Libreoffice..... Microsoft formats don't have names for page styles. And there is nothing like a one-to-one mapping of features, so I don't expect that we could add in our own meta-data to round-trip anything either. Not possible AFAIK. So the only way this could be implemented would be to: 1) add your own metadata to describe significant parts of the Writer page styles (perhaps including those settings changed from defaults), 2) make a "nearest page style" (or none) to one of the Writer page styles Those things sound tricky, I agree, and perhaps not worth the effort given you could at best achieve a partial success. Would it be possible instead for Writer to reuse existing page styles (including the name) it creates during the conversion process, when all the properties match? You could use a hash of the properties to make the equality comparison ("Is the current page style the same as an already generated one?") efficient. At present a book of e.g. 500 pages can convert across into 180 page styles (Convert1 to Convert180), all mostly the same as each other. I.e. they could be expressed in perhaps 4 or 6 distinct page styles. Tidying up such messy converted .docx-sourced books into a neat .odt file is tedious at present. repro 7.3+. This 18 page document (with massive graphics) has 15 converted page styles. I don't foresee any improvements since this is ridiculously complicated especially since page styles contain headers and footers. |