diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2021-04-06 18:54:51 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-04-07 10:03:15 +0200 |
commit | 79ef3c7ae3b2f7be5ba6fe38997e846fd9c7e0ee (patch) | |
tree | c36b3f4838cffbcabf628d88f572cc6fa001b0c2 /sw/qa/extras/odfexport | |
parent | 795a3ad8efa8b418f3c6477379c13560c3b4b890 (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 'sw/qa/extras/odfexport')
-rw-r--r-- | sw/qa/extras/odfexport/data/Formcontrol needs high z-index.odt | bin | 0 -> 25828 bytes | |||
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/data/Formcontrol needs high z-index.odt b/sw/qa/extras/odfexport/data/Formcontrol needs high z-index.odt Binary files differnew file mode 100644 index 000000000000..4b03bd7fd197 --- /dev/null +++ b/sw/qa/extras/odfexport/data/Formcontrol needs high z-index.odt diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index f570e9f5d40a..6dc67ca58a1d 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -246,6 +246,18 @@ DECLARE_ODFEXPORT_EXPORTONLY_TEST(testTdf133487, "MadeByLO7.odt") assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[@style:name = /office:document-content/office:body/office:text/text:p[3]/draw:custom-shape[@draw:z-index = '1']/attribute::draw:style-name]/style:graphic-properties", "run-through", "foreground"); } +DECLARE_ODFEXPORT_EXPORTONLY_TEST(testTdf141467, "Formcontrol needs high z-index.odt") +{ + xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); + // shape in foreground has lowest index + assertXPath(pXmlDoc, "/office:document-content/office:body/office:text/text:p[2]/draw:custom-shape", "z-index", "0"); + assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[@style:name = /office:document-content/office:body/office:text/text:p[2]/draw:custom-shape[@draw:z-index = '0']/attribute::draw:style-name]/style:graphic-properties", "run-through", "foreground"); + // form control, previously index 0 + assertXPath(pXmlDoc, "/office:document-content/office:body/office:text/text:p[2]/draw:control", "z-index", "1"); + // no run-through on form's style + assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[@style:name = /office:document-content/office:body/office:text/text:p[2]/draw:control[@draw:z-index = '1']/attribute::draw:style-name]/style:graphic-properties/attribute::run-through", 0); +} + DECLARE_ODFEXPORT_TEST(testTdf139126, "tdf139126.odt") { CPPUNIT_ASSERT_EQUAL(1, getPages()); |