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

Samuel Mehrbrodt Samuel.Mehrbrodt at cib.de
Mon Dec 4 14:15:08 UTC 2017


 sw/source/core/graphic/ndgrf.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 4e8f20a5c2731f3aecffa515dc73a3fc071af6d6
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date:   Fri Dec 1 15:16:18 2017 +0100

    Related tdf#72966 Provide replacement graphic also for metafiles
    
    In 6b3cc69fd2b2de5ace68f2739eb383267d66f76f this was done for draw images,
    this patch also implements this for Writer images.
    
    Change-Id: I54f8142c3d22e1a356aedbcf2daf9d7a9b049423
    Reviewed-on: https://gerrit.libreoffice.org/45673
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 2d3023c9713c4c7cac732a6831c69dec581a7751)
    Reviewed-on: https://gerrit.libreoffice.org/45800

diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 7ef061715ba8..412122fb4da9 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -403,9 +403,10 @@ const GraphicObject* SwGrfNode::GetReplacementGrfObj() const
         {
             const_cast< SwGrfNode* >(this)->mpReplacementGraphic = new GraphicObject(rVectorGraphicDataPtr->getReplacement());
         }
-        else if (GetGrfObj().GetGraphic().getPdfData().hasElements())
+        else if (GetGrfObj().GetGraphic().getPdfData().hasElements()
+                 || GetGrfObj().GetGraphic().GetType() == GraphicType::GdiMetafile)
         {
-            // This returns the bitmap, without the pdf data.
+            // Replacement graphic for PDF and metafiles is just the bitmap.
             const_cast<SwGrfNode*>(this)->mpReplacementGraphic = new GraphicObject(GetGrfObj().GetGraphic().GetBitmapEx());
         }
         if (mpReplacementGraphic)


More information about the Libreoffice-commits mailing list