From 982537d77c2db463cc053cfdcd522530a3834c9e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 24 Aug 2015 23:27:06 +0200 Subject: tdf#92379: sw: unit test for frame style background color Change-Id: I736964e0ae1419de212a7b608377804c764443e7 --- sw/CppunitTest_sw_odfexport.mk | 3 ++ sw/qa/extras/odfexport/data/tdf92379.fodt | 58 +++++++++++++++++++++++++++++++ sw/qa/extras/odfexport/odfexport.cxx | 13 +++++++ 3 files changed, 74 insertions(+) create mode 100644 sw/qa/extras/odfexport/data/tdf92379.fodt diff --git a/sw/CppunitTest_sw_odfexport.mk b/sw/CppunitTest_sw_odfexport.mk index 5edd9b57329e..c6434ac1574e 100644 --- a/sw/CppunitTest_sw_odfexport.mk +++ b/sw/CppunitTest_sw_odfexport.mk @@ -56,6 +56,9 @@ $(eval $(call gb_CppunitTest_use_components,sw_odfexport,\ embeddedobj/util/embobj \ filter/source/config/cache/filterconfig1 \ filter/source/storagefilterdetect/storagefd \ + filter/source/odfflatxml/odfflatxml \ + filter/source/xmlfilterdetect/xmlfd \ + filter/source/xmlfilteradaptor/xmlfa \ framework/util/fwk \ i18npool/util/i18npool \ linguistic/source/lng \ diff --git a/sw/qa/extras/odfexport/data/tdf92379.fodt b/sw/qa/extras/odfexport/data/tdf92379.fodt new file mode 100644 index 000000000000..280dc5ad893c --- /dev/null +++ b/sw/qa/extras/odfexport/data/tdf92379.fodt @@ -0,0 +1,58 @@ + + + + ms 2015-08-24T21:49:45.305718699LibreOfficeDev/4.3.7.2$Linux_X86_64 LibreOffice_project/8a35821d8636a03b8bf4e15b48f59794652c68ba + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 85a4c01b2d79..d313f374a29e 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -268,6 +268,19 @@ DECLARE_ODFEXPORT_TEST(testFdo38244, "fdo38244.odt") CPPUNIT_ASSERT_EQUAL(OUString("M"), getProperty(xPropertySet, "Initials")); } +DECLARE_ODFEXPORT_TEST(testTdf92379, "tdf92379.fodt") +{ + // frame style fo:background-color was not imported + uno::Reference xStyles(getStyles("FrameStyles")); + uno::Reference xStyle(xStyles->getByName("encarts"), + uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffcc99), getProperty(xStyle, "BackColorRGB")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xStyle, "BackColorTransparency")); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty(xStyle, "FillStyle")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffcc99), getProperty(xStyle, "FillColor")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xStyle, "FillTransparence")); +} + DECLARE_ODFEXPORT_TEST(testFdo79358, "fdo79358.odt") { // the boolean properties of the index were not exported properly -- cgit v1.2.3