Kaydet (Commit) 7c945811 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in editeng

Change-Id: I6190098e7e3f4df415d6aef46d152324cbc3dd60
Reviewed-on: https://gerrit.libreoffice.org/60049
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 1f5698ba
...@@ -1458,10 +1458,10 @@ EESpellState ImpEditEngine::Spell( EditView* pEditView, bool bMultipleDoc ) ...@@ -1458,10 +1458,10 @@ EESpellState ImpEditEngine::Spell( EditView* pEditView, bool bMultipleDoc )
else if ( CreateEPaM( aEditDoc.GetStartPaM() ) == pSpellInfo->aSpellStart ) else if ( CreateEPaM( aEditDoc.GetStartPaM() ) == pSpellInfo->aSpellStart )
bIsStart = true; bIsStart = true;
EditSpellWrapper* pWrp = new EditSpellWrapper( Application::GetDefDialogParent(), std::unique_ptr<EditSpellWrapper> pWrp(new EditSpellWrapper( Application::GetDefDialogParent(),
bIsStart, pEditView ); bIsStart, pEditView ));
pWrp->SpellDocument(); pWrp->SpellDocument();
delete pWrp; pWrp.reset();
if ( !bMultipleDoc ) if ( !bMultipleDoc )
{ {
......
...@@ -2881,7 +2881,7 @@ void SvxScriptSetItem::PutItemForScriptType( SvtScriptType nScriptType, ...@@ -2881,7 +2881,7 @@ void SvxScriptSetItem::PutItemForScriptType( SvtScriptType nScriptType,
sal_uInt16 nLatin, nAsian, nComplex; sal_uInt16 nLatin, nAsian, nComplex;
GetWhichIds( nLatin, nAsian, nComplex ); GetWhichIds( nLatin, nAsian, nComplex );
SfxPoolItem* pCpy = rItem.Clone(); std::unique_ptr<SfxPoolItem> pCpy(rItem.Clone());
if( SvtScriptType::LATIN & nScriptType ) if( SvtScriptType::LATIN & nScriptType )
{ {
pCpy->SetWhich( nLatin ); pCpy->SetWhich( nLatin );
...@@ -2897,7 +2897,6 @@ void SvxScriptSetItem::PutItemForScriptType( SvtScriptType nScriptType, ...@@ -2897,7 +2897,6 @@ void SvxScriptSetItem::PutItemForScriptType( SvtScriptType nScriptType,
pCpy->SetWhich( nComplex ); pCpy->SetWhich( nComplex );
GetItemSet().Put( *pCpy ); GetItemSet().Put( *pCpy );
} }
delete pCpy;
} }
void SvxScriptSetItem::GetWhichIds( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16& rLatin, sal_uInt16& rAsian, sal_uInt16& rComplex ) void SvxScriptSetItem::GetWhichIds( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16& rLatin, sal_uInt16& rAsian, sal_uInt16& rComplex )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment