summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2016-11-14 16:35:50 +0100
committerDavid Tardon <dtardon@redhat.com>2016-11-15 19:58:55 +0100
commit34ba29887fe2ad47c5a8663bbdc511d46ab732b2 (patch)
treef51dffbc87666baac7efa7e5fe47e12aa450fdcf /sd/source
parent0d97ac5ae3e92b1b04339e60e66ca8cb41a19609 (diff)
replace explicit delete and simplify
Change-Id: I750a965195aef32b29bb98725fd1c74c876b051d
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 83db0e65488f..ac8f48433d12 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -19,6 +19,7 @@
#include <sal/config.h>
+#include <memory>
#include <utility>
#include <com/sun/star/style/XStyle.hpp>
@@ -904,15 +905,8 @@ bool SdXShape::IsEmptyPresObj() const
if( pTextObj == nullptr )
return true;
- OutlinerParaObject* pParaObj = pTextObj->GetEditOutlinerParaObject();
- if( pParaObj )
- {
- delete pParaObj;
- }
- else
- {
- return true;
- }
+ const std::unique_ptr<OutlinerParaObject> pParaObj(pTextObj->GetEditOutlinerParaObject());
+ return !pParaObj;
}
return false;