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@collabora.co.uk>
This commit is contained in:
@@ -59,7 +59,7 @@ OutlineBulletDlg::OutlineBulletDlg(
|
|||||||
aInputSet.MergeRange( SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL );
|
aInputSet.MergeRange( SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL );
|
||||||
aInputSet.Put( *pAttr );
|
aInputSet.Put( *pAttr );
|
||||||
|
|
||||||
pOutputSet = new SfxItemSet( *pAttr );
|
pOutputSet.reset( new SfxItemSet( *pAttr ) );
|
||||||
pOutputSet->ClearItem();
|
pOutputSet->ClearItem();
|
||||||
|
|
||||||
bool bOutliner = false;
|
bool bOutliner = false;
|
||||||
@@ -142,7 +142,7 @@ OutlineBulletDlg::~OutlineBulletDlg()
|
|||||||
|
|
||||||
void OutlineBulletDlg::dispose()
|
void OutlineBulletDlg::dispose()
|
||||||
{
|
{
|
||||||
delete pOutputSet;
|
pOutputSet.reset();
|
||||||
SfxTabDialog::dispose();
|
SfxTabDialog::dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ const SfxItemSet* OutlineBulletDlg::GetOutputItemSet() const
|
|||||||
pRule->SetFeatureFlag( SvxNumRuleFlags::NO_NUMBERS, false );
|
pRule->SetFeatureFlag( SvxNumRuleFlags::NO_NUMBERS, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
return pOutputSet;
|
return pOutputSet.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end of namespace sd
|
} // end of namespace sd
|
||||||
|
@@ -90,7 +90,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh,
|
|||||||
if( pParentItemSet )
|
if( pParentItemSet )
|
||||||
aInputSet.SetParent( pParentItemSet );
|
aInputSet.SetParent( pParentItemSet );
|
||||||
|
|
||||||
pOutSet = new SfxItemSet( rStyleBase.GetItemSet() );
|
pOutSet.reset( new SfxItemSet( rStyleBase.GetItemSet() ) );
|
||||||
pOutSet->ClearItem();
|
pOutSet->ClearItem();
|
||||||
|
|
||||||
// If there is no bullet item in this stylesheet, we get it
|
// If there is no bullet item in this stylesheet, we get it
|
||||||
@@ -222,7 +222,7 @@ SdPresLayoutTemplateDlg::~SdPresLayoutTemplateDlg()
|
|||||||
|
|
||||||
void SdPresLayoutTemplateDlg::dispose()
|
void SdPresLayoutTemplateDlg::dispose()
|
||||||
{
|
{
|
||||||
delete pOutSet;
|
pOutSet.reset();
|
||||||
SfxTabDialog::dispose();
|
SfxTabDialog::dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,7 +294,7 @@ const SfxItemSet* SdPresLayoutTemplateDlg::GetOutputItemSet() const
|
|||||||
const SvxNumBulletItem *pSvxNumBulletItem = nullptr;
|
const SvxNumBulletItem *pSvxNumBulletItem = nullptr;
|
||||||
if( SfxItemState::SET == pOutSet->GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pSvxNumBulletItem) ))
|
if( SfxItemState::SET == pOutSet->GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pSvxNumBulletItem) ))
|
||||||
SdBulletMapper::MapFontsInNumRule( *pSvxNumBulletItem->GetNumRule(), *pOutSet );
|
SdBulletMapper::MapFontsInNumRule( *pSvxNumBulletItem->GetNumRule(), *pOutSet );
|
||||||
return pOutSet;
|
return pOutSet.get();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return SfxTabDialog::GetOutputItemSet();
|
return SfxTabDialog::GetOutputItemSet();
|
||||||
|
@@ -49,7 +49,7 @@ private:
|
|||||||
using SfxTabDialog::GetOutputItemSet;
|
using SfxTabDialog::GetOutputItemSet;
|
||||||
|
|
||||||
SfxItemSet aInputSet;
|
SfxItemSet aInputSet;
|
||||||
SfxItemSet *pOutputSet;
|
std::unique_ptr<SfxItemSet> pOutputSet;
|
||||||
sal_uInt16 m_nOptionsId;
|
sal_uInt16 m_nOptionsId;
|
||||||
sal_uInt16 m_nPositionId;
|
sal_uInt16 m_nPositionId;
|
||||||
bool bTitle;
|
bool bTitle;
|
||||||
|
@@ -60,7 +60,7 @@ private:
|
|||||||
|
|
||||||
// for mapping with the new SvxNumBulletItem
|
// for mapping with the new SvxNumBulletItem
|
||||||
SfxItemSet aInputSet;
|
SfxItemSet aInputSet;
|
||||||
SfxItemSet* pOutSet;
|
std::unique_ptr<SfxItemSet> pOutSet;
|
||||||
const SfxItemSet* pOrgSet;
|
const SfxItemSet* pOrgSet;
|
||||||
|
|
||||||
sal_uInt16 GetOutlineLevel() const;
|
sal_uInt16 GetOutlineLevel() const;
|
||||||
|
Reference in New Issue
Block a user