summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/mailmodel.cxx
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-06-05 00:14:37 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-06 07:11:27 +0000
commit3e2ce043daeb4ba470a64909765336e9bc931fd4 (patch)
tree1d7722e3214668534c56ae4bac8555aa21b643c1 /sfx2/source/dialog/mailmodel.cxx
parent353e5ea62ed6a273a3856bd1e3cb4d2380804e83 (diff)
tdf#89329: use unique_ptr for pImpl in mailmodelapi
Change-Id: I12a6cb23b938f0d9151fb90437956ddb9d63d66f Reviewed-on: https://gerrit.libreoffice.org/25907 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2/source/dialog/mailmodel.cxx')
-rw-r--r--sfx2/source/dialog/mailmodel.cxx20
1 files changed, 7 insertions, 13 deletions
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 3622c9fb7014..1522234ef25f 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -648,18 +648,12 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
return eRet;
}
-SfxMailModel::SfxMailModel() :
- mpToList ( nullptr ),
- mpCcList ( nullptr ),
- mpBccList ( nullptr )
+SfxMailModel::SfxMailModel()
{
}
SfxMailModel::~SfxMailModel()
{
- delete mpToList;
- delete mpCcList;
- delete mpBccList;
}
void SfxMailModel::AddAddress( const OUString& rAddress, AddressRole eRole )
@@ -672,22 +666,22 @@ void SfxMailModel::AddAddress( const OUString& rAddress, AddressRole eRole )
{
if ( !mpToList )
// create the list
- mpToList = new AddressList_Impl();
- pList = mpToList;
+ mpToList.reset(new AddressList_Impl);
+ pList = mpToList.get();
}
else if ( ROLE_CC == eRole )
{
if ( !mpCcList )
// create the list
- mpCcList = new AddressList_Impl();
- pList = mpCcList;
+ mpCcList.reset(new AddressList_Impl);
+ pList = mpCcList.get();
}
else if ( ROLE_BCC == eRole )
{
if ( !mpBccList )
// create the list
- mpBccList = new AddressList_Impl();
- pList = mpBccList;
+ mpBccList.reset(new AddressList_Impl);
+ pList = mpBccList.get();
}
else
{