summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
diff options
context:
space:
mode:
authorJoren De Cuyper <jorendc@libreoffice.org>2015-05-14 12:56:10 +0200
committerJoren De Cuyper <jorendc@libreoffice.org>2015-05-20 10:51:09 +0000
commit0db96caf0fcce09b87621c11b584a6d81cc7df86 (patch)
treed9b60047f2a1749a1db22ecef7259450bb897b28 /sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
parentfcc7ba441ec8e5116bbcc08c88b5ddb7c892c988 (diff)
tdf#76941 and tdf#87539: docx export image greyscale, watermark, black&white
Thanks to Miklos :) Change-Id: Ib6344ff654e39bf712d7071545573fb2ec525b63 Reviewed-on: https://gerrit.libreoffice.org/15733 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org>
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport7.cxx')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport7.cxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index 6dec1e137b11..03afe283e368 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -948,6 +948,36 @@ DECLARE_OOXMLEXPORT_TEST(testPictureWrapPolygon, "picture-wrap-polygon.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(11), aSeq.getLength());
}
+DECLARE_OOXMLEXPORT_TEST(testPictureColormodeGrayscale, "picture_colormode_grayscale.docx")
+{
+ // THe problem was that the grayscale was not exported
+ xmlDocPtr pXmlDoc = parseExport ("word/document.xml");
+ if (!pXmlDoc)
+ return;
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:grayscl", 1);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testPictureColormodeBlackWhite, "picture_colormode_black_white.odt")
+{
+ xmlDocPtr pXmlDoc = parseExport ("word/document.xml");
+ if (!pXmlDoc)
+ return;
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:anchor/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:biLevel", "thresh", "50000");
+}
+
+DECLARE_OOXMLEXPORT_TEST(testPictureColormodeWatermark, "picture_colormode_watermark.odt")
+{
+ xmlDocPtr pXmlDoc = parseExport ("word/document.xml");
+ if (!pXmlDoc)
+ return;
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:anchor/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:lum", "bright", "50000");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:drawing/wp:anchor/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:lum", "contrast", "-70000");
+}
+
+
DECLARE_OOXMLEXPORT_TEST(testExportShadow, "bnc637947.odt")
{
// The problem was that shadows of shapes from non-OOXML origin were not exported to DrawingML