summaryrefslogtreecommitdiff
path: root/sw/qa/extras/odfexport
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-08-25 23:29:18 +0200
committerMichael Stahl <mstahl@redhat.com>2015-08-26 23:00:34 +0200
commit25c50a71ffdf7c43f8f3dd10736188271cc75ef0 (patch)
treed118334afd7ff2d47810ce2621fc5f31584f0666 /sw/qa/extras/odfexport
parentf38f018053a43d1f7b473103e936abe2d4d8fa05 (diff)
related: tdf#92379: sw: backward compatible ODF export of overriding
... frame/paragraph backgrounds. If a style is set to have draw:fill="solid" and a derived style to draw:fill="none" then the derived one must have fo:background-color="transparent" to override the parent for old consumers like LO <= 4.3/AOO <= 4.1 that don't understand draw:fill. Change-Id: I5b56c7ace927338239195c6bfcfef1950544c8d2
Diffstat (limited to 'sw/qa/extras/odfexport')
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 956548c057a0..a18b3b336aa7 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -320,6 +320,15 @@ DECLARE_ODFEXPORT_TEST(testTdf92379, "tdf92379.fodt")
// CPPUNIT_ASSERT_EQUAL(sal_Int32(0xffffff), getProperty<sal_Int32>(xStyle32, "FillColor"));
// CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty<sal_Int16>(xStyle32, "FillTransparence"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x461900), getProperty<sal_Int32>(xStyle32, "CharColor"));
+
+ if (xmlDocPtr pXmlDoc = parseExport("styles.xml"))
+ {
+ // check that fo:background-color attribute is exported properly
+ assertXPath(pXmlDoc, "//style:style[@style:family='paragraph' and @style:display-name='Titre Avis expert']/style:paragraph-properties[@fo:background-color='#661900']", 1);
+ assertXPath(pXmlDoc, "//style:style[@style:family='paragraph' and @style:display-name='Avis expert questions']/style:paragraph-properties[@fo:background-color='transparent']", 1);
+ assertXPath(pXmlDoc, "//style:style[@style:family='paragraph' and @style:display-name='avis expert questions non cadres']/style:paragraph-properties[@fo:background-color='#801900']", 1);
+ assertXPath(pXmlDoc, "//style:style[@style:family='paragraph' and @style:display-name='Avis expert rXponses']/style:paragraph-properties[@fo:background-color='transparent']", 1);
+ }
}
DECLARE_ODFEXPORT_TEST(testFdo79358, "fdo79358.odt")