Problem description: When creating paragraphs using existing styles, Writer creates automatic styles for each individual paragraph (also for headings) in "content.xml" (document saved as odt or fodt) . This creates unnecessary and confusing overhead in the xml-file like: <office:automatic-styles> <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Text_20_body"> <style:text-properties officeooo:paragraph-rsid="00063317"/> </style:style> <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Title"> <style:text-properties officeooo:paragraph-rsid="00063317"/> </style:style> <style:style style:name="T1" style:family="text"> <style:text-properties officeooo:rsid="00063317"/> </style:style> </office:automatic-styles> Whereas the actual content reads: <office:body> <office:text> <text:p text:style-name="P2"><text:span text:style-name="T1">This is my title</text:span></text:p> <text:p text:style-name="P1"><text:span text:style-name="T1">This is a text body paragraph.</text:span></text:p> </office:text> </office:body> When manually removing direct formatting (by selecting all text and clicking "Format - Clear direct formatting"), the same information is stored already a bit cleaner, but still with the unused and useless style "T1": <office:automatic-styles> <style:style style:name="T1" style:family="text"> <style:text-properties officeooo:rsid="00063317"/> </style:style> </office:automatic-styles> <office:body> <office:text> <text:p text:style-name="Title">This is my title</text:p> <text:p text:style-name="Text_20_body">This is a text body paragraph.</text:p> </office:text> </office:body> When manually reassigning the styles to each paragraph (by selecting each paragraph and double clicking on the respective style), the same information is stored straight and clean: <office:automatic-styles/> <office:body> <office:text> <text:p text:style-name="Title">This is my title</text:p> <text:p text:style-name="Text_20_body">This is a text body paragraph.</text:p> </office:text> </office:body> Steps to reproduce: 1. Open a new Writer document 2. Open the styles window (F11) 3. Select the style "Title" 4. Enter a title "This is my title" 5. Select the style "Text Body" 6. Enter a paragraph "This is a text body paragraph." 7. Save as odt or fodt: Three (unnecessary) automatic styles are saved now either: 8a. Remove all direct formatting by clicking "Format - Clear direct formatting" 9a. Save again: The content is clean, but <office:automatic-styles> keeps the useless element named "T1". or alternatively: 8b. Click in the title and then double click on the style "Title" 9b. Click in the text paragraph and then double click on the style "Text Body" 10b. Save again: This removes unnecessary automatic styles completely and saves the content nice and clean. Current behavior: See above steps 7. and 9a. Expected behavior: See above step 10b. This should be the default behaviour without doing steps 8b and 9b. Thanks for improvement! Holger Operating System: All Version: 4.0.3.3 release
Those are not "useless" styles, they do carry revision ids.
Hi Cédric, Do you confirm comment #1 ? Best regards. JBF
(In reply to comment #1) > Those are not "useless" styles, they do carry revision ids. All right, I now see the use of the rsids (to identify which content has been created in which session). However, two questions arise from that: 1. The attributes "officeooo:paragraph-rsid" and "officeooo:rsid" of <style:text-properties> are not in the "OASIS OpenDocument 1.2 standard", therefore they must be part of "1.2 extended". (BTW, where can I see what's behind this?) Wouldn't it then be more convenient to allow every content element (like <text:p> here) to have a rsid-attribute, rather then defining styles that contain this information? 2. Why do the rsids vanish, when the styles are reassigned to the paragraphs (see steps 8b and 9b of the initial post)? Regards, Holger
Hi, and forgive my rude english (non native speaker here). Running LibreOffice 4.3.2.2, build id edfb5295ba211bd31ad47d0bad0118690f76407d, on Windows Vista 64 bit edition, this version also presents the same behavior. Please explain to me why this isn't a bug, as explained on #2 on the last comment by @Holger? Also, shouldn't LibreOffice have an option to disable the creation of those RSIDs? I searched the Preferences, LibreOffice Writer, Comparing (or so it should be localized), there is no option to fully disable it. I think this should be treated as a bug, as this behavior is undesired, or at least as a feature request. I am reopening this bug, as it makes documents bigger and more complex to handle than needed, but as of a low and minor importance, as it has a partial workaround for removing the extra complexity at the cost of removing the direct format applied. Feel free to change it to "Enhancement", or even to raise the importance of the bug, but please do not close it.
I don't see that this was confirmed by QA team - moving to UNCONFIRMED as REOPENED is incorrect. Thanks
I confirm the problem. We could indeed have a new option that disables generation of RSIDs.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d334dd956a594c2fdda43706417ebf4d489f206a tdf#68183 sw: config option for disabling the creation of automatic RSID marks It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.