summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-09-19 12:51:00 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-09-20 14:10:46 +0200
commit005be0cd5ea4a16860ad595d03ab133daf709a33 (patch)
tree16661d0eb1145d8a577b828f467a8fef431a1b16
parent4a63deaebf99d92525ff9c4349792c6ab9d5e5a7 (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>
-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 f26810175cd3..9aaa1c53c020 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -1770,6 +1770,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;