summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2017-07-01 20:30:43 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2017-07-08 09:27:32 +0200
commit3340ce30562832b584dd0576d9e0733aa03d867f (patch)
treeda2b1d859fefca6bd0d93480d11855ff2de0486d /sw/qa/extras/ooxmlimport
parent7b4f4f15971047664fa278fff96b959d53b272b3 (diff)
tdf#108545 show an icon (DOCX inside DOCX)
If DrawAspect is equal "Icon", show an icon not document preview Document is opened in the separate window, not in-place. Change-Id: I3a8d81e7340b29d247f8ac440c06b0420bb65644 Reviewed-on: https://gerrit.libreoffice.org/39440 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sw/qa/extras/ooxmlimport')
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf108545_embeddedDocxIcon.docxbin0 -> 28843 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx12
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf108545_embeddedDocxIcon.docx b/sw/qa/extras/ooxmlimport/data/tdf108545_embeddedDocxIcon.docx
new file mode 100644
index 000000000000..2e5429ce71b9
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf108545_embeddedDocxIcon.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 817c065f4e95..0ff3f1cdc71a 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1382,6 +1382,18 @@ DECLARE_OOXMLIMPORT_TEST(testTdf108995, "xml_space.docx")
paragraph->getString());
}
+#if defined(_WIN32)
+DECLARE_OOXMLIMPORT_TEST(testTdf108545_embeddedDocxIcon, "tdf108545_embeddedDocxIcon.docx")
+{
+ // Check if document shows an icon for embedded docx document
+ // Due to different fonts used for icon labels on each OS, current checksum is for Windows only
+ uno::Reference<document::XEmbeddedObjectSupplier2> xSupplier(getShape(1), uno::UNO_QUERY);
+ uno::Reference<graphic::XGraphic> xGraphic = xSupplier->getReplacementGraphic();
+ Graphic aGraphic(xGraphic);
+ CPPUNIT_ASSERT_EQUAL(BitmapChecksum(SAL_CONST_UINT64(733876873106730813)), aGraphic.GetChecksum());
+}
+#endif
+
// tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT
CPPUNIT_PLUGIN_IMPLEMENT();