[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sw/qa xmloff/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Sep 20 08:19:31 UTC 2018


 sw/qa/extras/odfexport/data/tdf118502.odt  |binary
 sw/qa/extras/odfexport/odfexport.cxx       |   10 ++++++++++
 xmloff/source/core/xmlmultiimagehelper.cxx |    4 ++++
 3 files changed, 14 insertions(+)

New commits:
commit 3ba766a24187c6c1d27c005301dc30caf73d38fd
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Sep 19 12:51:00 2018 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Thu Sep 20 10:19:03 2018 +0200

    tdf#118502 Fix loading of eps images with replacement graphic
    
    Change-Id: Iaf9c8e2ed72115e1f82d2541ae2a1d4803795a46
    Reviewed-on: https://gerrit.libreoffice.org/60754
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    Tested-by: Jenkins

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
Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf118502.odt differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index e6f544da51c2..7ddb4d9af097 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2004,6 +2004,16 @@ DECLARE_ODFEXPORT_TEST(testSpellOutNumberingTypes, "spellout-numberingtypes.odt"
     }
 }
 
+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;


More information about the Libreoffice-commits mailing list