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-10 22:48:49 +0200
commitdc4d9481f36a18db1dfe3b931780edbe32266e5f (patch)
tree3c01dff434d9866defff1a4c848b6263bca61d92
parentf222de1de0f4be3ee01162aa3c62ca928dc8476f (diff)
tdf#90640: add a unit test for this
Change-Id: I72aecb66d0de4ba2bc3a44f664aab8170ffb3d0f
-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 9960e4929704..68c0e5a1c2b9 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(true, getProperty<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")