summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit4.cxx6
-rw-r--r--editeng/source/items/textitem.cxx3
2 files changed, 4 insertions, 5 deletions
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 471301196295..31b3cd6c4e3d 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1458,10 +1458,10 @@ EESpellState ImpEditEngine::Spell( EditView* pEditView, bool bMultipleDoc )
else if ( CreateEPaM( aEditDoc.GetStartPaM() ) == pSpellInfo->aSpellStart )
bIsStart = true;
- EditSpellWrapper* pWrp = new EditSpellWrapper( Application::GetDefDialogParent(),
- bIsStart, pEditView );
+ std::unique_ptr<EditSpellWrapper> pWrp(new EditSpellWrapper( Application::GetDefDialogParent(),
+ bIsStart, pEditView ));
pWrp->SpellDocument();
- delete pWrp;
+ pWrp.reset();
if ( !bMultipleDoc )
{
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 9f6a0f22ba74..e995a7ba5796 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -2881,7 +2881,7 @@ void SvxScriptSetItem::PutItemForScriptType( SvtScriptType nScriptType,
sal_uInt16 nLatin, nAsian, nComplex;
GetWhichIds( nLatin, nAsian, nComplex );
- SfxPoolItem* pCpy = rItem.Clone();
+ std::unique_ptr<SfxPoolItem> pCpy(rItem.Clone());
if( SvtScriptType::LATIN & nScriptType )
{
pCpy->SetWhich( nLatin );
@@ -2897,7 +2897,6 @@ void SvxScriptSetItem::PutItemForScriptType( SvtScriptType nScriptType,
pCpy->SetWhich( nComplex );
GetItemSet().Put( *pCpy );
}
- delete pCpy;
}
void SvxScriptSetItem::GetWhichIds( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16& rLatin, sal_uInt16& rAsian, sal_uInt16& rComplex )