[Libreoffice-commits] core.git: include/svx sc/source svx/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue Feb 9 06:42:34 UTC 2021
include/svx/obj3d.hxx | 2 +-
include/svx/scene3d.hxx | 2 +-
include/svx/svdoashp.hxx | 2 +-
include/svx/svdobj.hxx | 7 +++----
include/svx/svdocapt.hxx | 2 +-
include/svx/svdocirc.hxx | 2 +-
include/svx/svdoedge.hxx | 2 +-
include/svx/svdograf.hxx | 2 +-
include/svx/svdomeas.hxx | 2 +-
include/svx/svdopath.hxx | 2 +-
include/svx/svdotable.hxx | 2 +-
include/svx/svdotext.hxx | 2 +-
include/svx/svdovirt.hxx | 4 ++--
sc/source/filter/html/htmlexp2.cxx | 2 +-
sc/source/filter/xml/xmlexprt.cxx | 2 +-
svx/source/engine3d/obj3d.cxx | 4 ++--
svx/source/engine3d/scene3d.cxx | 4 ++--
svx/source/sdr/misc/ImageMapInfo.cxx | 2 +-
svx/source/svdraw/svdoashp.cxx | 4 ++--
svx/source/svdraw/svdobj.cxx | 8 ++++----
svx/source/svdraw/svdocapt.cxx | 4 ++--
svx/source/svdraw/svdocirc.cxx | 4 ++--
svx/source/svdraw/svdoedge.cxx | 4 ++--
svx/source/svdraw/svdograf.cxx | 4 ++--
svx/source/svdraw/svdomeas.cxx | 4 ++--
svx/source/svdraw/svdopath.cxx | 4 ++--
svx/source/svdraw/svdotext.cxx | 4 ++--
svx/source/svdraw/svdovirt.cxx | 4 ++--
svx/source/svdraw/svdundo.cxx | 6 +++---
svx/source/table/svdotable.cxx | 4 ++--
30 files changed, 50 insertions(+), 51 deletions(-)
New commits:
commit 80ad69dc67fa0bfaf6f99cd0b5a458dcaaee6e33
Author: Noel Grandin <noel at peralex.com>
AuthorDate: Mon Feb 8 14:54:50 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Feb 9 07:41:46 2021 +0100
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 at collabora.co.uk>
diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx
index e786cbbfbcbd..4455711779af 100644
--- a/include/svx/obj3d.hxx
+++ b/include/svx/obj3d.hxx
@@ -127,7 +127,7 @@ public:
virtual E3dObject* CloneSdrObject(SdrModel& rTargetModel) const override;
E3dObject& operator=( const E3dObject& rObj );
- virtual SdrObjGeoData *NewGeoData() const override;
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx
index 13d4157d3449..680cd0717d84 100644
--- a/include/svx/scene3d.hxx
+++ b/include/svx/scene3d.hxx
@@ -130,7 +130,7 @@ public:
virtual E3dScene* CloneSdrObject(SdrModel& rTargetModel) const override;
E3dScene& operator=(const E3dScene&);
- virtual SdrObjGeoData *NewGeoData() const override;
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx
index 070cb2111dfd..e73ecf58ac97 100644
--- a/include/svx/svdoashp.hxx
+++ b/include/svx/svdoashp.hxx
@@ -228,7 +228,7 @@ public:
// react on model/page change
virtual void handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage) override;
- virtual SdrObjGeoData *NewGeoData() const override;
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
virtual void SaveGeoData(SdrObjGeoData &rGeo) const override;
virtual void RestGeoData(const SdrObjGeoData &rGeo) override;
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index a944345eac99..bf70559ebdf4 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -1,4 +1,3 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
@@ -172,7 +171,7 @@ public:
/**
* All geometrical data of an arbitrary object for use in undo/redo
*/
-class SAL_DLLPUBLIC_RTTI SdrObjGeoData
+class SVXCORE_DLLPUBLIC SdrObjGeoData
{
public:
tools::Rectangle aBoundRect;
@@ -600,7 +599,7 @@ public:
virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i);
// get all geometrical data for undo/redo
- virtual SdrObjGeoData* GetGeoData() const;
+ virtual std::unique_ptr<SdrObjGeoData> GetGeoData() const;
virtual void SetGeoData(const SdrObjGeoData& rGeo);
// ItemSet access
@@ -920,7 +919,7 @@ protected:
/// data that must be saved for Undo.
/// NewGeoData() creates an empty instance of a class derived from
/// SdrObjGeoData.
- virtual SdrObjGeoData* NewGeoData() const;
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const;
virtual void SaveGeoData(SdrObjGeoData& rGeo) const;
virtual void RestGeoData(const SdrObjGeoData& rGeo);
diff --git a/include/svx/svdocapt.hxx b/include/svx/svdocapt.hxx
index c313fb9a1bb4..ee856c32364a 100644
--- a/include/svx/svdocapt.hxx
+++ b/include/svx/svdocapt.hxx
@@ -132,7 +132,7 @@ public:
virtual Point GetSnapPoint(sal_uInt32 i) const override;
private:
- virtual SdrObjGeoData* NewGeoData() const override;
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
diff --git a/include/svx/svdocirc.hxx b/include/svx/svdocirc.hxx
index 32ecc1f661b0..cd573323a94d 100644
--- a/include/svx/svdocirc.hxx
+++ b/include/svx/svdocirc.hxx
@@ -133,7 +133,7 @@ public:
virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
private:
- virtual SdrObjGeoData* NewGeoData() const override;
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
public:
diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx
index 0bda2fece64d..b19c5514429b 100644
--- a/include/svx/svdoedge.hxx
+++ b/include/svx/svdoedge.hxx
@@ -265,7 +265,7 @@ public:
virtual Point GetPoint(sal_uInt32 i) const override;
virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i) override;
- virtual SdrObjGeoData* NewGeoData() const override;
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx
index 27f38203edbe..9a6d06267aa5 100644
--- a/include/svx/svdograf.hxx
+++ b/include/svx/svdograf.hxx
@@ -184,7 +184,7 @@ public:
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
- virtual SdrObjGeoData* NewGeoData() const override;
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
diff --git a/include/svx/svdomeas.hxx b/include/svx/svdomeas.hxx
index ccc7d2a2f16b..599104e937b8 100644
--- a/include/svx/svdomeas.hxx
+++ b/include/svx/svdomeas.hxx
@@ -68,7 +68,7 @@ protected:
void SetTextDirty() { bTextDirty=true; SetTextSizeDirty(); if (!aOutRect.IsEmpty()) { SetBoundRectDirty(); SetRectsDirty(true); } }
void UndirtyText() const;
- virtual SdrObjGeoData* NewGeoData() const override;
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
diff --git a/include/svx/svdopath.hxx b/include/svx/svdopath.hxx
index f1a5b1b2b2aa..f8360d178f71 100644
--- a/include/svx/svdopath.hxx
+++ b/include/svx/svdopath.hxx
@@ -128,7 +128,7 @@ public:
SdrObject* RipPoint(sal_uInt32 nHdlNum, sal_uInt32& rNewPt0Index);
private:
- virtual SdrObjGeoData* NewGeoData() const override;
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx
index 98b9229df404..2f0b284d4394 100644
--- a/include/svx/svdotable.hxx
+++ b/include/svx/svdotable.hxx
@@ -266,7 +266,7 @@ private:
virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override;
- virtual SdrObjGeoData* NewGeoData() const override;
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index fc7a817b543a..ed9cd61ad1f8 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -290,7 +290,7 @@ protected:
// rAnchorRect is InOut-Parameter!
void ImpSetContourPolygon( SdrOutliner& rOutliner, tools::Rectangle const & rAnchorRect, bool bLineWidth ) const;
- virtual SdrObjGeoData* NewGeoData() const override;
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
void NbcSetEckenradius(tools::Long nRad);
diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx
index 12cd04095517..eade82c13c42 100644
--- a/include/svx/svdovirt.hxx
+++ b/include/svx/svdovirt.hxx
@@ -43,7 +43,7 @@ protected:
protected:
virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
- virtual SdrObjGeoData* NewGeoData() const override;
+ virtual std::unique_ptr<SdrObjGeoData> NewGeoData() const override;
virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
@@ -131,7 +131,7 @@ public:
virtual Point GetPoint(sal_uInt32 i) const override;
virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i) override;
- virtual SdrObjGeoData* GetGeoData() const override;
+ virtual std::unique_ptr<SdrObjGeoData> GetGeoData() const override;
virtual void SetGeoData(const SdrObjGeoData& rGeo) override;
virtual void NbcReformatText() override;
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();
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx
index dac98b2d0fd6..b5e679ab09fc 100644
--- a/svx/source/engine3d/obj3d.cxx
+++ b/svx/source/engine3d/obj3d.cxx
@@ -407,9 +407,9 @@ E3dObject& E3dObject::operator=(const E3dObject& rSource)
return *this;
}
-SdrObjGeoData *E3dObject::NewGeoData() const
+std::unique_ptr<SdrObjGeoData> E3dObject::NewGeoData() const
{
- return new E3DObjGeoData;
+ return std::make_unique<E3DObjGeoData>();
}
void E3dObject::SaveGeoData(SdrObjGeoData& rGeo) const
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index 788763536c81..a71f74f0784f 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -497,9 +497,9 @@ void E3dScene::RebuildLists()
ImpCleanup3DDepthMapper();
}
-SdrObjGeoData *E3dScene::NewGeoData() const
+std::unique_ptr<SdrObjGeoData> E3dScene::NewGeoData() const
{
- return new E3DSceneGeoData;
+ return std::make_unique<E3DSceneGeoData>();
}
void E3dScene::SaveGeoData(SdrObjGeoData& rGeo) const
diff --git a/svx/source/sdr/misc/ImageMapInfo.cxx b/svx/source/sdr/misc/ImageMapInfo.cxx
index d0c78bf911d4..8612357fdc99 100644
--- a/svx/source/sdr/misc/ImageMapInfo.cxx
+++ b/svx/source/sdr/misc/ImageMapInfo.cxx
@@ -74,7 +74,7 @@ IMapObject* SvxIMapInfo::GetHitIMapObject(const SdrObject* pObj, const Point& rW
{
const GeoStat& rGeo = pGrafObj->GetGeoStat();
std::unique_ptr<SdrGrafObjGeoData> pGeoData(
- static_cast<SdrGrafObjGeoData*>(pGrafObj->GetGeoData()));
+ static_cast<SdrGrafObjGeoData*>(pGrafObj->GetGeoData().release()));
// Undo rotation
if (rGeo.nRotationAngle)
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index fbe2b0a6b948..2ddd696749af 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -2874,9 +2874,9 @@ void SdrObjCustomShape::handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage)
}
}
-SdrObjGeoData* SdrObjCustomShape::NewGeoData() const
+std::unique_ptr<SdrObjGeoData> SdrObjCustomShape::NewGeoData() const
{
- return new SdrAShapeObjGeoData;
+ return std::make_unique<SdrAShapeObjGeoData>();
}
void SdrObjCustomShape::SaveGeoData(SdrObjGeoData& rGeo) const
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 02cc13ccd7be..9bfdee8d4866 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1820,9 +1820,9 @@ bool SdrObject::IsMacroHit(const SdrObjMacroHitRec& rRec) const
}
-SdrObjGeoData* SdrObject::NewGeoData() const
+std::unique_ptr<SdrObjGeoData> SdrObject::NewGeoData() const
{
- return new SdrObjGeoData;
+ return std::make_unique<SdrObjGeoData>();
}
void SdrObject::SaveGeoData(SdrObjGeoData& rGeo) const
@@ -1875,9 +1875,9 @@ void SdrObject::RestGeoData(const SdrObjGeoData& rGeo)
}
}
-SdrObjGeoData* SdrObject::GetGeoData() const
+std::unique_ptr<SdrObjGeoData> SdrObject::GetGeoData() const
{
- SdrObjGeoData* pGeo=NewGeoData();
+ std::unique_ptr<SdrObjGeoData> pGeo = NewGeoData();
SaveGeoData(*pGeo);
return pGeo;
}
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index 1773901490e3..0b9fb91a8627 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -659,9 +659,9 @@ void SdrCaptionObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
ImpRecalcTail();
}
-SdrObjGeoData* SdrCaptionObj::NewGeoData() const
+std::unique_ptr<SdrObjGeoData> SdrCaptionObj::NewGeoData() const
{
- return new SdrCaptObjGeoData;
+ return std::make_unique<SdrCaptObjGeoData>();
}
void SdrCaptionObj::SaveGeoData(SdrObjGeoData& rGeo) const
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index ea000f66f5ca..4edd86c22a49 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -947,9 +947,9 @@ void SdrCircObj::NbcMirror(const Point& rRef1, const Point& rRef2)
ImpSetCircInfoToAttr();
}
-SdrObjGeoData* SdrCircObj::NewGeoData() const
+std::unique_ptr<SdrObjGeoData> SdrCircObj::NewGeoData() const
{
- return new SdrCircObjGeoData;
+ return std::make_unique<SdrCircObjGeoData>();
}
void SdrCircObj::SaveGeoData(SdrObjGeoData& rGeo) const
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 3e164e216f03..093b384ce4c1 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -2455,9 +2455,9 @@ SdrEdgeObjGeoData::~SdrEdgeObjGeoData()
{
}
-SdrObjGeoData* SdrEdgeObj::NewGeoData() const
+std::unique_ptr<SdrObjGeoData> SdrEdgeObj::NewGeoData() const
{
- return new SdrEdgeObjGeoData;
+ return std::make_unique<SdrEdgeObjGeoData>();
}
void SdrEdgeObj::SaveGeoData(SdrObjGeoData& rGeo) const
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index f56bad94ab71..cb80f67e8035 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -790,9 +790,9 @@ void SdrGrafObj::NbcMirror(const Point& rRef1, const Point& rRef2)
bMirrored = !bMirrored;
}
-SdrObjGeoData* SdrGrafObj::NewGeoData() const
+std::unique_ptr<SdrObjGeoData> SdrGrafObj::NewGeoData() const
{
- return new SdrGrafObjGeoData;
+ return std::make_unique<SdrGrafObjGeoData>();
}
void SdrGrafObj::SaveGeoData(SdrObjGeoData& rGeo) const
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index 8464d2f86b6e..3f98c71eae20 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -1109,9 +1109,9 @@ void SdrMeasureObj::NbcSetPoint(const Point& rPnt, sal_uInt32 i)
SetTextDirty();
}
-SdrObjGeoData* SdrMeasureObj::NewGeoData() const
+std::unique_ptr<SdrObjGeoData> SdrMeasureObj::NewGeoData() const
{
- return new SdrMeasureObjGeoData;
+ return std::make_unique<SdrMeasureObjGeoData>();
}
void SdrMeasureObj::SaveGeoData(SdrObjGeoData& rGeo) const
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index c9e4a55071a3..e42ebceb872a 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -2703,9 +2703,9 @@ SdrObjectUniquePtr SdrPathObj::DoConvertToPolyObj(bool bBezier, bool bAddText) c
return pRet;
}
-SdrObjGeoData* SdrPathObj::NewGeoData() const
+std::unique_ptr<SdrObjGeoData> SdrPathObj::NewGeoData() const
{
- return new SdrPathObjGeoData;
+ return std::make_unique<SdrPathObjGeoData>();
}
void SdrPathObj::SaveGeoData(SdrObjGeoData& rGeo) const
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 7ffc95af16c4..2d4627cc43ac 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1432,9 +1432,9 @@ void SdrTextObj::NbcReformatText()
GetViewContact().flushViewObjectContacts(false);
}
-SdrObjGeoData* SdrTextObj::NewGeoData() const
+std::unique_ptr<SdrObjGeoData> SdrTextObj::NewGeoData() const
{
- return new SdrTextObjGeoData;
+ return std::make_unique<SdrTextObjGeoData>();
}
void SdrTextObj::SaveGeoData(SdrObjGeoData& rGeo) const
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index ebd37b988cfa..06fa3c884f2e 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -479,7 +479,7 @@ void SdrVirtObj::NbcSetPoint(const Point& rPnt, sal_uInt32 i)
}
-SdrObjGeoData* SdrVirtObj::NewGeoData() const
+std::unique_ptr<SdrObjGeoData> SdrVirtObj::NewGeoData() const
{
return rRefObj.NewGeoData();
}
@@ -496,7 +496,7 @@ void SdrVirtObj::RestGeoData(const SdrObjGeoData& rGeo)
}
-SdrObjGeoData* SdrVirtObj::GetGeoData() const
+std::unique_ptr<SdrObjGeoData> SdrVirtObj::GetGeoData() const
{
return rRefObj.GetGeoData();
}
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index f27f9e0493a2..6db2076a5589 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -567,7 +567,7 @@ SdrUndoGeoObj::SdrUndoGeoObj(SdrObject& rNewObj)
}
else
{
- pUndoGeo.reset(pObj->GetGeoData());
+ pUndoGeo = pObj->GetGeoData();
}
}
@@ -592,7 +592,7 @@ void SdrUndoGeoObj::Undo()
}
else
{
- pRedoGeo.reset(pObj->GetGeoData());
+ pRedoGeo = pObj->GetGeoData();
auto pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pObj);
if (pTableObj && mbSkipChangeLayout)
@@ -614,7 +614,7 @@ void SdrUndoGeoObj::Redo()
}
else
{
- pUndoGeo.reset(pObj->GetGeoData());
+ pUndoGeo = pObj->GetGeoData();
pObj->SetGeoData(*pRedoGeo);
}
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 23b3ab802859..9357d7b32202 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -2370,9 +2370,9 @@ void SdrTableObj::createCell( CellRef& xNewCell )
}
-SdrObjGeoData *SdrTableObj::NewGeoData() const
+std::unique_ptr<SdrObjGeoData> SdrTableObj::NewGeoData() const
{
- return new TableObjectGeoData;
+ return std::make_unique<TableObjectGeoData>();
}
More information about the Libreoffice-commits
mailing list