diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-12-01 15:16:18 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-12-04 15:14:28 +0100 |
commit | 4e8f20a5c2731f3aecffa515dc73a3fc071af6d6 (patch) | |
tree | 94601be5147ba8c50b6766047c9b7a5f24f63760 | |
parent | 3b12778af71951bfce321c73509e8b0c59b02853 (diff) |
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@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit 2d3023c9713c4c7cac732a6831c69dec581a7751)
Reviewed-on: https://gerrit.libreoffice.org/45800
-rw-r--r-- | sw/source/core/graphic/ndgrf.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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) |