Kaydet (Commit) 049e8412 authored tarafından Sushil Shinde's avatar Sushil Shinde Kaydeden (comit) Caolán McNamara

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/15390Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 8a08f686
......@@ -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
{
......
......@@ -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")
{
/*
......
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