diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-17 17:10:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-18 07:59:14 +0000 |
commit | 3a00aaef2a51d7a1a87475a316dc9ae232fac60c (patch) | |
tree | 4cc4516528c0dcb0bb6871e5b517efb74550a521 /basic | |
parent | convert Link<> to typed (diff) | |
download | core-3a00aaef2a51d7a1a87475a316dc9ae232fac60c.tar.gz core-3a00aaef2a51d7a1a87475a316dc9ae232fac60c.zip |
boost->std
Change-Id: Ie490bf2c6921f393bdeed96b1a8815996b701bf0
Reviewed-on: https://gerrit.libreoffice.org/18670
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/inc/pch/precompiled_sb.hxx | 1 | ||||
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 9 | ||||
-rw-r--r-- | basic/source/comp/dim.cxx | 6 | ||||
-rw-r--r-- | basic/source/comp/io.cxx | 14 | ||||
-rw-r--r-- | basic/source/comp/loops.cxx | 4 | ||||
-rw-r--r-- | basic/source/comp/sbcomp.cxx | 4 | ||||
-rw-r--r-- | basic/source/runtime/dllmgr.hxx | 8 | ||||
-rw-r--r-- | basic/source/runtime/inputbox.cxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/methods.cxx | 4 | ||||
-rw-r--r-- | basic/source/sbx/sbxdate.cxx | 6 | ||||
-rw-r--r-- | basic/source/uno/namecont.cxx | 8 | ||||
-rw-r--r-- | basic/source/uno/scriptcont.cxx | 6 |
12 files changed, 33 insertions, 39 deletions
diff --git a/basic/inc/pch/precompiled_sb.hxx b/basic/inc/pch/precompiled_sb.hxx index 089523cac22c..a10d0949db6a 100644 --- a/basic/inc/pch/precompiled_sb.hxx +++ b/basic/inc/pch/precompiled_sb.hxx @@ -17,7 +17,6 @@ #include "math.h" #include <boost/optional.hpp> #include <memory> -#include <boost/scoped_ptr.hpp> #include <com/sun/star/bridge/oleautomation/Decimal.hpp> #include <com/sun/star/bridge/oleautomation/XAutomationObject.hpp> #include <com/sun/star/i18n/LocaleCalendar2.hpp> diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 5dc17c04ef41..4b0e27242400 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -18,10 +18,6 @@ */ -#include <list> - -#include <boost/noncopyable.hpp> -#include <boost/scoped_ptr.hpp> #include <vcl/svapp.hxx> #include <tools/stream.hxx> #include <svl/SfxBroadcaster.hxx> @@ -73,6 +69,9 @@ #include <com/sun/star/awt/XControl.hpp> #include <comphelper/anytostring.hxx> #include <ooo/vba/VbQueryClose.hpp> +#include <list> +#include <memory> +#include <boost/noncopyable.hpp> #include "sbxmod.hxx" #include "parser.hxx" @@ -1751,7 +1750,7 @@ void SbModule::GetCodeCompleteDataFromParse(CodeCompleteDataCache& aCache) ErrorHdlResetter aErrHdl; SbxBase::ResetError(); - boost::scoped_ptr<SbiParser> pParser(new SbiParser( static_cast<StarBASIC*>(GetParent()), this )); + std::unique_ptr<SbiParser> pParser(new SbiParser( static_cast<StarBASIC*>(GetParent()), this )); pParser->SetCodeCompleting(true); while( pParser->Parse() ) {} diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx index 2faa00eaf65e..447a50a61335 100644 --- a/basic/source/comp/dim.cxx +++ b/basic/source/comp/dim.cxx @@ -29,7 +29,7 @@ #include <com/sun/star/reflection/XIdlMethod.hpp> #include <com/sun/star/uno/Exception.hpp> #include <basic/codecompletecache.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -588,7 +588,7 @@ void SbiParser::DefType( bool bPrivate ) SbxObject *pType = new SbxObject(aSym); - boost::scoped_ptr<SbiSymDef> pElem; + std::unique_ptr<SbiSymDef> pElem; SbiDimList* pDim = NULL; bool bDone = false; @@ -960,7 +960,7 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl ) bool bError2 = true; if( bOptional && bCompatible && eTok == EQ ) { - boost::scoped_ptr<SbiConstExpression> pDefaultExpr(new SbiConstExpression( this )); + std::unique_ptr<SbiConstExpression> pDefaultExpr(new SbiConstExpression( this )); SbxDataType eType2 = pDefaultExpr->GetType(); sal_uInt16 nStringId; diff --git a/basic/source/comp/io.cxx b/basic/source/comp/io.cxx index 4a2f2dbbef82..f991f4ea6aa1 100644 --- a/basic/source/comp/io.cxx +++ b/basic/source/comp/io.cxx @@ -19,7 +19,7 @@ #include "parser.hxx" #include "iosys.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> // test if there's an I/O channel @@ -52,7 +52,7 @@ void SbiParser::Print() { if( !IsEoln( Peek() ) ) { - boost::scoped_ptr<SbiExpression> pExpr(new SbiExpression( this )); + std::unique_ptr<SbiExpression> pExpr(new SbiExpression( this )); pExpr->Gen(); pExpr.reset(); Peek(); @@ -81,7 +81,7 @@ void SbiParser::Write() while( !bAbort ) { - boost::scoped_ptr<SbiExpression> pExpr(new SbiExpression( this )); + std::unique_ptr<SbiExpression> pExpr(new SbiExpression( this )); pExpr->Gen(); pExpr.reset(); aGen.Gen( _BWRITE ); @@ -130,7 +130,7 @@ void SbiParser::Line() void SbiParser::LineInput() { Channel( true ); - boost::scoped_ptr<SbiExpression> pExpr(new SbiExpression( this, SbOPERAND )); + std::unique_ptr<SbiExpression> pExpr(new SbiExpression( this, SbOPERAND )); if( !pExpr->IsVariable() ) Error( ERRCODE_BASIC_VAR_EXPECTED ); if( pExpr->GetType() != SbxVARIANT && pExpr->GetType() != SbxSTRING ) @@ -147,7 +147,7 @@ void SbiParser::Input() { aGen.Gen( _RESTART ); Channel( true ); - boost::scoped_ptr<SbiExpression> pExpr(new SbiExpression( this, SbOPERAND )); + std::unique_ptr<SbiExpression> pExpr(new SbiExpression( this, SbOPERAND )); while( !bAbort ) { if( !pExpr->IsVariable() ) @@ -240,10 +240,10 @@ void SbiParser::Open() } TestToken( AS ); // channel number - boost::scoped_ptr<SbiExpression> pChan(new SbiExpression( this )); + std::unique_ptr<SbiExpression> pChan(new SbiExpression( this )); if( !pChan ) Error( ERRCODE_BASIC_SYNTAX ); - boost::scoped_ptr<SbiExpression> pLen; + std::unique_ptr<SbiExpression> pLen; if( Peek() == SYMBOL ) { Next(); diff --git a/basic/source/comp/loops.cxx b/basic/source/comp/loops.cxx index cdc3f21ac844..a77b9e2b3318 100644 --- a/basic/source/comp/loops.cxx +++ b/basic/source/comp/loops.cxx @@ -19,7 +19,7 @@ #include "parser.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> // Single-line IF and Multiline IF @@ -65,7 +65,7 @@ void SbiParser::If() aGen.BackChain( nEndLbl ); aGen.Statement(); - boost::scoped_ptr<SbiExpression> pCond(new SbiExpression( this )); + std::unique_ptr<SbiExpression> pCond(new SbiExpression( this )); pCond->Gen(); nEndLbl = aGen.Gen( _JUMPF, 0 ); pCond.reset(); diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx index 9c2298eb8e97..491fa2ca585c 100644 --- a/basic/source/comp/sbcomp.cxx +++ b/basic/source/comp/sbcomp.cxx @@ -24,8 +24,8 @@ #include "sbobjmod.hxx" #include <svtools/miscopt.hxx> #include <stdio.h> -#include <boost/scoped_ptr.hpp> #include <rtl/character.hxx> +#include <memory> // To activate tracing enable in sbtrace.hxx #ifdef DBG_TRACE_BASIC @@ -943,7 +943,7 @@ bool SbModule::Compile() SbModule* pOld = GetSbData()->pCompMod; GetSbData()->pCompMod = this; - boost::scoped_ptr<SbiParser> pParser(new SbiParser( static_cast<StarBASIC*>(GetParent()), this )); + std::unique_ptr<SbiParser> pParser(new SbiParser( static_cast<StarBASIC*>(GetParent()), this )); while( pParser->Parse() ) {} if( !pParser->GetErrors() ) pParser->aGen.Save(); diff --git a/basic/source/runtime/dllmgr.hxx b/basic/source/runtime/dllmgr.hxx index 9bb1a0faf8cb..80af31b57e90 100644 --- a/basic/source/runtime/dllmgr.hxx +++ b/basic/source/runtime/dllmgr.hxx @@ -21,11 +21,9 @@ #define INCLUDED_BASIC_SOURCE_RUNTIME_DLLMGR_HXX #include <sal/config.h> - -#include <boost/noncopyable.hpp> -#include <boost/scoped_ptr.hpp> - #include <basic/sberrors.hxx> +#include <boost/noncopyable.hpp> +#include <memory> class SbxArray; class SbxVariable; @@ -45,7 +43,7 @@ public: private: struct Impl; - boost::scoped_ptr< Impl > impl_; + std::unique_ptr< Impl > impl_; }; #endif diff --git a/basic/source/runtime/inputbox.cxx b/basic/source/runtime/inputbox.cxx index b925c6cd4b8f..c9e14b73efad 100644 --- a/basic/source/runtime/inputbox.cxx +++ b/basic/source/runtime/inputbox.cxx @@ -26,7 +26,7 @@ #include "runtime.hxx" #include "stdobj.hxx" #include "rtlproto.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> class SvRTLInputBox : public ModalDialog { diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 2bc975bdcdc5..598b83c33dea 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -58,8 +58,6 @@ #include <ooo/vba/XHelperInterface.hpp> #include <com/sun/star/bridge/oleautomation/XAutomationObject.hpp> #include <memory> -#include <boost/scoped_ptr.hpp> - #include <random> using namespace comphelper; @@ -4500,7 +4498,7 @@ RTLFUNC(LoadPicture) } OUString aFileURL = getFullPath( rPar.Get(1)->GetOUString() ); - boost::scoped_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream( aFileURL, StreamMode::READ )); + std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream( aFileURL, StreamMode::READ )); if( pStream ) { Bitmap aBmp; diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx index 6d11d61fb272..d3ab7718bf8b 100644 --- a/basic/source/sbx/sbxdate.cxx +++ b/basic/source/sbx/sbxdate.cxx @@ -27,7 +27,7 @@ #include "sbxconv.hxx" #include "math.h" #include <comphelper/processfactory.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> double ImpGetDate( const SbxValues* p ) @@ -100,7 +100,7 @@ double ImpGetDate( const SbxValues* p ) { LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType(); - boost::scoped_ptr<SvNumberFormatter> pFormatter(new SvNumberFormatter( comphelper::getProcessComponentContext(), eLangType )); + std::unique_ptr<SvNumberFormatter> pFormatter(new SvNumberFormatter( comphelper::getProcessComponentContext(), eLangType )); sal_uInt32 nIndex; sal_Int32 nCheckPos = 0; @@ -268,7 +268,7 @@ start: Color* pColor; LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType(); - boost::scoped_ptr<SvNumberFormatter> pFormatter(new SvNumberFormatter( comphelper::getProcessComponentContext(), eLangType )); + std::unique_ptr<SvNumberFormatter> pFormatter(new SvNumberFormatter( comphelper::getProcessComponentContext(), eLangType )); sal_uInt32 nIndex; sal_Int32 nCheckPos = 0; diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 8bf3b5c6c672..9c2d29d85b67 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -65,7 +65,7 @@ #include <cppuhelper/queryinterface.hxx> #include <cppuhelper/supportsservice.hxx> #include <basic/sbmod.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace basic { @@ -781,7 +781,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, } else { - boost::scoped_ptr<INetURLObject> pLibInfoInetObj; + std::unique_ptr<INetURLObject> pLibInfoInetObj; if( meInitMode == CONTAINER_INIT_FILE ) { aFileName = aInitFileName; @@ -838,7 +838,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, source.sSystemId = aFileName; // start parsing - boost::scoped_ptr< ::xmlscript::LibDescriptorArray> pLibArray(new ::xmlscript::LibDescriptorArray()); + std::unique_ptr< ::xmlscript::LibDescriptorArray> pLibArray(new ::xmlscript::LibDescriptorArray()); try { @@ -1904,7 +1904,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto int iArray = 0; pName = aNames.getConstArray(); ::xmlscript::LibDescriptor aLibDescriptorForExtensionLibs; - boost::scoped_ptr< ::xmlscript::LibDescriptorArray > pLibArray(new ::xmlscript::LibDescriptorArray(nLibsToSave)); + std::unique_ptr< ::xmlscript::LibDescriptorArray > pLibArray(new ::xmlscript::LibDescriptorArray(nLibsToSave)); for( ; pName != pNamesEnd; ++pName ) { SfxLibrary* pImplLib = getImplLib( *pName ); diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 91ecc7057b3b..998c3f4959e0 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -58,7 +58,7 @@ #include <com/sun/star/util/VetoException.hpp> #include <com/sun/star/script/XLibraryQueryExecutable.hpp> #include <cppuhelper/implbase1.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace basic { @@ -947,7 +947,7 @@ bool SfxScriptLibraryContainer::implLoadPasswordLibrary { throw uno::RuntimeException(); } - boost::scoped_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( xCodeStream )); + std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( xCodeStream )); if ( !pStream || pStream->GetError() ) { sal_Int32 nError = pStream ? pStream->GetError() : ERRCODE_IO_GENERAL; @@ -1062,7 +1062,7 @@ bool SfxScriptLibraryContainer::implLoadPasswordLibrary aCodeStreamName, embed::ElementModes::READ ); - boost::scoped_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( xCodeStream )); + std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( xCodeStream )); if ( !pStream || pStream->GetError() ) { sal_Int32 nError = pStream ? pStream->GetError() : ERRCODE_IO_GENERAL; |