summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-11-30 12:42:10 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-12-04 09:19:08 +0100
commitf6ce8116b14892e26549c2dc2d59044a961c1dff (patch)
tree086fbc792ffc53818075acc77655562b6839c285 /svx/source
parentb198912e679102404e884379919fec6d530af107 (diff)
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@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-on: https://gerrit.libreoffice.org/45677 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/svdraw/svdograf.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index ea8701929a88..3eb3abfe0953 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -438,9 +438,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)