diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-12-02 10:09:15 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-12-02 10:58:04 +0000 |
commit | 2d2329f441aa67e8be9f77dcfa3d048e50651357 (patch) | |
tree | 0b4d6c1f21ea1ffe15bffaee1f71eeb847043de0 /svx/source/svdraw/svdograf.cxx | |
parent | d596053eeebe04bce7d96b3fda698e9df96c1c3d (diff) |
coverity#1371200 Missing move assignment operator
adjust things to not need one
Change-Id: I1079f50d8813f86c4828be602687b4cbffe61415
Diffstat (limited to 'svx/source/svdraw/svdograf.cxx')
-rw-r--r-- | svx/source/svdraw/svdograf.cxx | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 90f91f11fbb7..0103498ca4af 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -1044,27 +1044,30 @@ GDIMetaFile SdrGrafObj::getMetafileFromEmbeddedSvg() const return aRetval; } -SdrObject* SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAddText ) const +GDIMetaFile SdrGrafObj::GetMetaFile(GraphicType &rGraphicType) const { - SdrObject* pRetval = nullptr; - GraphicType aGraphicType(GetGraphicType()); - GDIMetaFile aMtf; - - if(isEmbeddedSvg()) + if (isEmbeddedSvg()) { // Embedded Svg // There is currently no helper to create SdrObjects from primitives (even if I'm thinking // about writing one for some time). To get the roundtrip to SdrObjects it is necessary to // use the old converter path over the MetaFile mechanism. Create Metafile from Svg // primitives here pretty directly - aMtf = getMetafileFromEmbeddedSvg(); - aGraphicType = GraphicType::GdiMetafile; + rGraphicType = GraphicType::GdiMetafile; + return getMetafileFromEmbeddedSvg(); } - else if(GraphicType::GdiMetafile == aGraphicType) + else if (GraphicType::GdiMetafile == rGraphicType) { - aMtf = GetTransformedGraphic(SdrGrafObjTransformsAttrs::COLOR|SdrGrafObjTransformsAttrs::MIRROR).GetGDIMetaFile(); + return GetTransformedGraphic(SdrGrafObjTransformsAttrs::COLOR|SdrGrafObjTransformsAttrs::MIRROR).GetGDIMetaFile(); } + return GDIMetaFile(); +} +SdrObject* SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAddText ) const +{ + SdrObject* pRetval = nullptr; + GraphicType aGraphicType(GetGraphicType()); + GDIMetaFile aMtf(GetMetaFile(aGraphicType)); switch(aGraphicType) { case GraphicType::GdiMetafile: |