summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-09-19 12:51:00 +0200
committerAndras Timar <andras.timar@collabora.com>2018-09-21 09:41:56 +0200
commitdfeb0bacac04364737a52803b4b4732a58702d38 (patch)
tree39ee829b17504274bf27e2e9f88d72cff43ff2fd
parente0a8833a7cab82b802cac6c20ba8780da8344bf9 (diff)
tdf#118502 Fix loading of eps images with replacement graphic
Change-Id: Iaf9c8e2ed72115e1f82d2541ae2a1d4803795a46 Reviewed-on: https://gerrit.libreoffice.org/60752 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 088af44063c3e2d1d0e7744a9f9bd7b37ff58a75) Reviewed-on: https://gerrit.libreoffice.org/60768 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 005be0cd5ea4a16860ad595d03ab133daf709a33)
-rw-r--r--sw/qa/extras/odfexport/data/tdf118502.odtbin0 -> 76491 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx8
-rw-r--r--xmloff/source/core/xmlmultiimagehelper.cxx4
3 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/data/tdf118502.odt b/sw/qa/extras/odfexport/data/tdf118502.odt
new file mode 100644
index 000000000000..f006d607ac3b
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/tdf118502.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 4210486da39e..234a62b332d9 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -1790,6 +1790,14 @@ DECLARE_ODFEXPORT_TEST(testTdf77961, "tdf77961.odt")
CPPUNIT_ASSERT_EQUAL( false , getProperty<bool>(xStyle, "GridPrint"));
}
+DECLARE_ODFEXPORT_TEST(tdf118502, "tdf118502.odt")
+{
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ // Make sure the replacement graphic is still there
+ // (was gone because the original graphic was not recognized during load)
+ CPPUNIT_ASSERT(!getProperty<OUString>(xShape, "ReplacementGraphicURL").isEmpty());
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/xmloff/source/core/xmlmultiimagehelper.cxx b/xmloff/source/core/xmlmultiimagehelper.cxx
index 7213a5090f54..ccc92302ca7f 100644
--- a/xmloff/source/core/xmlmultiimagehelper.cxx
+++ b/xmloff/source/core/xmlmultiimagehelper.cxx
@@ -75,6 +75,10 @@ namespace
{
return 1020;
}
+ if(sMimeType == "image/x-eps")
+ {
+ return 1025;
+ }
if(sMimeType == "application/pdf")
{
return 1030;