oox/source/vml/vmlshape.cxx | 5 +++++ sw/qa/extras/ooxmlimport/data/testfdo90720.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 12 ++++++++++++ 3 files changed, 17 insertions(+)
New commits: commit 049e84125fb76f7a1a051d7cac2e04e37a7cd190 Author: Sushil Shinde <sushilshi...@libreoffice.org> Date: Mon Apr 20 00:45:06 2015 +0530 tdf#90720 Textframe background was not transparent In case of 'no fill' for vml textboxes, MS office rendered as transpanrent textbox. When opened same file on LO, it rendered it as textframe with white background. (Even if the fillstyle is type of 'no fill' and 'backcolortransparency ' is 100%) So, Fixing this issue by applying 100% 'FillTransparency' if it gets above situation. Change-Id: Ied2d3855354ada994288c29c78d9ccb4e5b0b4d6 Reviewed-on: https://gerrit.libreoffice.org/15390 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 1bb21a1..bd738d2 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -329,6 +329,11 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS aGrabBag[length+1].Value = uno::makeAny(sal_Int32(NormAngle360((maTypeModel.maRotation.toInt32()) * -100))); } propertySet->setPropertyValue( "FrameInteropGrabBag", uno::makeAny(aGrabBag) ); + if (propertySet->getPropertyValue("FillStyle") == FillStyle_NONE && + propertySet->getPropertyValue("BackColorTransparency") == makeAny(100)) { + // If there is no fill, the Word default is 100% transparency. + propertySet->setPropertyValue("FillTransparence", makeAny(100)); + } } else { diff --git a/sw/qa/extras/ooxmlimport/data/testfdo90720.docx b/sw/qa/extras/ooxmlimport/data/testfdo90720.docx new file mode 100644 index 0000000..a4e8ba9 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/testfdo90720.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 107060f..eebdc08 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -360,6 +360,18 @@ xray image.FillColor CPPUNIT_ASSERT_EQUAL( sal_Int32( 0xc0504d ), fillColor ); } +DECLARE_OOXMLIMPORT_TEST(testfdo90720, "testfdo90720.docx") +{ + uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount()); + uno::Reference<text::XTextFrame> textbox(xIndexAccess->getByIndex(0), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> properties(textbox, uno::UNO_QUERY); + sal_Int32 fill_transperence; + properties->getPropertyValue( "FillTransparence" ) >>= fill_transperence; + CPPUNIT_ASSERT_EQUAL( sal_Int32(100), fill_transperence ); +} + DECLARE_OOXMLIMPORT_TEST(testN747461, "n747461.docx") { /*
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits