diff options
author | Justin Luth <justin_luth@sil.org> | 2017-07-06 10:20:29 -0400 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2017-07-08 12:35:45 +0200 |
commit | bbfdd03460ddf5e33f5fda000df9e6f6ce458288 (patch) | |
tree | 5534c7f885bc3f6bccb8724caf3796e5751d7506 | |
parent | 4e59f0481bdd68edfe95816f22315e1538d1a6ce (diff) |
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/39671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf108973_backgroundTextbox.docx | bin | 0 -> 10429 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf108973_foregroundTextbox.docx | bin | 0 -> 10478 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 10 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 1 |
4 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf108973_backgroundTextbox.docx b/sw/qa/extras/ooxmlexport/data/tdf108973_backgroundTextbox.docx Binary files differnew file mode 100644 index 000000000000..177cb5b7797d --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf108973_backgroundTextbox.docx diff --git a/sw/qa/extras/ooxmlexport/data/tdf108973_foregroundTextbox.docx b/sw/qa/extras/ooxmlexport/data/tdf108973_foregroundTextbox.docx Binary files differnew file mode 100644 index 000000000000..fb81047c392a --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf108973_foregroundTextbox.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx index 0957e02eb313..b1ba0db8cfc0 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx @@ -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"))); } +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") { // 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 e7cd1f8c51f7..584368f5199f 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2039,6 +2039,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( zOrder >= 0 ) ); checkZOrderStatus = true; } if(checkBtLrStatus && checkZOrderStatus) |