[Libreoffice-commits] core.git: svx/source

Samuel Mehrbrodt Samuel.Mehrbrodt at cib.de
Fri Dec 1 01:21:36 UTC 2017


 svx/source/svdraw/svdograf.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 6b3cc69fd2b2de5ace68f2739eb383267d66f76f
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date:   Thu Nov 30 12:42:10 2017 +0100

    Related tdf#72966 Provide replacement graphic also for metafiles
    
    With this, SVM files are still written to ODF, but accompanied
    by a replacement png graphic.
    
    Change-Id: I2c949f100dd5197a10c741baa42ea740f3a1415a
    Reviewed-on: https://gerrit.libreoffice.org/45567
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Armin Le Grand <Armin.Le.Grand at cib.de>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index b0ce78c47607..bcc7473b6330 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -447,9 +447,10 @@ const GraphicObject* SdrGrafObj::GetReplacementGraphicObject() const
         {
             const_cast< SdrGrafObj* >(this)->mpReplacementGraphic = new GraphicObject(rVectorGraphicDataPtr->getReplacement());
         }
-        else if (pGraphic->GetGraphic().getPdfData().hasElements())
+        else if (pGraphic->GetGraphic().getPdfData().hasElements()
+                 || pGraphic->GetGraphic().GetType() == GraphicType::GdiMetafile)
         {
-            // Replacement graphic for bitmap + PDF is just the bitmap.
+            // Replacement graphic for PDF and metafiles is just the bitmap.
             const_cast<SdrGrafObj*>(this)->mpReplacementGraphic = new GraphicObject(pGraphic->GetGraphic().GetBitmapEx());
         }
         if (mpReplacementGraphic)


More information about the Libreoffice-commits mailing list