diff options
author | Noel Grandin <noel@peralex.com> | 2021-02-08 14:54:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-09 07:41:46 +0100 |
commit | 80ad69dc67fa0bfaf6f99cd0b5a458dcaaee6e33 (patch) | |
tree | 253763c6f32fb12a182d3a3b2e2a13f9f0c3b091 /sc | |
parent | dae4b159f628915e1ab8841e6bb66961ce4ea800 (diff) |
return by unique_ptr from NewGeoData
Change-Id: Iab806959d79ce828069cb16b6a7883981d85dfaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110579
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/html/htmlexp2.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx index 3ec4796e102b..5a8caec39eca 100644 --- a/sc/source/filter/html/htmlexp2.cxx +++ b/sc/source/filter/html/htmlexp2.cxx @@ -132,7 +132,7 @@ void ScHTMLExport::WriteGraphEntry( ScHTMLGraphEntry* pE ) case OBJ_GRAF: { const SdrGrafObj* pSGO = static_cast<SdrGrafObj*>(pObject); - const SdrGrafObjGeoData* pGeo = static_cast<SdrGrafObjGeoData*>(pSGO->GetGeoData()); + std::unique_ptr<SdrGrafObjGeoData> pGeo(static_cast<SdrGrafObjGeoData*>(pSGO->GetGeoData().release())); sal_uInt16 nMirrorCase = (pGeo->aGeo.nRotationAngle == 18000_deg100 ? ( pGeo->bMirrored ? 3 : 4 ) : ( pGeo->bMirrored ? 2 : 1 )); bool bHMirr = ( ( nMirrorCase == 2 ) || ( nMirrorCase == 4 ) ); diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 9ff4d37195b5..171d36e02ffb 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3493,7 +3493,7 @@ void ScXMLExport::WriteShapes(const ScMyCell& rMyCell) bool bNeedsRestore = false; SdrObject* pObj = GetSdrObjectFromXShape(rShape.xShape); // Remember original geometry - SdrObjGeoData* pGeoData = nullptr; + std::unique_ptr<SdrObjGeoData> pGeoData; if (pObj) pGeoData = pObj->GetGeoData(); |