Bug 44774 - LibreOffice Draw: Graphics-Style Organizer loses references on FILESAVE FILEOPEN
Summary: LibreOffice Draw: Graphics-Style Organizer loses references on FILESAVE FILEOPEN
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Drawing (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-14 02:47 UTC by Bernd Gloss
Modified: 2013-09-17 17:59 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Simple drawing with two lines with formats FormatA and FormatB. FormatB originally was linked with FormatA but is not when opening the document again. (10.64 KB, application/vnd.oasis.opendocument.graphics)
2012-01-14 02:47 UTC, Bernd Gloss
Details
Graphics Style Dialog for FormatB with Organizer of Style (27.90 KB, image/png)
2012-01-14 23:53 UTC, Bernd Gloss
Details

Description Bernd Gloss 2012-01-14 02:47:46 UTC
Created attachment 55567 [details]
Simple drawing with two lines with formats FormatA and FormatB. FormatB originally was linked with FormatA but is not when opening the document again.

Hi,

LibreOffice Draw loses links between graphic styles when saving/re-opening the document.

How to reproduce the error?

- create an empty odg document
- create a FormatA with some properties, e.g., line color, line width
- create a FormatB and link it with FormatA in the organizer of the styles. Now change some of the properties of FormatB, e.g., line end-point.
- draw two lines and assign the styles FormatA to the one and FormatB to the other.
- save the file and close LibO Draw.
- open the file again

Now FormatB is not linked anymore with FormatA. It is rather linked with nothing ("None"), not even with the default style. Even the the line formatted with FormatB looks different now.

Seems that there is a mistake in managing the styles.

This report is based on a LibreOffice 3.4.4 from a Fedora16 distribution. However, I have seen this problem before with OpenOffice but did not report it that time.

Thanks for working on LibreOffice.

Bernd
Comment 1 Bernd Gloss 2012-01-14 05:56:11 UTC
btw... sometimes the linking works fine, sometimes not. That's like tossing a coin. I was wondering whether this effect is either related to the alphabetical order of the format names or to the order they are created.
Comment 2 Bernd Gloss 2012-01-14 23:53:22 UTC
Created attachment 55592 [details]
Graphics Style Dialog for FormatB with Organizer of Style
Comment 3 Bernd Gloss 2012-01-14 23:55:20 UTC
I did some investigations on the odg file looking to the style.xml

There, you can find that the error seems to be when writing the file or before. The link 


<style:style style:name="FormatA" style:family="graphic" style:parent-style-name="standard">
<style:graphic-properties draw:stroke-dash="Dash_20_2" svg:stroke-width="0.07cm" svg:stroke-color="#00ff00" draw:marker-start-width="0.31cm" draw:marker-end="Circle" draw:marker-end-width="0.31cm" draw:fill-gradient-name="Gradient_20_7" draw:fill-hatch-name="Hatching_20_1" draw:fill-image-name="Bitmape_20_1"/></style:style><style:style style:name="FormatB" style:family="graphic"><style:graphic-properties svg:stroke-color="#0000ff" draw:marker-end="Square"/></style:style>
Comment 4 Bernd Gloss 2012-01-14 23:58:44 UTC
<style:style style:name="FormatA" style:family="graphic" style:parent-style-name="standard">
  <style:graphic-properties draw:stroke-dash="Dash_20_2"svg:stroke-width="0.07cm" svg:stroke-color="#00ff00" draw:marker-start-width="0.31cm" draw:marker-end="Circle" draw:marker-end-width="0.31cm" draw:fill-gradient-name="Gradient_20_7" draw:fill-hatch-name="Hatching_20_1" draw:fill-image-name="Bitmape_20_1"/>
</style:style>

<style:style style:name="FormatB" style:family="graphic">
  <style:graphic-properties svg:stroke-color="#0000ff" draw:marker-end="Square"/></style:style>

There, you can see that the element for FormatA has an attribute style:parent-style-name while FormatB doesn't provide this attribute at all.
Comment 5 Regina Henschel 2012-01-18 11:33:40 UTC
I can reproduce it with the description in #1 on Windows7.
Comment 6 Art Covert 2013-09-17 17:59:11 UTC
I have a similar issue on linux, but style links are working correctly on my Mac OS laptop.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.