From a75477101510e7a8e60db03edbf2d253f504d70d Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Thu, 6 Jul 2017 09:46:06 -0400 Subject: tdf#77219 writerfilter: allow shapes to be in front of text In LO4.3, commit 2496eaa5c4535b88b44e4ac034aae6af0c08de0e forced every shape to be "in background". That is not correct. Word appears to use negative z-indexes to indicate behind-text zordering and positive numbers for in-front placement. Change-Id: I4083ae67ef76152e1c0a894d810950d249ac13b4 Reviewed-on: https://gerrit.libreoffice.org/39670 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-by: Miklos Vajna --- .../ooxmlexport/data/tdf77219_backgroundShape.docx | Bin 0 -> 10550 bytes .../ooxmlexport/data/tdf77219_foregroundShape.docx | Bin 0 -> 10554 bytes sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 10 ++++++++++ 3 files changed, 10 insertions(+) create mode 100644 sw/qa/extras/ooxmlexport/data/tdf77219_backgroundShape.docx create mode 100644 sw/qa/extras/ooxmlexport/data/tdf77219_foregroundShape.docx (limited to 'sw') diff --git a/sw/qa/extras/ooxmlexport/data/tdf77219_backgroundShape.docx b/sw/qa/extras/ooxmlexport/data/tdf77219_backgroundShape.docx new file mode 100644 index 000000000000..bcfdcf377491 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf77219_backgroundShape.docx differ diff --git a/sw/qa/extras/ooxmlexport/data/tdf77219_foregroundShape.docx b/sw/qa/extras/ooxmlexport/data/tdf77219_foregroundShape.docx new file mode 100644 index 000000000000..7de2b4c39021 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf77219_foregroundShape.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx index c4c4f035a784..0957e02eb313 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx @@ -631,6 +631,16 @@ DECLARE_OOXMLEXPORT_TEST(test77219, "test77219.docx") assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[6]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]", "behindDoc", "1"); } +DECLARE_OOXMLEXPORT_TEST(testTdf77219_backgroundShape, "tdf77219_backgroundShape.docx") +{ + CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape is in front of the paragraph", false, bool(getProperty(getShape(1), "Opaque"))); +} + +DECLARE_OOXMLEXPORT_TEST(testTdf77219_foregroundShape, "tdf77219_foregroundShape.docx") +{ + CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape is in front of the paragraph", true, bool(getProperty(getShape(1), "Opaque"))); +} + DECLARE_OOXMLEXPORT_TEST(testPresetShape, "preset-shape.docx") { // Document contains a flowChartMultidocument preset shape, our date for that shape wasn't correct. -- cgit v1.2.3