summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-06-10 22:47:48 +0200
committerMichael Stahl <mstahl@redhat.com>2015-06-15 14:49:20 +0200
commit662ec2f1a7bc5472bd73b75f101786afa33dad7c (patch)
tree0e1d6aa6860f56845774fa84ba45e1efbdd71ced
parent3e4ed2fc59451177f34e0689ef15d869555912c5 (diff)
tdf#90640: add a unit test for this
Change-Id: I72aecb66d0de4ba2bc3a44f664aab8170ffb3d0f (cherry picked from commit dc4d9481f36a18db1dfe3b931780edbe32266e5f)
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index aeb72e524d1e..fbdd3c004846 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -184,6 +184,17 @@ DECLARE_ODFEXPORT_TEST(testFramebackgrounds, "framebackgrounds.odt")
CPPUNIT_ASSERT_EQUAL(sal_Bool(true), getProperty<sal_Bool>(xTextFrame, "FillBitmapTile"));
aGradientxTextFrame = getProperty<awt::Gradient>(xTextFrame, "FillTransparenceGradient");
CPPUNIT_ASSERT_EQUAL(css::awt::GradientStyle_LINEAR, aGradientxTextFrame.Style);
+
+ if (xmlDocPtr pXmlDoc = parseExport("content.xml"))
+ {
+ // check that there are 3 background-image elements
+ assertXPath(pXmlDoc, "//style:style[@style:parent-style-name='Frame' and @style:family='graphic']/style:graphic-properties[@draw:fill='bitmap']/style:background-image[@style:repeat='stretch']", 3);
+ // tdf#90640: check that one of them is 55% opaque
+ assertXPath(pXmlDoc, "//style:style[@style:parent-style-name='Frame' and @style:family='graphic']/style:graphic-properties[@draw:fill='bitmap' and @fo:background-color='transparent' and @draw:opacity='55%']/style:background-image[@style:repeat='stretch' and @draw:opacity='55%']", 1);
+ // tdf#90640: check that one of them is 43% opaque
+ // (emulated - hopefully not with rounding errors)
+ assertXPath(pXmlDoc, "//style:style[@style:parent-style-name='Frame' and @style:family='graphic']/style:graphic-properties[@draw:fill='bitmap' and @fo:background-color='transparent' and @draw:opacity-name='Transparency_20_1']/style:background-image[@style:repeat='stretch' and @draw:opacity='43%']", 1);
+ }
}
DECLARE_ODFEXPORT_TEST(testFdo38244, "fdo38244.odt")