summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-02-12 15:02:18 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-05-07 09:38:21 +0200
commit32750c8a1121177ea48d3e7b237a9ddc834fde38 (patch)
tree379d7933713c6cca037be3ac86e412504be219ed /sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
parentc44d85b32fdee8fedb40e30b61bcd7732600e4f5 (diff)
DOCX import: fix ZOrder of inline vs anchored shapes
Shapes which are anchored but are not in the background should be always on top of as-char anchored shapes in OOXML terms. Writer supports a custom ZOrder even for as-char shapes, so make sure that they are always behind anchored shapes. To avoid unnecessary work, make sure that when there are multiple inline shapes, we don't pointlessly reorder them (the old vs new style of the sorting controls exactly this, what happens when two shapes have the same ZOrder, and all inline shapes have a 0 ZOrder). Adapt a few tests that used ZOrder indexes to access shapes, but the intention was to just refer to a shape: fix the index and migrate to shape names where possible. (cherry picked from commit 99847d6b3005c5444ed5a46ca578c0e40149d77c) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport7.cxx writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx Change-Id: I670e4dc2acbd2a0c6d47fe964cb5e3f2300e6848
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport13.cxx')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport13.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index e586a666dff4..d2765488b797 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -556,10 +556,10 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119201, "tdf119201.docx")
auto xShape(getShape(1));
CPPUNIT_ASSERT_MESSAGE("First shape should be visible.", getProperty<bool>(xShape, "Visible"));
CPPUNIT_ASSERT_MESSAGE("First shape should be printable.", getProperty<bool>(xShape, "Printable"));
- xShape = getShape(2);
+ xShape = getShapeByName("Rectangle 1");
CPPUNIT_ASSERT_MESSAGE("Second shape should not be visible.", !getProperty<bool>(xShape, "Visible"));
CPPUNIT_ASSERT_MESSAGE("Second shape should not be printable.", !getProperty<bool>(xShape, "Printable"));
- xShape = getShape(3);
+ xShape = getShapeByName("Oval 2");
CPPUNIT_ASSERT_MESSAGE("Third shape should be visible.", getProperty<bool>(xShape, "Visible"));
CPPUNIT_ASSERT_MESSAGE("Third shape should be printable.", getProperty<bool>(xShape, "Printable"));
}