Bug 246067 - Applying a Character style doesn't get saved properly.
Summary: Applying a Character style doesn't get saved properly.
Status: RESOLVED FIXED
Alias: None
Product: kword
Classification: Miscellaneous
Component: opendocument (show other bugs)
Version: 2.2
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: Persona: Susan
Assignee: Thomas Zander
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2010-07-28 19:31 UTC by Marcus Harrison
Modified: 2010-11-07 19:03 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
"Test.odt", a file to demonstrate the loss of formatting. Has the, "code" character type in two separate places. (4.21 KB, application/vnd.oasis.opendocument.text)
2010-07-28 19:31 UTC, Marcus Harrison
Details
"Test.odt" formatted and saved in OpenOffice.org. (21.38 KB, application/vnd.oasis.opendocument.text)
2010-07-28 19:33 UTC, Marcus Harrison
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Harrison 2010-07-28 19:31:49 UTC
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
Comment 1 Marcus Harrison 2010-07-28 19:33:53 UTC
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.
Comment 2 Thomas Zander 2010-11-07 15:58:53 UTC
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.
Comment 3 Thomas Zander 2010-11-07 19:03:49 UTC
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