Apache OpenOffice (AOO) Bugzilla – Issue 118788
Save As--->Layer inserted order / Layer order, Misunderstanding?!
Last modified: 2019-06-09 16:50:47 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.
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.
Created attachment 86509 [details] File mentioned in the unit test part of the patch
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.
Cool! Thanks a lot, Regina! We will have a look.
Set as PATCH