summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-02-12 15:02:18 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-02-12 21:34:28 +0100
commit99847d6b3005c5444ed5a46ca578c0e40149d77c (patch)
tree7352dc4f228d150fe2a7edfcbbd4eb074edf1c70 /sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
parent7155d0011ecde39c9ea27ef19d475686d80574ee (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. Change-Id: I670e4dc2acbd2a0c6d47fe964cb5e3f2300e6848 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88540 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport10.cxx')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport10.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index dca06548b815..6d11c3c12590 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -482,11 +482,11 @@ DECLARE_OOXMLEXPORT_TEST(testStrict, "strict.docx")
getParagraphOfText(1, xHeaderText, "This is a header.");
// Picture was missing.
- uno::Reference<lang::XServiceInfo> xServiceInfo(getShape(1), uno::UNO_QUERY);
+ uno::Reference<lang::XServiceInfo> xServiceInfo(getShapeByName("Picture 2"), uno::UNO_QUERY);
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.TextGraphicObject"));
// SmartArt was missing.
- xServiceInfo.set(getShape(2), uno::UNO_QUERY);
+ xServiceInfo.set(getShape(1), uno::UNO_QUERY);
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"));
// Chart was missing.