diff options
author | David Tardon <dtardon@redhat.com> | 2016-11-14 16:35:50 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2016-11-15 19:58:55 +0100 |
commit | 34ba29887fe2ad47c5a8663bbdc511d46ab732b2 (patch) | |
tree | f51dffbc87666baac7efa7e5fe47e12aa450fdcf /sd | |
parent | fix typo (diff) | |
download | core-34ba29887fe2ad47c5a8663bbdc511d46ab732b2.tar.gz core-34ba29887fe2ad47c5a8663bbdc511d46ab732b2.zip |
replace explicit delete and simplify
Change-Id: I750a965195aef32b29bb98725fd1c74c876b051d
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/unoidl/unoobj.cxx | 12 |
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; |