[Libreoffice-commits] core.git: editeng/source include/editeng
Noel Grandin
noel.grandin at collabora.co.uk
Mon Feb 5 06:52:49 UTC 2018
editeng/source/outliner/overflowingtxt.cxx | 6 ++----
include/editeng/overflowingtxt.hxx | 5 +++--
2 files changed, 5 insertions(+), 6 deletions(-)
New commits:
commit 12726ee86f9f6e1a03f0be0b2b3ade07a5402d01
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Jan 29 10:58:13 2018 +0200
loplugin:useuniqueptr in OFlowChainedText
Change-Id: I63f6242a41eddd36b9ebbef470faf9e5111b19f1
Reviewed-on: https://gerrit.libreoffice.org/49149
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx
index 72d70ca66b44..5577104b7f7e 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -158,16 +158,14 @@ OutlinerParaObject *OverflowingText::DeeplyMergeParaObject(Outliner *pOutl, Outl
OFlowChainedText::OFlowChainedText(Outliner const *pOutl, bool bIsDeepMerge)
{
- mpOverflowingTxt = pOutl->GetOverflowingText();
- mpNonOverflowingTxt = pOutl->GetNonOverflowingText();
+ mpOverflowingTxt.reset( pOutl->GetOverflowingText() );
+ mpNonOverflowingTxt.reset( pOutl->GetNonOverflowingText() );
mbIsDeepMerge = bIsDeepMerge;
}
OFlowChainedText::~OFlowChainedText()
{
- delete mpNonOverflowingTxt;
- delete mpOverflowingTxt;
}
diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx
index 0a84fd5f5e3a..19bf287995d5 100644
--- a/include/editeng/overflowingtxt.hxx
+++ b/include/editeng/overflowingtxt.hxx
@@ -25,6 +25,7 @@
#include <editeng/editdata.hxx>
#include <com/sun/star/uno/Reference.h>
+#include <memory>
namespace com { namespace sun { namespace star {
namespace datatransfer {
@@ -115,8 +116,8 @@ public:
bool IsLastParaInterrupted() const;
private:
- NonOverflowingText *mpNonOverflowingTxt;
- OverflowingText *mpOverflowingTxt;
+ std::unique_ptr<NonOverflowingText> mpNonOverflowingTxt;
+ std::unique_ptr<OverflowingText> mpOverflowingTxt;
bool mbIsDeepMerge;
};
More information about the Libreoffice-commits
mailing list