summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2019-11-09 07:27:21 +0300
committerJustin Luth <justin_luth@sil.org>2019-11-09 11:27:18 +0100
commit5f0844077d289a257b914f0aad9fd93788f34511 (patch)
tree52af4a5a3e17de0206118ad74e6ddc859d28f5fa /sw/qa
parentd628258f279d003ba4e11f1f7e2e69273acd008c (diff)
partial revert tdf#116071 import to XATTR_FILL not RES_BACKGROUND
caused by commit 3539a1efb41a787237e4333ebc715db96ffacb5b which fixes table-related regression bug report tdf#128608. I was not able to create a unit test for this from scratch. In fact, if I use MSWord2003 to roundtrip the file, then LO opens it without problems. A real fix (to move LO away from RES_BACKGROUND in tables) should be subject to lots of testing time, so just reverting for now. Change-Id: I328741947b7ed319ff8df0ba169618f6ad0d2c75 Reviewed-on: https://gerrit.libreoffice.org/82339 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ww8export/data/tdf128608_tableParaBackColor.docbin0 -> 113152 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx16
2 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf128608_tableParaBackColor.doc b/sw/qa/extras/ww8export/data/tdf128608_tableParaBackColor.doc
new file mode 100644
index 000000000000..d9b16ca53a30
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf128608_tableParaBackColor.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 7a4dc17d4ede..95520e563155 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -226,6 +226,22 @@ DECLARE_WW8EXPORT_TEST(testTdf127862_pageFillStyle, "tdf127862_pageFillStyle.odt
CPPUNIT_ASSERT(drawing::FillStyle_NONE != getProperty<drawing::FillStyle>(xStyle, "FillStyle"));
}
+DECLARE_WW8EXPORT_TEST(testTdf128608_tableParaBackColor, "tdf128608_tableParaBackColor.doc")
+{
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A4"), uno::UNO_QUERY);
+
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xCell->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ uno::Reference<text::XTextRange> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
+ // ParaBackColor doesn't seem to be used in this case, but keep it here to make sure it stays as AUTO.
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty<sal_uInt32>(xPara, "ParaBackColor")));
+ // No paragraph background colour/fill. (The cell background colour should be used.)
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("No fillstyle", drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xPara, "FillStyle"));
+}
+
DECLARE_WW8EXPORT_TEST(testTdf94009_zeroPgMargin, "tdf94009_zeroPgMargin.odt")
{
uno::Reference<beans::XPropertySet> defaultStyle(getStyles("PageStyles")->getByName("Standard"),