Bug 104018 - Style lost parent on saving as .odg
Summary: Style lost parent on saving as .odg
Status: RESOLVED DUPLICATE of bug 65940
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2016-11-18 19:35 UTC by Andreas B.
Modified: 2016-11-24 11:36 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Andreas B. 2016-11-18 19:35:38 UTC
Steps to reproduce:
1. Create a new Draw document
2. Create a new Style: right click to "Default", "New..."
3. The name of this Style is "Untitled1"
4. Go to Tab "Line", change the color to red, set width to 0.20cm, so the line is good visible
5. Press OK, there is now a new Style "Untitled1" in the Sidebar
6. Right click on "Untitled1", "New..."
7. The name of this Style is "Untitled2"
8. Go to tab "Area", set fill color to green
9. Press OK, there is now a Style "Untitled2" in the Sidebar, which is a Child of "Untitled1".
(The Properties Dialog shows Inherit from "Untitled1")
10. Create a Rectangle, Apply Style "Untitled2". The Rect gets a red border and green background.
11. Save the file as test.odg
12. Close Draw
13. Open draw again, open test.odg

Expected Result:
There is a green Rect with a red line.

Current Result:
The Rect has still a green background, but no red border anymore.
The Style "Untitled2" has no parent, (Inherit from "-None-"). It's in the same Position as "Default".


Some interesting Details:
in styles.xml I found this entry:
<style:style style:name="Untitled2" style:family="graphic">
<style:graphic-properties draw:fill-color="#00ff00"/>
<style:paragraph-properties style:writing-mode="lr-tb"/>

How to fix it:
1. Drag & Drop the Style "Untitled2" to "Untitled1"
2. Save the file again

Look now at styles.xml:
<style:style style:name="Untitled2" style:family="graphic" style:parent-style-name="Untitled1">
<style:graphic-properties draw:fill-color="#00ff00"/>
<style:paragraph-properties style:writing-mode="lr-tb"/>
The Style is now Saved.
Comment 1 Andreas B. 2016-11-18 19:39:36 UTC
The same workflow works with Write and Calc. So this seems to be a problem only with Draw.
Comment 2 Buovjaga 2016-11-24 11:36:38 UTC

*** This bug has been marked as a duplicate of bug 65940 ***