[Libreoffice-commits] core.git: sd/source
Noel Grandin
noel.grandin at collabora.co.uk
Wed Jun 27 09:14:37 UTC 2018
sd/source/ui/dlg/dlgolbul.cxx | 6 +++---
sd/source/ui/dlg/prltempl.cxx | 6 +++---
sd/source/ui/inc/OutlineBulletDlg.hxx | 2 +-
sd/source/ui/inc/prltempl.hxx | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
New commits:
commit add887972d9ad5e37a69196581e833a51566b9be
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Jun 25 17:10:22 2018 +0200
loplugin:useuniqueptr in OutlineBulletDlg and SdPresLayoutTemplateDlg
Change-Id: I4bd0a9dd7be5b6ad7c1307f73c89ab0ee915ce9f
Reviewed-on: https://gerrit.libreoffice.org/56495
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx
index a054f281639c..d169853c9ac1 100644
--- a/sd/source/ui/dlg/dlgolbul.cxx
+++ b/sd/source/ui/dlg/dlgolbul.cxx
@@ -59,7 +59,7 @@ OutlineBulletDlg::OutlineBulletDlg(
aInputSet.MergeRange( SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL );
aInputSet.Put( *pAttr );
- pOutputSet = new SfxItemSet( *pAttr );
+ pOutputSet.reset( new SfxItemSet( *pAttr ) );
pOutputSet->ClearItem();
bool bOutliner = false;
@@ -142,7 +142,7 @@ OutlineBulletDlg::~OutlineBulletDlg()
void OutlineBulletDlg::dispose()
{
- delete pOutputSet;
+ pOutputSet.reset();
SfxTabDialog::dispose();
}
@@ -191,7 +191,7 @@ const SfxItemSet* OutlineBulletDlg::GetOutputItemSet() const
pRule->SetFeatureFlag( SvxNumRuleFlags::NO_NUMBERS, false );
}
- return pOutputSet;
+ return pOutputSet.get();
}
} // end of namespace sd
diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
index f633be3adb5e..9f34a01029e8 100644
--- a/sd/source/ui/dlg/prltempl.cxx
+++ b/sd/source/ui/dlg/prltempl.cxx
@@ -90,7 +90,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh,
if( pParentItemSet )
aInputSet.SetParent( pParentItemSet );
- pOutSet = new SfxItemSet( rStyleBase.GetItemSet() );
+ pOutSet.reset( new SfxItemSet( rStyleBase.GetItemSet() ) );
pOutSet->ClearItem();
// If there is no bullet item in this stylesheet, we get it
@@ -222,7 +222,7 @@ SdPresLayoutTemplateDlg::~SdPresLayoutTemplateDlg()
void SdPresLayoutTemplateDlg::dispose()
{
- delete pOutSet;
+ pOutSet.reset();
SfxTabDialog::dispose();
}
@@ -294,7 +294,7 @@ const SfxItemSet* SdPresLayoutTemplateDlg::GetOutputItemSet() const
const SvxNumBulletItem *pSvxNumBulletItem = nullptr;
if( SfxItemState::SET == pOutSet->GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pSvxNumBulletItem) ))
SdBulletMapper::MapFontsInNumRule( *pSvxNumBulletItem->GetNumRule(), *pOutSet );
- return pOutSet;
+ return pOutSet.get();
}
else
return SfxTabDialog::GetOutputItemSet();
diff --git a/sd/source/ui/inc/OutlineBulletDlg.hxx b/sd/source/ui/inc/OutlineBulletDlg.hxx
index 53c3388f7bb1..2b747ab885cc 100644
--- a/sd/source/ui/inc/OutlineBulletDlg.hxx
+++ b/sd/source/ui/inc/OutlineBulletDlg.hxx
@@ -49,7 +49,7 @@ private:
using SfxTabDialog::GetOutputItemSet;
SfxItemSet aInputSet;
- SfxItemSet *pOutputSet;
+ std::unique_ptr<SfxItemSet> pOutputSet;
sal_uInt16 m_nOptionsId;
sal_uInt16 m_nPositionId;
bool bTitle;
diff --git a/sd/source/ui/inc/prltempl.hxx b/sd/source/ui/inc/prltempl.hxx
index 272f33334df2..1f2c03eb7ffc 100644
--- a/sd/source/ui/inc/prltempl.hxx
+++ b/sd/source/ui/inc/prltempl.hxx
@@ -60,7 +60,7 @@ private:
// for mapping with the new SvxNumBulletItem
SfxItemSet aInputSet;
- SfxItemSet* pOutSet;
+ std::unique_ptr<SfxItemSet> pOutSet;
const SfxItemSet* pOrgSet;
sal_uInt16 GetOutlineLevel() const;
More information about the Libreoffice-commits
mailing list