Kaydet (Commit) a7547710 authored tarafından Justin Luth's avatar Justin Luth Kaydeden (comit) Miklos Vajna

tdf#77219 writerfilter: allow shapes to be in front of text

In LO4.3, commit 2496eaa5
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/39670Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 868d8c8f
...@@ -631,6 +631,16 @@ DECLARE_OOXMLEXPORT_TEST(test77219, "test77219.docx") ...@@ -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"); 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") DECLARE_OOXMLEXPORT_TEST(testPresetShape, "preset-shape.docx")
{ {
// Document contains a flowChartMultidocument preset shape, our date for that shape wasn't correct. // Document contains a flowChartMultidocument preset shape, our date for that shape wasn't correct.
......
...@@ -2081,7 +2081,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape ...@@ -2081,7 +2081,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
aGrabBag[i].Value >>= zOrder; aGrabBag[i].Value >>= zOrder;
xShapePropertySet->setPropertyValue( "ZOrder", uno::makeAny(pZOrderHelper->findZOrder(zOrder))); xShapePropertySet->setPropertyValue( "ZOrder", uno::makeAny(pZOrderHelper->findZOrder(zOrder)));
pZOrderHelper->addItem(xShapePropertySet, zOrder); pZOrderHelper->addItem(xShapePropertySet, zOrder);
xShapePropertySet->setPropertyValue(getPropertyName( PROP_OPAQUE ), uno::makeAny( false ) ); xShapePropertySet->setPropertyValue(getPropertyName( PROP_OPAQUE ), uno::makeAny( zOrder >= 0 ) );
checkZOrderStatus = true; checkZOrderStatus = true;
} }
else if ( aGrabBag[i].Name == "TxbxHasLink" ) else if ( aGrabBag[i].Name == "TxbxHasLink" )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment