summaryrefslogtreecommitdiff
path: root/svx/source/table/cell.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-02 10:39:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-05-03 08:24:45 +0200
commit12c0aaf4aea8cdd6fbabd4f04228fb40e0220067 (patch)
tree484b8304ac3e032c9a3b70b5eb8c64819ff6ce7a /svx/source/table/cell.cxx
parentc3a8dc07be1beeccbefb9242a1fd1f270cb531ba (diff)
loplugin:useuniqueptr in sdr::table::Cell
Change-Id: Iede820e3e6f3c6d079bab5d7addc1f587ec78104 Reviewed-on: https://gerrit.libreoffice.org/53758 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/table/cell.cxx')
-rw-r--r--svx/source/table/cell.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 5d8484944758..b1364f6d60ff 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -442,11 +442,7 @@ void Cell::dispose()
mxTable.clear();
}
- if( mpProperties )
- {
- delete mpProperties;
- mpProperties = nullptr;
- }
+ mpProperties.reset();
SetOutlinerParaObject( nullptr );
}
@@ -818,7 +814,7 @@ sdr::properties::TextProperties* Cell::CloneProperties( sdr::properties::TextPro
sdr::properties::TextProperties* Cell::CloneProperties( SdrObject& rNewObj, Cell& rNewCell )
{
- return CloneProperties(mpProperties,rNewObj,rNewCell);
+ return CloneProperties(mpProperties.get(),rNewObj,rNewCell);
}
@@ -1563,8 +1559,7 @@ Any SAL_CALL Cell::getPropertyDefault( const OUString& aPropertyName )
void SAL_CALL Cell::setAllPropertiesToDefault()
{
- delete mpProperties;
- mpProperties = new sdr::properties::CellProperties( static_cast< SdrTableObj& >( GetObject() ), this );
+ mpProperties.reset(new sdr::properties::CellProperties( static_cast< SdrTableObj& >( GetObject() ), this ));
SdrOutliner& rOutliner = GetObject().ImpGetDrawOutliner();