Kaydet (Commit) ba8988a5 authored tarafından Luboš Luňák's avatar Luboš Luňák

explicitly export no fill to .docx when fillstyle is set to none (bnc#581614)

The shapes have detectmouseclick="t" for some reason, leading to the v:fill
tag being written, but the default is solid fill, so if there's otherwise
actually no fill, explicitly say so.

Change-Id: I2a8d24ce4d0da1082b4eefbad0db51e2e6fe1bc9
üst 114edb76
......@@ -545,6 +545,8 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect
if ( pFillType )
pAttrList->add( XML_type, pFillType );
}
else
pAttrList->add( XML_on, "false" );
if ( rProps.GetOpt( ESCHER_Prop_fillColor, nValue ) )
impl_AddColor( m_pShapeAttrList, XML_fillcolor, nValue );
......
This diff was suppressed by a .gitattributes entry.
......@@ -94,6 +94,7 @@ public:
void testFdo66688();
void testFdo66773();
void testFdo58577();
void testBnc581614();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
......@@ -158,6 +159,7 @@ void Test::run()
{"fdo66688.docx", &Test::testFdo66688},
{"fdo66773.docx", &Test::testFdo66773},
{"fdo58577.odt", &Test::testFdo58577},
{"bnc581614.doc", &Test::testBnc581614},
};
// Don't test the first import of these, for some reason those tests fail
const char* aBlacklist[] = {
......@@ -943,6 +945,14 @@ void Test::testFdo58577()
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
}
void Test::testBnc581614()
{
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xFrame(xDraws->getByIndex(0), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xFrame, "FillStyle"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
......
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