Summary: | Applying a Character style doesn't get saved properly. | ||
---|---|---|---|
Product: | [Unmaintained] kword | Reporter: | Marcus Harrison <marcus> |
Component: | opendocument | Assignee: | Thomas Zander <zander> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | release_blocker |
Priority: | NOR | ||
Version: | 2.2 | ||
Target Milestone: | Persona: Susan | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
"Test.odt", a file to demonstrate the loss of formatting. Has the, "code" character type in two separate places.
"Test.odt" formatted and saved in OpenOffice.org. |
Created attachment 49600 [details]
"Test.odt" formatted and saved in OpenOffice.org.
Opening this file in either KWord or OpenOffice.org Writer reveals that the application of the character type, "Code" has been preserved.
It looks like the loading of an auto-style (family "text") that has as a parent a non-auto-style forgets to set the proper style Id on the document. SVN commit 1193959 by zander: Fix loading of character styles to remember the name. In many cases a character style applied to a smaller piece of text will have an automatic-style introduced in between to store any extra properties. It is important to remember the parent on loading since otherwise the text just becomes an anonymous piece of formatted text and we loose the whole advantage of characters styles. This commit makes sure that we keep this relationship in tact. BUG:246067 M +27 -16 KoTextSharedLoadingData.cpp M +7 -1 KoTextSharedLoadingData.h M +6 -0 tests/CMakeLists.txt A tests/data/TextContents/TextFormatting/charStyle.odt WebSVN link: http://websvn.kde.org/?view=rev&revision=1193959 |
Created attachment 49599 [details] "Test.odt", a file to demonstrate the loss of formatting. Has the, "code" character type in two separate places. Version: 2.2 OS: Linux After I have created a new custom character set and applied it to text (belonging to a paragraph of a type separate from the character set: it has no parent paragraph type, after all), saving and closing the document results in all the text of that paragraph reverting back to the paragraph's character style. Reproducible: Always