summaryrefslogtreecommitdiff
path: root/vcl/source/edit
diff options
context:
space:
mode:
authorGabor Kelemen <kelemen.gabor2@nisz.hu>2019-02-04 20:41:49 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-02-08 12:30:06 +0100
commit43635b474cdce65e64fa9ca9d27a3cee6d96d50b (patch)
tree04d4223ebf161e2dc83f0842a1a81cef76d784d6 /vcl/source/edit
parent2d6313a9fac81340883b24fe3651781d31c6039d (diff)
o3tl::make_unique -> std::make_unique in tools..xmloff
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: Ib3201f865d43f372007cdf381c7e244e9cbeae26 Reviewed-on: https://gerrit.libreoffice.org/67474 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'vcl/source/edit')
-rw-r--r--vcl/source/edit/texteng.cxx13
-rw-r--r--vcl/source/edit/textview.cxx8
2 files changed, 9 insertions, 12 deletions
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 2c8e320468b0..097305df51c7 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -33,7 +33,6 @@
#include <vcl/edit.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
-#include <o3tl/make_unique.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/PropertyValues.hpp>
@@ -489,7 +488,7 @@ void TextEngine::ImpRemoveChars( const TextPaM& rPaM, sal_Int32 nChars )
break; // for
}
}
- InsertUndo( o3tl::make_unique<TextUndoRemoveChars>( this, rPaM, aStr ) );
+ InsertUndo( std::make_unique<TextUndoRemoveChars>( this, rPaM, aStr ) );
}
mpDoc->RemoveChars( rPaM, nChars );
@@ -504,7 +503,7 @@ TextPaM TextEngine::ImpConnectParagraphs( sal_uInt32 nLeft, sal_uInt32 nRight )
TextNode* pRight = mpDoc->GetNodes()[ nRight ].get();
if ( IsUndoEnabled() && !IsInUndo() )
- InsertUndo( o3tl::make_unique<TextUndoConnectParas>( this, nLeft, pLeft->GetText().getLength() ) );
+ InsertUndo( std::make_unique<TextUndoConnectParas>( this, nLeft, pLeft->GetText().getLength() ) );
// first lookup Portions, as pRight is gone after ConnectParagraphs
TEParaPortion* pLeftPortion = mpTEParaPortions->GetObject( nLeft );
@@ -599,7 +598,7 @@ void TextEngine::ImpRemoveParagraph( sal_uInt32 nPara )
// the Node is handled by Undo and is deleted if appropriate
mpDoc->GetNodes().erase( mpDoc->GetNodes().begin() + nPara );
if ( IsUndoEnabled() && !IsInUndo() )
- InsertUndo( o3tl::make_unique<TextUndoDelPara>( this, pNode.release(), nPara ) );
+ InsertUndo( std::make_unique<TextUndoDelPara>( this, pNode.release(), nPara ) );
mpTEParaPortions->Remove( nPara );
@@ -766,7 +765,7 @@ TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const OUString&
{
OUString aLine(aText.copy(nStart, nEnd-nStart));
if ( IsUndoEnabled() && !IsInUndo() )
- InsertUndo( o3tl::make_unique<TextUndoInsertChars>( this, aPaM, aLine ) );
+ InsertUndo( std::make_unique<TextUndoInsertChars>( this, aPaM, aLine ) );
TEParaPortion* pPortion = mpTEParaPortions->GetObject( aPaM.GetPara() );
pPortion->MarkInvalid( aPaM.GetIndex(), aLine.getLength() );
@@ -806,7 +805,7 @@ TextPaM TextEngine::ImpInsertParaBreak( const TextSelection& rCurSel )
TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM )
{
if ( IsUndoEnabled() && !IsInUndo() )
- InsertUndo( o3tl::make_unique<TextUndoSplitPara>( this, rPaM.GetPara(), rPaM.GetIndex() ) );
+ InsertUndo( std::make_unique<TextUndoSplitPara>( this, rPaM.GetPara(), rPaM.GetIndex() ) );
TextNode* pNode = mpDoc->GetNodes()[ rPaM.GetPara() ].get();
bool bFirstParaContentChanged = rPaM.GetIndex() < pNode->GetText().getLength();
@@ -2526,7 +2525,7 @@ void TextEngine::SetAttrib( const TextAttrib& rAttr, sal_uInt32 nPara, sal_Int32
if ( nEnd > nMax )
nEnd = nMax;
- pNode->GetCharAttribs().InsertAttrib( o3tl::make_unique<TextCharAttrib>( rAttr, nStart, nEnd ) );
+ pNode->GetCharAttribs().InsertAttrib( std::make_unique<TextCharAttrib>( rAttr, nStart, nEnd ) );
pTEParaPortion->MarkSelectionInvalid( nStart );
mbFormatted = false;
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 8811fe28e55b..404dbd8bb388 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -65,8 +65,6 @@
#include <algorithm>
#include <cstddef>
-#include <o3tl/make_unique.hxx>
-
TETextDataObject::TETextDataObject( const OUString& rText ) : maText( rText )
{
}
@@ -174,8 +172,8 @@ TextView::TextView( ExtTextEngine* pEng, vcl::Window* pWindow ) :
mpImpl->mnTravelXPos = TRAVEL_X_DONTKNOW;
- mpImpl->mpSelFuncSet = o3tl::make_unique<TextSelFunctionSet>( this );
- mpImpl->mpSelEngine = o3tl::make_unique<SelectionEngine>( mpImpl->mpWindow, mpImpl->mpSelFuncSet.get() );
+ mpImpl->mpSelFuncSet = std::make_unique<TextSelFunctionSet>( this );
+ mpImpl->mpSelEngine = std::make_unique<SelectionEngine>( mpImpl->mpWindow, mpImpl->mpSelFuncSet.get() );
mpImpl->mpSelEngine->SetSelectionMode( SelectionMode::Range );
mpImpl->mpSelEngine->EnableDrag( true );
@@ -822,7 +820,7 @@ void TextView::Command( const CommandEvent& rCEvt )
{
DeleteSelected();
TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes()[ GetSelection().GetEnd().GetPara() ].get();
- mpImpl->mpTextEngine->mpIMEInfos = o3tl::make_unique<TEIMEInfos>( GetSelection().GetEnd(), pNode->GetText().copy( GetSelection().GetEnd().GetIndex() ) );
+ mpImpl->mpTextEngine->mpIMEInfos = std::make_unique<TEIMEInfos>( GetSelection().GetEnd(), pNode->GetText().copy( GetSelection().GetEnd().GetIndex() ) );
mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite = !IsInsertMode();
}
else if ( rCEvt.GetCommand() == CommandEventId::EndExtTextInput )