[Libreoffice-commits] core.git: sw/qa writerfilter/source
Justin Luth
justin_luth at sil.org
Fri Jul 7 09:15:46 UTC 2017
sw/qa/extras/ooxmlexport/data/tdf77219_backgroundShape.docx |binary
sw/qa/extras/ooxmlexport/data/tdf77219_foregroundShape.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 10 ++++++++++
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2 +-
4 files changed, 11 insertions(+), 1 deletion(-)
New commits:
commit a75477101510e7a8e60db03edbf2d253f504d70d
Author: Justin Luth <justin_luth at sil.org>
Date: Thu Jul 6 09:46:06 2017 -0400
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 <ci at libreoffice.org>
Reviewed-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
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<bool>(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<bool>(getShape(1), "Opaque")));
+}
+
DECLARE_OOXMLEXPORT_TEST(testPresetShape, "preset-shape.docx")
{
// Document contains a flowChartMultidocument preset shape, our date for that shape wasn't correct.
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 8b8a78995b8a..bc15fc347fcf 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2081,7 +2081,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
aGrabBag[i].Value >>= zOrder;
xShapePropertySet->setPropertyValue( "ZOrder", uno::makeAny(pZOrderHelper->findZOrder(zOrder)));
pZOrderHelper->addItem(xShapePropertySet, zOrder);
- xShapePropertySet->setPropertyValue(getPropertyName( PROP_OPAQUE ), uno::makeAny( false ) );
+ xShapePropertySet->setPropertyValue(getPropertyName( PROP_OPAQUE ), uno::makeAny( zOrder >= 0 ) );
checkZOrderStatus = true;
}
else if ( aGrabBag[i].Name == "TxbxHasLink" )
More information about the Libreoffice-commits
mailing list