summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2016-08-05 20:21:13 +0300
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-11-30 16:38:45 +0100
commit7aec25f93038926bd4ffad80743ea48f7e95dd6f (patch)
tree83ad2e9123b21f7bb15edfd3b59ac9eec2e81923 /sw/qa/extras
parent39266f0fffbe8e89495dd96b0ace41e2d9b447d6 (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/extras')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf97090.docxbin0 -> 29899 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx18
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
new file mode 100644
index 000000000000..3ba402718e95
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf97090.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 8f41610f4030..36a29e8bbdb2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -725,6 +725,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)