Issue 118788 - Save As--->Layer inserted order / Layer order, Misunderstanding?!
Summary: Save As--->Layer inserted order / Layer order, Misunderstanding?!
Status: CONFIRMED
Alias: None
Product: Draw
Classification: Application
Component: save-export (show other issues)
Version: OOo 3.3
Hardware: PC Windows Vista
: P5 (lowest) Major (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-16 06:02 UTC by spk
Modified: 2019-06-09 16:50 UTC (History)
5 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
File mentioned in the unit test part of the patch (12.47 KB, application/vnd.oasis.opendocument.graphics)
2018-09-09 13:12 UTC, Regina Henschel
no flags Details
proposed fix done in LibreOffice (24.79 KB, patch)
2018-09-09 13:21 UTC, Regina Henschel
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description spk 2012-01-16 06:02:27 UTC
I checked with Windows Vista Home Premiup Service Pack 2(Japanese)
OpenOffice.org 3.3.0 OOO330m20(Build9567) with Japanese
OOo-dev 3.4.0 OOO340m0(Build9583) no language packs

Steps to reproduce:
1. Open new drawing
2. Insert new layer "Layer4" after "Dimension Lines"
   and set properties (Visible, Printable, Locked).
3. Insert next new layer "Layer5" after "Dimension Lines"
   and set properties (Unvisible, Unprintable, Unlocked).
   Layer's order : "Layout", "Controls", "Dimension Lines", "Layer5" next is "Layer4".
4. Save As "test1" and Close.
5. Open "test1"
"Layer4"'s properties is (Unvisible, Unprintable, Unlocked).
"Layer5"'s properties is (Visible, Printable, Locked).
Save As--->Layer inserted order / Layer order, Misunderstanding?!

On the other hand
3. Insert new layer after "Layer4".
   and set change properties (Unvisible, Unprintable, Unlocked).
   Layer's order : "Layout", "Controls", "Dimension Lines", "Layer4" next is "Layer5".
4. Save As "test2" and Close.
5. Open "Ordered_Layers"
"Layer4"'s properties is (Visible, Printable, Locked).
"Layer5"'s properties is (Unvisible, Unprintable, Unlocked).
It's OK.
Comment 1 Regina Henschel 2018-08-20 22:27:52 UTC
The properties visible/printable/locked are saved in settings.xml in a bitfield. The bits have no reference to what layer they belong, but the order is taken from the <draw:layer-set> element in styles.xml. When inserting a layer not at the end, this becomes out of sync. The error exists already in OOo1.1.5.
Comment 2 Regina Henschel 2018-09-09 13:12:43 UTC
Created attachment 86509 [details]
File mentioned in the unit test part of the patch
Comment 3 Regina Henschel 2018-09-09 13:21:41 UTC
Created attachment 86510 [details]
proposed fix done in LibreOffice

I have proposed a fix for this problem in LibreOffice. I provide it here under  Apache License, version 2.0. You likely need to change some details, so that the patch can be applied to AOO, but the general solution should work. I have currently no build environment for AOO and I'm not going to create one, and therefore cannot test or apply it to AOO myself.
Comment 4 Peter 2018-09-09 15:07:46 UTC
Cool! Thanks a lot, Regina!
We will have a look.
Comment 5 oooforum (fr) 2019-06-09 16:50:47 UTC
Set as PATCH