From b926a068a067e7aff6c8f11ed1098a76c39bf5e8 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Mon, 11 Nov 2019 07:27:43 +0300 Subject: tdf#128608 ww8import: COL_AUTO == NO FILL, not solid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes problems in the patches for tdf#116071. Tables have nothing to do with this bug. It just is the most common place to have a background colour, and then to have direct formatting that reverts back to COL_AUTO. I created a unit test using the page background (black), default style paragraph background (blue), and direct formatting COL_AUTO. COL_AUTO was turned into WHITE if the fillstyle was set to SOLID. Change-Id: I8197c040cec5adbdf16f379a88fab5e534ac0c6e Reviewed-on: https://gerrit.libreoffice.org/82412 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-by: Xisco FaulĂ­ --- .../extras/ww8export/data/tdf128608_fillStyleNoneB.odt | Bin 0 -> 11105 bytes sw/qa/extras/ww8export/ww8export3.cxx | 9 ++++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 sw/qa/extras/ww8export/data/tdf128608_fillStyleNoneB.odt (limited to 'sw/qa') diff --git a/sw/qa/extras/ww8export/data/tdf128608_fillStyleNoneB.odt b/sw/qa/extras/ww8export/data/tdf128608_fillStyleNoneB.odt new file mode 100644 index 000000000000..917dc96d40ba Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf128608_fillStyleNoneB.odt differ diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index 96940648ad2b..014274e98bbf 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -202,7 +202,14 @@ DECLARE_WW8EXPORT_TEST(testTdf121111_fillStyleNone, "tdf121111_fillStyleNone.doc uno::Reference xText(getParagraph(12)); CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty(xText, "ParaBackColor"))); - CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty(xText, "FillStyle")); + CPPUNIT_ASSERT_EQUAL_MESSAGE("No fill", drawing::FillStyle_NONE, getProperty(xText, "FillStyle")); +} + +DECLARE_WW8EXPORT_TEST(testTdf128608_fillStyleNoneB, "tdf128608_fillStyleNoneB.odt") +{ + uno::Reference xText(getParagraph(1)); + CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty(xText, "ParaBackColor"))); + CPPUNIT_ASSERT_EQUAL_MESSAGE("No fill", drawing::FillStyle_NONE, getProperty(xText, "FillStyle")); } DECLARE_WW8EXPORT_TEST(testTdf112618_textbox_no_bg, "tdf112618_textbox_no_bg.doc") -- cgit v1.2.3