summaryrefslogtreecommitdiff
path: root/editeng/source/editeng/impedit4.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-08 11:22:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-09 12:09:55 +0200
commitf7ce839c7844f029c0a1ac83a5638e83356b4c4b (patch)
treec93a342a577133b384a3ccc088d7d0675d4fb9e3 /editeng/source/editeng/impedit4.cxx
parent4ba06560e33f17ca1ed72ad722c80eae5ffd4277 (diff)
use unique_ptr in SfxUndoManager::AddUndoAction
Change-Id: I11483e3cece12a7373f4276972b4c899edf1ce15 Reviewed-on: https://gerrit.libreoffice.org/61566 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng/source/editeng/impedit4.cxx')
-rw-r--r--editeng/source/editeng/impedit4.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index c57ba48bd237..66cd22344d0c 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2686,7 +2686,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
bool bChanges = false;
bool bLenChanged = false;
- EditUndoTransliteration* pUndo = nullptr;
+ std::unique_ptr<EditUndoTransliteration> pUndo;
utl::TransliterationWrapper aTransliterationWrapper( ::comphelper::getProcessComponentContext(), nTransliterationMode );
bool bConsiderLanguage = aTransliterationWrapper.needLanguageForTheMode();
@@ -2919,7 +2919,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
aNewSel = aSel;
ESelection aESel( CreateESel( aSel ) );
- pUndo = new EditUndoTransliteration(pEditEngine, aESel, nTransliterationMode);
+ pUndo.reset(new EditUndoTransliteration(pEditEngine, aESel, nTransliterationMode));
const bool bSingleNode = aSel.Min().GetNode()== aSel.Max().GetNode();
const bool bHasAttribs = aSel.Min().GetNode()->GetCharAttribs().HasAttrib( aSel.Min().GetIndex(), aSel.Max().GetIndex() );
@@ -2959,7 +2959,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
{
ESelection aESel( CreateESel( aNewSel ) );
pUndo->SetNewSelection( aESel );
- InsertUndo( pUndo );
+ InsertUndo( std::move(pUndo) );
}
if ( bChanges )