Kaydet (Commit) bbfdd034 authored tarafından Justin Luth's avatar Justin Luth

tdf#108973 writerfilter: allow textboxes to be in the background

Word appears to use negative z-indexes to indicate behind-text
zordering and positive numbers for in-front placement. This
was added for shapes in LO4.3, now applying to textboxes also.

Change-Id: I3b06fb231329f151ca978f3a68b4d4e89bc28515
Reviewed-on: https://gerrit.libreoffice.org/39671Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
üst 4e59f048
...@@ -641,6 +641,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf77219_foregroundShape, "tdf77219_foregroundShape ...@@ -641,6 +641,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf77219_foregroundShape, "tdf77219_foregroundShape
CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape is in front of the paragraph", true, bool(getProperty<bool>(getShape(1), "Opaque"))); CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape is in front of the paragraph", true, bool(getProperty<bool>(getShape(1), "Opaque")));
} }
DECLARE_OOXMLEXPORT_TEST(testTdf108973_backgroundTextbox, "tdf108973_backgroundTextbox.docx")
{
CPPUNIT_ASSERT_EQUAL_MESSAGE("Textbox is in front of the paragraph", false, bool(getProperty<bool>(getShape(1), "Opaque")));
}
DECLARE_OOXMLEXPORT_TEST(testTdf108973_foregroundTextbox, "tdf108973_foregroundTextbox.docx")
{
CPPUNIT_ASSERT_EQUAL_MESSAGE("Textbox 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.
......
...@@ -2039,6 +2039,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape ...@@ -2039,6 +2039,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( zOrder >= 0 ) );
checkZOrderStatus = true; checkZOrderStatus = true;
} }
if(checkBtLrStatus && checkZOrderStatus) if(checkBtLrStatus && checkZOrderStatus)
......
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