diff options
author | Justin Luth <justin_luth@sil.org> | 2016-08-05 20:21:13 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-15 06:47:43 +0000 |
commit | 2a174c2f6fd58a31eb150b84de83e5ba1c4d3fed (patch) | |
tree | 66e621b96d9adc8978c1b704e00389dc63515162 /sw/qa | |
parent | b2465ef049d06b9ee91a6e8cd1e4c4e777d9f436 (diff) |
tdf#97090 writerfilter - don't fill_SOLID with auto color
fixes a regression from 24077b2d52ab3d0fd0db5afb25d8b94b62386e3e
<w:shd w:val="clear" w:color="auto" w:fill="auto"> seems to be
the default "fill disabled" state, so don't force a solid white
fill in that case.
Change-Id: Ia421e52e228bbf0d3a2cd9af72e0a580042e5dcd
Reviewed-on: https://gerrit.libreoffice.org/27915
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf97090.docx | bin | 0 -> 29899 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 18 |
2 files changed, 18 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf97090.docx b/sw/qa/extras/ooxmlexport/data/tdf97090.docx Binary files differnew file mode 100644 index 000000000000..3ba402718e95 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf97090.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 4bb34edb9382..cb20af147ff1 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -718,6 +718,24 @@ DECLARE_OOXMLEXPORT_TEST(testTdf88583, "tdf88583.odt") CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0x00cc00), getProperty<sal_Int32>(getParagraph(1), "FillColor")); } +DECLARE_OOXMLEXPORT_TEST(testTdf97090, "tdf97090.docx") +{ + uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY); + uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x95B3D7), getProperty<sal_Int32>(xTable->getCellByName("A1"), "BackColor")); + + uno::Reference<container::XEnumerationAccess> paraEnumAccess(xTable->getCellByName("A1"), uno::UNO_QUERY); + assert( paraEnumAccess.is() ); + uno::Reference<container::XEnumeration> paraEnum = paraEnumAccess->createEnumeration(); + + assert( paraEnum.is() ); + uno::Reference<beans::XPropertySet> paragraphProperties(paraEnum->nextElement(), uno::UNO_QUERY); + assert( paragraphProperties.is() ); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(paragraphProperties, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xffffff), getProperty<sal_Int32>(paragraphProperties, "FillColor")); +} + DECLARE_OOXMLEXPORT_TEST(testTdf89791, "tdf89791.docx") { if (mbExported) |