summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/picture_colormode_black_white.odtbin0 -> 32725 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/picture_colormode_grayscale.docxbin0 -> 36515 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/picture_colormode_watermark.odtbin0 -> 32345 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport7.cxx30
4 files changed, 30 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/picture_colormode_black_white.odt b/sw/qa/extras/ooxmlexport/data/picture_colormode_black_white.odt
new file mode 100644
index 000000000000..b2166bdd36ce
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/picture_colormode_black_white.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/picture_colormode_grayscale.docx b/sw/qa/extras/ooxmlexport/data/picture_colormode_grayscale.docx
new file mode 100644
index 000000000000..2bc6458eda50
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/picture_colormode_grayscale.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/picture_colormode_watermark.odt b/sw/qa/extras/ooxmlexport/data/picture_colormode_watermark.odt
new file mode 100644
index 000000000000..70dd5e9089e2
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/picture_colormode_watermark.odt
Binary files differ
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