summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport5.cxx')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport5.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index c2aaec5c64a9..08d4831d1b12 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -1318,6 +1318,22 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf112287, "tdf112287.docx")
assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:pPr/w:framePr","vAnchor","margin");
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testZOrderInHeader, "tdf120760_ZOrderInHeader.docx")
+{
+ // tdf#120760 Check that the Z-Order of the background is smaller than the front shape's.
+ xmlDocUniquePtr pXml = parseExport("word/header1.xml");
+ if (!pXml)
+ return;
+
+ // Get the Z-Order of the background image and of the shape in front of it.
+ sal_Int32 nBackground = getXPath(pXml, "/w:hdr/w:p[1]/w:r[1]/w:drawing/wp:anchor", "relativeHeight").toInt32();
+ sal_Int32 nFrontShape = getXPath(pXml, "/w:hdr/w:p[1]/w:r[1]/mc:AlternateContent[2]"
+ "/mc:Choice/w:drawing/wp:anchor", "relativeHeight").toInt32();
+
+ // Assert that background is in the back.
+ CPPUNIT_ASSERT(nBackground < nFrontShape);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */