[Libreoffice-commits] core.git: include/svx svx/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Oct 5 09:01:34 UTC 2018


 include/svx/svdtext.hxx       |    2 +-
 svx/source/svdraw/svdtext.cxx |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 98193d35a60ca699d57033461abe43040c27b274
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Oct 4 14:38:44 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Oct 5 11:01:08 2018 +0200

    return std::unique_ptr from SdrText::RemoveOutlinerParaObject
    
    Change-Id: Id4833818b48a572b7fa4f3c5d7bba1bf9548a0fe
    Reviewed-on: https://gerrit.libreoffice.org/61398
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/svx/svdtext.hxx b/include/svx/svdtext.hxx
index 18f8d0bc7e00..c1343dad867a 100644
--- a/include/svx/svdtext.hxx
+++ b/include/svx/svdtext.hxx
@@ -64,7 +64,7 @@ public:
     SdrTextObj& GetObject() const { return mrObject; }
 
     /** returns the current OutlinerParaObject and removes it from this instance */
-    OutlinerParaObject* RemoveOutlinerParaObject();
+    std::unique_ptr<OutlinerParaObject> RemoveOutlinerParaObject();
 
     void dumpAsXml(struct _xmlTextWriter * pWriter) const;
 
diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx
index 4e7f20021975..44c84f490dbd 100644
--- a/svx/source/svdraw/svdtext.cxx
+++ b/svx/source/svdraw/svdtext.cxx
@@ -93,7 +93,7 @@ OutlinerParaObject* SdrText::GetOutlinerParaObject() const
 }
 
 /** returns the current OutlinerParaObject and removes it from this instance */
-OutlinerParaObject* SdrText::RemoveOutlinerParaObject()
+std::unique_ptr<OutlinerParaObject> SdrText::RemoveOutlinerParaObject()
 {
     // Update HitTestOutliner
     const SdrTextObj* pTestObj(mrObject.getSdrModelFromSdrObject().GetHitTestOutliner().GetTextObj());
@@ -103,7 +103,7 @@ OutlinerParaObject* SdrText::RemoveOutlinerParaObject()
         mrObject.getSdrModelFromSdrObject().GetHitTestOutliner().SetTextObj(nullptr);
     }
 
-    OutlinerParaObject* pOPO = mpOutlinerParaObject.release();
+    std::unique_ptr<OutlinerParaObject> pOPO = std::move(mpOutlinerParaObject);
     mbPortionInfoChecked = false;
 
     return pOPO;


More information about the Libreoffice-commits mailing list