[Libreoffice-commits] core.git: include/svx svx/source
Noel (via logerrit)
logerrit at kemper.freedesktop.org
Tue Feb 2 15:03:11 UTC 2021
include/svx/svdedtv.hxx | 2 +-
svx/source/svdraw/svdedtv2.cxx | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 2ec1dab4693cd45b475f02452114dd96ec0bda1b
Author: Noel <noel.grandin at collabora.co.uk>
AuthorDate: Tue Feb 2 13:24:24 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Feb 2 16:02:29 2021 +0100
use unique_ptr in SdrEditView::ImpConvertOneObj
Change-Id: I18a796291f4c2f3b203940f474e2785580bf7d1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110291
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index 560f4cf19fa5..916fdaeb186b 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -125,7 +125,7 @@ protected:
// converts an object, when positive it removes the old one from its List
// and inserts the new one instead. including Undo.
// Nor MarkEntry nor ModelChgBroadcast is created.
- SdrObject* ImpConvertOneObj(SdrObject* pObj, bool bPath, bool bLineToArea);
+ SdrObjectUniquePtr ImpConvertOneObj(SdrObject* pObj, bool bPath, bool bLineToArea);
// set both flags: bToTopPossible and bToBtmPossible.
// bToTopPossibleDirty and bToBtmPossibleDirty are reset at the same time
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 9dd795bb632b..06cf4cdc06d3 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1971,7 +1971,7 @@ void SdrEditView::UnGroupMarked()
// ConvertToPoly
-SdrObject* SdrEditView::ImpConvertOneObj(SdrObject* pObj, bool bPath, bool bLineToArea)
+SdrObjectUniquePtr SdrEditView::ImpConvertOneObj(SdrObject* pObj, bool bPath, bool bLineToArea)
{
SdrObjectUniquePtr pNewObj = pObj->ConvertToPolyObj(bPath, bLineToArea);
if (pNewObj)
@@ -1986,7 +1986,7 @@ SdrObject* SdrEditView::ImpConvertOneObj(SdrObject* pObj, bool bPath, bool bLine
if( !bUndo )
SdrObject::Free(pObj);
}
- return pNewObj.release();
+ return pNewObj;
}
void SdrEditView::ImpConvertTo(bool bPath, bool bLineToArea)
@@ -2030,10 +2030,10 @@ void SdrEditView::ImpConvertTo(bool bPath, bool bLineToArea)
ImpConvertOneObj(pObj,bPath,bLineToArea);
}
} else {
- SdrObject* pNewObj=ImpConvertOneObj(pObj,bPath,bLineToArea);
+ SdrObjectUniquePtr pNewObj=ImpConvertOneObj(pObj,bPath,bLineToArea);
if (pNewObj!=nullptr) {
bMrkChg=true;
- GetMarkedObjectListWriteAccess().ReplaceMark(SdrMark(pNewObj,pPV),nm);
+ GetMarkedObjectListWriteAccess().ReplaceMark(SdrMark(pNewObj.release(),pPV),nm);
}
}
}
More information about the Libreoffice-commits
mailing list