Kaydet (Commit) 59a8d22c authored tarafından Noel Grandin's avatar Noel Grandin

use unique_ptr in SwTextNode

Change-Id: I4962d3480e9318c02d5cb8f031c0fcb1ab19208d
Reviewed-on: https://gerrit.libreoffice.org/66570Reviewed-by: 's avatarAshod Nakashian <ashnakash@gmail.com>
Tested-by: Jenkins
üst fd31291c
......@@ -1893,11 +1893,9 @@ void SwTextNode::TransliterateText(
{
// here we may transliterate over complete language portions...
SwLanguageIterator* pIter;
std::unique_ptr<SwLanguageIterator> pIter;
if( rTrans.needLanguageForTheMode() )
pIter = new SwLanguageIterator( *this, nStt );
else
pIter = nullptr;
pIter.reset(new SwLanguageIterator( *this, nStt ));
sal_Int32 nEndPos = 0;
LanguageType nLang = LANGUAGE_NONE;
......@@ -1934,7 +1932,6 @@ void SwTextNode::TransliterateText(
nStt = nEndPos;
} while( nEndPos < nEnd && pIter && pIter->Next() );
delete pIter;
}
if (!aChanges.empty())
......
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