diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-09-19 12:51:00 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-09-19 15:04:05 +0200 |
commit | 088af44063c3e2d1d0e7744a9f9bd7b37ff58a75 (patch) | |
tree | 637d2071e1e1106ed84e70da2aff53c0aab0d28a | |
parent | 8c7e64cd3854a912ef33b5a717a9f36856925c7c (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>
-rw-r--r-- | sw/qa/extras/odfexport/data/tdf118502.odt | bin | 0 -> 76491 bytes | |||
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 10 | ||||
-rw-r--r-- | xmloff/source/core/xmlmultiimagehelper.cxx | 4 |
3 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/data/tdf118502.odt b/sw/qa/extras/odfexport/data/tdf118502.odt Binary files differnew file mode 100644 index 000000000000..f006d607ac3b --- /dev/null +++ b/sw/qa/extras/odfexport/data/tdf118502.odt diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 4727f2266750..e130d754b9d2 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -2113,6 +2113,16 @@ DECLARE_ODFEXPORT_TEST(tdf101856, "tdf101856.odt") CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xBookmark5, UNO_NAME_BOOKMARK_HIDDEN)); } +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) + auto xReplacementGraphic + = getProperty<uno::Reference<graphic::XGraphic>>(xShape, "ReplacementGraphic"); + CPPUNIT_ASSERT(xReplacementGraphic.is()); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/xmloff/source/core/xmlmultiimagehelper.cxx b/xmloff/source/core/xmlmultiimagehelper.cxx index 474e796c9ad8..36b65fdd7449 100644 --- a/xmloff/source/core/xmlmultiimagehelper.cxx +++ b/xmloff/source/core/xmlmultiimagehelper.cxx @@ -74,6 +74,10 @@ namespace { return 1020; } + if (rMimeType == "image/x-eps") + { + return 1025; + } if (rMimeType == "application/pdf") { return 1030; |