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 13:41:10 +0100 |
commit | 2d3023c9713c4c7cac732a6831c69dec581a7751 (patch) | |
tree | 660b3bf7b390f30b82c0747815bdfe8e6d153730 /sw | |
parent | 59e6230d1c2c71148309f2a292a4143e7bc0e3fc (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>
Diffstat (limited to 'sw')
-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 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) |