summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-04-06 18:54:51 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-04-07 10:03:15 +0200
commit79ef3c7ae3b2f7be5ba6fe38997e846fd9c7e0ee (patch)
treec36b3f4838cffbcabf628d88f572cc6fa001b0c2 /sc/source/filter
parent795a3ad8efa8b418f3c6477379c13560c3b4b890 (diff)
tdf#141467 xmloff,sc,sw: ODF export: reorder flys' ZOrder/z-index harder
Also keep the control layer distinct from the foreground, as a follow-up to tdf#133487. Try to improve the detection of already sorted indexes a bit to avoid unnecessary sorting. Hilariously the test docs require adding 3 additional items to the extension schema. Change-Id: I629d5b09294f679717677b9d89537d905ac4c404 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113696 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 573f6886539c..4b390c412af5 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -22,6 +22,7 @@
#include <sfx2/objsh.hxx>
#include <sot/storage.hxx>
#include <osl/diagnose.h>
+#include <o3tl/unreachable.hxx>
#include <comphelper/fileformat.h>
#include <comphelper/processfactory.hxx>
#include <comphelper/propertysequence.hxx>
@@ -783,7 +784,21 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly)
{
sal_Int16 nLayerID(0);
xShape->getPropertyValue("LayerID") >>= nLayerID;
- return SdrLayerID(nLayerID) == SC_LAYER_BACK;
+ switch (nLayerID)
+ {
+ case sal_uInt8(SC_LAYER_FRONT):
+ return 1;
+ case sal_uInt8(SC_LAYER_BACK):
+ return 0;
+ case sal_uInt8(SC_LAYER_INTERN):
+ return 2;
+ case sal_uInt8(SC_LAYER_CONTROLS):
+ return 3;
+ case sal_uInt8(SC_LAYER_HIDDEN):
+ return 1; // treat as equivalent to front
+ default:
+ O3TL_UNREACHABLE;
+ }
});
}