summaryrefslogtreecommitdiff
path: root/sc/source/ui/optdlg
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-19 12:07:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-20 08:59:26 +0200
commita0f0863dc7d251f6112d59c34e8851ee41ba47d8 (patch)
treea31f21038f7202ddd24f764f5141b0bcc905f334 /sc/source/ui/optdlg
parent8caf5129d46d1ebfdd66ebe4dd3d8463ad1aa035 (diff)
loplugin:useuniqueptr in ScTpUserLists
Change-Id: I15f30f655d409e3570bb33aa032f809263d3035b Reviewed-on: https://gerrit.libreoffice.org/57751 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/optdlg')
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 5f7734c483f6..6b13e971cc1b 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -53,7 +53,6 @@ ScTpUserLists::ScTpUserLists( vcl::Window* pParent,
aStrCopyFrom ( ScResId( STR_COPYFROM ) ),
aStrCopyErr ( ScResId( STR_COPYERR ) ),
nWhichUserLists ( GetWhich( SID_SCUSERLISTS ) ),
- pUserLists ( nullptr ),
pDoc ( nullptr ),
pViewData ( nullptr ),
bModifyMode ( false ),
@@ -86,7 +85,7 @@ ScTpUserLists::~ScTpUserLists()
void ScTpUserLists::dispose()
{
- delete pUserLists;
+ pUserLists.reset();
mpFtLists.clear();
mpLbLists.clear();
mpFtEntries.clear();
@@ -165,7 +164,7 @@ void ScTpUserLists::Reset( const SfxItemSet* rCoreAttrs )
if ( pCoreList )
{
if ( !pUserLists )
- pUserLists = new ScUserList( *pCoreList );
+ pUserLists.reset( new ScUserList( *pCoreList ) );
else
*pUserLists = *pCoreList;
@@ -176,7 +175,7 @@ void ScTpUserLists::Reset( const SfxItemSet* rCoreAttrs )
}
}
else if ( !pUserLists )
- pUserLists = new ScUserList;
+ pUserLists.reset( new ScUserList );
mpEdCopyFrom->SetText( aStrSelectedArea );
@@ -336,7 +335,7 @@ void ScTpUserLists::AddNewList( const OUString& rEntriesStr )
OUString theEntriesStr( rEntriesStr );
if ( !pUserLists )
- pUserLists = new ScUserList;
+ pUserLists.reset( new ScUserList );
MakeListStr( theEntriesStr );