sw/source/core/graphic/ndgrf.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 2d3023c9713c4c7cac732a6831c69dec581a7751 Author: Samuel Mehrbrodt <samuel.mehrbr...@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 <c...@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 98426d77745f..1ad720d0d2d5 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -404,9 +404,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) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits