diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-14 14:43:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-14 19:32:42 +0000 |
commit | 33cddeea1352688af9a42b53024e32a4536d5860 (patch) | |
tree | c113962c0dd2a936b08ce0e64721f7b4617e757b /connectivity | |
parent | f10691acf1be60167c042b4b4a60200b4defcd88 (diff) |
boost->std
Change-Id: Iff14f69c200217c5d868978e8ffc06962b99ac09
Reviewed-on: https://gerrit.libreoffice.org/18568
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'connectivity')
29 files changed, 57 insertions, 64 deletions
diff --git a/connectivity/inc/pch/precompiled_dbtools.hxx b/connectivity/inc/pch/precompiled_dbtools.hxx index 2bc28f6df7dd..1a029be4ce9b 100644 --- a/connectivity/inc/pch/precompiled_dbtools.hxx +++ b/connectivity/inc/pch/precompiled_dbtools.hxx @@ -18,8 +18,6 @@ #include <boost/bind.hpp> #include <boost/noncopyable.hpp> #include <boost/optional.hpp> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> #include <boost/spirit/include/classic_core.hpp> #include <boost/type_traits.hpp> #include <com/sun/star/awt/XWindow.hpp> diff --git a/connectivity/inc/pch/precompiled_odbc.hxx b/connectivity/inc/pch/precompiled_odbc.hxx index 3cef9db625e8..189c5d47a827 100644 --- a/connectivity/inc/pch/precompiled_odbc.hxx +++ b/connectivity/inc/pch/precompiled_odbc.hxx @@ -15,7 +15,6 @@ */ #include <algorithm> -#include <boost/scoped_ptr.hpp> #include <boost/type_traits/is_same.hpp> #include <boost/type_traits/remove_reference.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> diff --git a/connectivity/inc/pch/precompiled_postgresql-sdbc-impl.hxx b/connectivity/inc/pch/precompiled_postgresql-sdbc-impl.hxx index dc391dd15399..1eff65d48f18 100644 --- a/connectivity/inc/pch/precompiled_postgresql-sdbc-impl.hxx +++ b/connectivity/inc/pch/precompiled_postgresql-sdbc-impl.hxx @@ -15,7 +15,6 @@ */ #include <algorithm> -#include <boost/shared_ptr.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> diff --git a/connectivity/source/commontools/RowFunctionParser.cxx b/connectivity/source/commontools/RowFunctionParser.cxx index 7efeb9cd3a32..743a8b1eb4a1 100644 --- a/connectivity/source/commontools/RowFunctionParser.cxx +++ b/connectivity/source/commontools/RowFunctionParser.cxx @@ -142,7 +142,7 @@ struct ParserContext OperandStack maOperandStack; }; -typedef ::boost::shared_ptr< ParserContext > ParserContextSharedPtr; +typedef std::shared_ptr< ParserContext > ParserContextSharedPtr; /** Generate apriori constant value */ diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx index 5dd5a377364e..ec6227951485 100644 --- a/connectivity/source/commontools/predicateinput.cxx +++ b/connectivity/source/commontools/predicateinput.cxx @@ -31,8 +31,7 @@ #include <connectivity/PColumn.hxx> #include <comphelper/numbers.hxx> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> namespace dbtools @@ -319,7 +318,7 @@ namespace dbtools { // first try the international version OUString sSql = "SELECT * FROM x WHERE " + sField + _rPredicateValue; - boost::scoped_ptr<OSQLParseNode> pParseNode( const_cast< OSQLParser& >( m_aParser ).parseTree( sError, sSql, true ) ); + std::unique_ptr<OSQLParseNode> pParseNode( const_cast< OSQLParser& >( m_aParser ).parseTree( sError, sSql, true ) ); nType = DataType::DOUBLE; if ( pParseNode.get() ) { @@ -390,7 +389,7 @@ namespace dbtools else { OUString sReturn; - boost::shared_ptr<OSQLParseNode> xTakeOwnership(pParseNode); + std::shared_ptr<OSQLParseNode> xTakeOwnership(pParseNode); OSQLParseNode* pOdbcSpec = pParseNode->getByRule( OSQLParseNode::odbc_fct_spec ); if ( pOdbcSpec ) { diff --git a/connectivity/source/drivers/firebird/Connection.hxx b/connectivity/source/drivers/firebird/Connection.hxx index 42ce0109a424..97c8eb25cad8 100644 --- a/connectivity/source/drivers/firebird/Connection.hxx +++ b/connectivity/source/drivers/firebird/Connection.hxx @@ -25,12 +25,12 @@ #include <ibase.h> -#include <boost/scoped_ptr.hpp> #include <connectivity/CommonTools.hxx> #include <connectivity/OSubComponent.hxx> #include <cppuhelper/compbase.hxx> #include <cppuhelper/weakref.hxx> #include <map> +#include <memory> #include <OTypeInfo.hxx> #include <unotools/tempfile.hxx> @@ -118,7 +118,7 @@ namespace connectivity * The temporary folder where we extract the .fdb from a .odb. * It is only valid if m_bIsEmbedded is true. */ - ::boost::scoped_ptr< ::utl::TempFile > m_pExtractedFDBFile; + std::unique_ptr< ::utl::TempFile > m_pExtractedFDBFile; /** We are using an external (local) file */ diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 9958356cad56..81459eb07992 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -54,7 +54,7 @@ #include <i18nlangtag/languagetag.hxx> #include <tools/diagnose_ex.h> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace connectivity @@ -260,7 +260,7 @@ namespace connectivity Reference<XStream > xStream = xStorage->openStreamElement(sProperties,ElementModes::READ); if ( xStream.is() ) { - boost::scoped_ptr<SvStream> pStream( ::utl::UcbStreamHelper::CreateStream(xStream) ); + std::unique_ptr<SvStream> pStream( ::utl::UcbStreamHelper::CreateStream(xStream) ); if ( pStream.get() ) { OString sLine; diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx index 0fa38b5e21b8..54e9654a2df5 100644 --- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx @@ -70,7 +70,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ OUString sName = StorageContainer::jstring2ustring(env,name); } #endif - ::boost::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); + std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); Reference< XOutputStream> xFlush = pHelper.get() ? pHelper->getOutputStream() : Reference< XOutputStream>(); if ( xFlush.is() ) try @@ -108,7 +108,7 @@ extern "C" SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nati aOpLog.logOperation( "getFilePointer" ); #endif - ::boost::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); + std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); OSL_ENSURE(pHelper.get(),"No stream helper!"); jlong nReturn = pHelper.get() ? pHelper->getSeek()->getPosition() : jlong(0); @@ -132,7 +132,7 @@ extern "C" SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nati aOpLog.logOperation( "length" ); #endif - ::boost::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); + std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); OSL_ENSURE(pHelper.get(),"No stream helper!"); jlong nReturn = pHelper.get() ? pHelper->getSeek()->getLength() :jlong(0); @@ -146,7 +146,7 @@ extern "C" SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nati jint read_from_storage_stream( JNIEnv * env, jobject /*obj_this*/, jstring name, jstring key, DataLogFile* logger ) { - ::boost::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); + std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); Reference< XInputStream> xIn = pHelper.get() ? pHelper->getInputStream() : Reference< XInputStream>(); OSL_ENSURE(xIn.is(),"Input stream is NULL!"); if ( xIn.is() ) @@ -216,7 +216,7 @@ jint read_from_storage_stream_into_buffer( JNIEnv * env, jobject /*obj_this*/,js OUString sName = StorageContainer::jstring2ustring(env,name); } #endif - ::boost::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); + std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); Reference< XInputStream> xIn = pHelper.get() ? pHelper->getInputStream() : Reference< XInputStream>(); OSL_ENSURE(xIn.is(),"Input stream is NULL!"); if ( xIn.is() ) @@ -295,7 +295,7 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ aOpLog.logOperation( "readInt" ); #endif - ::boost::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); + std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); Reference< XInputStream> xIn = pHelper.get() ? pHelper->getInputStream() : Reference< XInputStream>(); OSL_ENSURE(xIn.is(),"Input stream is NULL!"); if ( xIn.is() ) @@ -363,7 +363,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ aOpLog.logOperation( "seek", position ); #endif - ::boost::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); + std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); Reference< XSeekable> xSeek = pHelper.get() ? pHelper->getSeek() : Reference< XSeekable>(); OSL_ENSURE(xSeek.is(),"No Seekable stream!"); @@ -419,7 +419,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ void write_to_storage_stream_from_buffer( JNIEnv* env, jobject /*obj_this*/, jstring name, jstring key, jbyteArray buffer, jint off, jint len, DataLogFile* logger ) { - ::boost::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); + std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); Reference< XOutputStream> xOut = pHelper.get() ? pHelper->getOutputStream() : Reference< XOutputStream>(); OSL_ENSURE(xOut.is(),"Stream is NULL"); @@ -485,7 +485,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ void write_to_storage_stream( JNIEnv* env, jobject /*obj_this*/, jstring name, jstring key, jint v, DataLogFile* logger ) { - ::boost::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); + std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); Reference< XOutputStream> xOut = pHelper.get() ? pHelper->getOutputStream() : Reference< XOutputStream>(); OSL_ENSURE(xOut.is(),"Stream is NULL"); try diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx index 64cf85895044..c9b8992d3711 100644 --- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/lang/DisposedException.hpp> #include <osl/diagnose.h> #include <osl/thread.h> +#include <algorithm> namespace connectivity { diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx index 9effe1ba73f9..49df4672300a 100644 --- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx +++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx @@ -144,7 +144,7 @@ extern "C" SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stor "java/io/IOException", "n < 0"); - ::boost::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); + std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); OSL_ENSURE(pHelper.get(),"No stream helper!"); if ( pHelper.get() ) { @@ -206,7 +206,7 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora aOpLog.logOperation( "available" ); #endif - ::boost::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); + std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); OSL_ENSURE(pHelper.get(),"No stream helper!"); Reference<XInputStream> xIn = pHelper.get() ? pHelper->getInputStream() : Reference<XInputStream>(); if ( xIn.is() ) @@ -250,7 +250,7 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora DataLogFile aDataLog( env, name, "input" ); #endif - ::boost::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); + std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); Reference< XInputStream> xIn = pHelper.get() ? pHelper->getInputStream() : Reference< XInputStream>(); OSL_ENSURE(xIn.is(),"Input stream is NULL!"); jint nBytesRead = 0; diff --git a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx index d360a17dd8bf..c31de9614290 100644 --- a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx +++ b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx @@ -117,7 +117,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora LogFile aDataLog( env, name, "output" ); #endif - ::boost::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); + std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key); Reference< XOutputStream> xFlush = pHelper.get() ? pHelper->getOutputStream() : Reference< XOutputStream>(); if ( xFlush.is() ) try @@ -183,7 +183,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora #ifdef HSQLDB_DBG OperationLogFile( env, name, "output" ).logOperation( "sync" ); #endif - ::boost::shared_ptr< StreamHelper > pStream = StorageContainer::getRegisteredStream( env, name, key ); + std::shared_ptr< StreamHelper > pStream = StorageContainer::getRegisteredStream( env, name, key ); Reference< XOutputStream > xFlush = pStream.get() ? pStream->getOutputStream() : Reference< XOutputStream>(); OSL_ENSURE( xFlush.is(), "StorageNativeOutputStream::sync: could not retrieve an output stream!" ); if ( xFlush.is() ) diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx index 94a88e40bf25..59da159314c1 100644 --- a/connectivity/source/drivers/jdbc/JConnection.cxx +++ b/connectivity/source/drivers/jdbc/JConnection.cxx @@ -19,7 +19,6 @@ #include <sal/config.h> -#include <boost/scoped_ptr.hpp> #include "java/sql/Connection.hxx" #include "java/lang/Class.hxx" #include "java/tools.hxx" @@ -47,6 +46,7 @@ #include <unotools/confignode.hxx> #include <list> +#include <memory> using namespace connectivity; using namespace connectivity::jdbc; @@ -691,7 +691,7 @@ void java_sql_Connection::loadDriverFromProperties( const OUString& _sDriverClas { m_aLogger.log( LogLevel::INFO, STR_LOG_LOADING_DRIVER, _sDriverClass ); // the driver manager holds the class of the driver for later use - boost::scoped_ptr< java_lang_Class > pDrvClass; + std::unique_ptr< java_lang_Class > pDrvClass; if ( _sDriverClassPath.isEmpty() ) { // if forName didn't find the class it will throw an exception diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx index 5c020983431d..6838634f90c7 100644 --- a/connectivity/source/drivers/jdbc/Object.cxx +++ b/connectivity/source/drivers/jdbc/Object.cxx @@ -31,7 +31,7 @@ #include <comphelper/logging.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace connectivity; using namespace ::com::sun::star::uno; @@ -173,14 +173,14 @@ namespace if ( _pEnvironment->IsInstanceOf( jThrow, java_sql_SQLException_BASE::st_getMyClass() ) ) { - boost::scoped_ptr< java_sql_SQLException_BASE > pException( new java_sql_SQLException_BASE( _pEnvironment, jThrow ) ); + std::unique_ptr< java_sql_SQLException_BASE > pException( new java_sql_SQLException_BASE( _pEnvironment, jThrow ) ); _out_rException = SQLException( pException->getMessage(), _rxContext, pException->getSQLState(), pException->getErrorCode(), Any() ); return true; } else if ( _pEnvironment->IsInstanceOf( jThrow, java_lang_Throwable::st_getMyClass() ) ) { - boost::scoped_ptr< java_lang_Throwable > pThrow( new java_lang_Throwable( _pEnvironment, jThrow ) ); + std::unique_ptr< java_lang_Throwable > pThrow( new java_lang_Throwable( _pEnvironment, jThrow ) ); #if OSL_DEBUG_LEVEL > 0 pThrow->printStackTrace(); #endif diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx index dd8f7d27a32b..534219ef5a24 100644 --- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx +++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx @@ -35,7 +35,7 @@ #include "resource/sharedresources.hxx" #include "java/LocalRef.hxx" #include <string.h> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace connectivity; using namespace ::com::sun::star::uno; @@ -343,7 +343,7 @@ void SAL_CALL java_sql_PreparedStatement::setObjectWithInfo( sal_Int32 parameter { double nTemp = 0.0; - boost::scoped_ptr<java_math_BigDecimal> pBigDecimal; + std::unique_ptr<java_math_BigDecimal> pBigDecimal; if ( x >>= nTemp) { pBigDecimal.reset(new java_math_BigDecimal(nTemp)); diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx index f854bab62ded..8694b9dace4b 100644 --- a/connectivity/source/drivers/jdbc/ResultSet.cxx +++ b/connectivity/source/drivers/jdbc/ResultSet.cxx @@ -46,7 +46,7 @@ #include "java/LocalRef.hxx" #include <string.h> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::comphelper; @@ -806,7 +806,7 @@ void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, co { // convert parameter double nTemp = 0.0; - boost::scoped_ptr<java_math_BigDecimal> pBigDecimal; + std::unique_ptr<java_math_BigDecimal> pBigDecimal; if ( x >>= nTemp) { pBigDecimal.reset(new java_math_BigDecimal(nTemp)); diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx index 369b85114e11..53a3fc06d8ca 100644 --- a/connectivity/source/drivers/mork/MResultSet.cxx +++ b/connectivity/source/drivers/mork/MResultSet.cxx @@ -85,7 +85,7 @@ sal_Bool SAL_CALL OResultSet::supportsService( const OUString& _rServiceName ) t } -OResultSet::OResultSet(OCommonStatement* pStmt, const ::boost::shared_ptr< connectivity::OSQLParseTreeIterator >& _pSQLIterator ) +OResultSet::OResultSet(OCommonStatement* pStmt, const std::shared_ptr< connectivity::OSQLParseTreeIterator >& _pSQLIterator ) : OResultSet_BASE(m_aMutex) ,OPropertySetHelper(OResultSet_BASE::rBHelper) ,m_pStatement(pStmt) diff --git a/connectivity/source/drivers/mork/MResultSet.hxx b/connectivity/source/drivers/mork/MResultSet.hxx index bcb6d473a4b1..054dc72e4ce3 100644 --- a/connectivity/source/drivers/mork/MResultSet.hxx +++ b/connectivity/source/drivers/mork/MResultSet.hxx @@ -86,7 +86,7 @@ namespace connectivity - ::boost::shared_ptr< ::connectivity::OSQLParseTreeIterator > + std::shared_ptr< ::connectivity::OSQLParseTreeIterator > m_pSQLIterator; const connectivity::OSQLParseNode* m_pParseTree; @@ -116,7 +116,7 @@ namespace connectivity public: DECLARE_SERVICE_INFO(); - OResultSet(OCommonStatement* pStmt, const ::boost::shared_ptr< ::connectivity::OSQLParseTreeIterator >& _pSQLIterator ); + OResultSet(OCommonStatement* pStmt, const std::shared_ptr< ::connectivity::OSQLParseTreeIterator >& _pSQLIterator ); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *() diff --git a/connectivity/source/drivers/mork/MStatement.hxx b/connectivity/source/drivers/mork/MStatement.hxx index 275264bdc2b8..8a92a6ec9b44 100644 --- a/connectivity/source/drivers/mork/MStatement.hxx +++ b/connectivity/source/drivers/mork/MStatement.hxx @@ -39,7 +39,7 @@ #include "MConnection.hxx" #include "MTable.hxx" -#include <boost/shared_ptr.hpp> +#include <memory> namespace connectivity { @@ -84,7 +84,7 @@ namespace connectivity OValueRow m_aRow; connectivity::OSQLParser m_aParser; - ::boost::shared_ptr< ::connectivity::OSQLParseTreeIterator > + std::shared_ptr< ::connectivity::OSQLParseTreeIterator > m_pSQLIterator; connectivity::OSQLParseNode* m_pParseTree; diff --git a/connectivity/source/drivers/mozab/MConnection.cxx b/connectivity/source/drivers/mozab/MConnection.cxx index 0f55b0e15e9e..c3381eca99bd 100644 --- a/connectivity/source/drivers/mozab/MConnection.cxx +++ b/connectivity/source/drivers/mozab/MConnection.cxx @@ -67,7 +67,7 @@ namespace connectivity { namespace mozab { struct ConnectionImplData { - ::boost::shared_ptr< ::comphelper::OfficeResourceBundle > pResourceBundle; + std::shared_ptr< ::comphelper::OfficeResourceBundle > pResourceBundle; }; diff --git a/connectivity/source/drivers/mozab/MConnection.hxx b/connectivity/source/drivers/mozab/MConnection.hxx index 597b73b4f249..11db44567959 100644 --- a/connectivity/source/drivers/mozab/MConnection.hxx +++ b/connectivity/source/drivers/mozab/MConnection.hxx @@ -104,7 +104,7 @@ namespace connectivity MozabDriver* m_pDriver; // Pointer to the owning // driver object ::std::unique_ptr< ConnectionImplData > m_pImplData; - // This is to be able to hold a boost::shared_ptr. If we would hold it as member, it would + // This is to be able to hold a std::shared_ptr. If we would hold it as member, it would // not compile the mozillasrc directory, since this directory is compiled without RTTI support // and boost seems to require RTTI on some platforms. // Store Catalog diff --git a/connectivity/source/drivers/mozab/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx index 427b3d6256d7..874cbe1de781 100644 --- a/connectivity/source/drivers/mozab/MResultSet.cxx +++ b/connectivity/source/drivers/mozab/MResultSet.cxx @@ -84,7 +84,7 @@ sal_Bool SAL_CALL OResultSet::supportsService( const OUString& _rServiceName ) t } -OResultSet::OResultSet(OCommonStatement* pStmt, const ::boost::shared_ptr< connectivity::OSQLParseTreeIterator >& _pSQLIterator ) +OResultSet::OResultSet(OCommonStatement* pStmt, const std::shared_ptr< connectivity::OSQLParseTreeIterator >& _pSQLIterator ) : OResultSet_BASE(m_aMutex) ,OPropertySetHelper(OResultSet_BASE::rBHelper) ,m_pStatement(pStmt) diff --git a/connectivity/source/drivers/mozab/MResultSet.hxx b/connectivity/source/drivers/mozab/MResultSet.hxx index 50475d284985..e4f2e07310d6 100644 --- a/connectivity/source/drivers/mozab/MResultSet.hxx +++ b/connectivity/source/drivers/mozab/MResultSet.hxx @@ -86,7 +86,7 @@ namespace connectivity - ::boost::shared_ptr< ::connectivity::OSQLParseTreeIterator > + std::shared_ptr< ::connectivity::OSQLParseTreeIterator > m_pSQLIterator; const connectivity::OSQLParseNode* m_pParseTree; @@ -116,7 +116,7 @@ namespace connectivity public: DECLARE_SERVICE_INFO(); - OResultSet(OCommonStatement* pStmt, const ::boost::shared_ptr< ::connectivity::OSQLParseTreeIterator >& _pSQLIterator ); + OResultSet(OCommonStatement* pStmt, const std::shared_ptr< ::connectivity::OSQLParseTreeIterator >& _pSQLIterator ); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *() diff --git a/connectivity/source/drivers/mozab/MStatement.hxx b/connectivity/source/drivers/mozab/MStatement.hxx index 9cef3544b9d0..1a9a35a3e29d 100644 --- a/connectivity/source/drivers/mozab/MStatement.hxx +++ b/connectivity/source/drivers/mozab/MStatement.hxx @@ -39,7 +39,7 @@ #include "MConnection.hxx" #include "MTable.hxx" -#include <boost/shared_ptr.hpp> +#include <memory> namespace connectivity { @@ -84,7 +84,7 @@ namespace connectivity OValueRow m_aRow; connectivity::OSQLParser m_aParser; - ::boost::shared_ptr< ::connectivity::OSQLParseTreeIterator > + std::shared_ptr< ::connectivity::OSQLParseTreeIterator > m_pSQLIterator; connectivity::OSQLParseNode* m_pParseTree; diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx index 9345b7f63a0c..6aa1c18cde4b 100644 --- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx +++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx @@ -36,7 +36,7 @@ #include <connectivity/FValue.hxx> #include "resource/common_res.hrc" #include <connectivity/sqlparse.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <boost/type_traits/remove_reference.hpp> #include <boost/type_traits/is_same.hpp> @@ -76,7 +76,7 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OUString OSQLParser aParser( comphelper::getComponentContext(_pConnection->getDriver()->getORB()) ); OUString sErrorMessage; OUString sNewSql; - boost::scoped_ptr<OSQLParseNode> pNode( aParser.parseTree(sErrorMessage,sql) ); + std::unique_ptr<OSQLParseNode> pNode( aParser.parseTree(sErrorMessage,sql) ); if ( pNode.get() ) { // special handling for parameters OSQLParseNode::substituteParameterNames(pNode.get()); diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx index 3ccf92a8e34a..a4af95e673d0 100644 --- a/connectivity/source/drivers/postgresql/pq_connection.cxx +++ b/connectivity/source/drivers/postgresql/pq_connection.cxx @@ -38,7 +38,7 @@ #include <time.h> #include <string.h> -#include <boost/shared_ptr.hpp> +#include <memory> #include "pq_connection.hxx" #include "pq_statement.hxx" @@ -547,7 +547,7 @@ void Connection::initialize( const Sequence< Any >& aArguments ) if ( o.getLength() > 0 ) { char *err; - boost::shared_ptr<PQconninfoOption> oOpts(PQconninfoParse(o.getStr(), &err), PQconninfoFree); + std::shared_ptr<PQconninfoOption> oOpts(PQconninfoParse(o.getStr(), &err), PQconninfoFree); if ( oOpts.get() == NULL ) { OUString errorMessage; diff --git a/connectivity/source/inc/RowFunctionParser.hxx b/connectivity/source/inc/RowFunctionParser.hxx index 86c769125bbf..a4f8d7d429b7 100644 --- a/connectivity/source/inc/RowFunctionParser.hxx +++ b/connectivity/source/inc/RowFunctionParser.hxx @@ -21,11 +21,10 @@ #define INCLUDED_CONNECTIVITY_SOURCE_INC_ROWFUNCTIONPARSER_HXX #include <sal/config.h> -#include <boost/shared_ptr.hpp> #include "FDatabaseMetaDataResultSet.hxx" -#include <vector> #include <connectivity/dbtoolsdllapi.hxx> - +#include <memory> +#include <vector> namespace connectivity { @@ -67,7 +66,7 @@ public: virtual void fill(const ODatabaseMetaDataResultSet::ORow& _aRow ) const = 0; }; -typedef ::boost::shared_ptr< ExpressionNode > ExpressionNodeSharedPtr; +typedef std::shared_ptr< ExpressionNode > ExpressionNodeSharedPtr; /** This exception is thrown, when the arithmetic expression parser failed to parse a string. diff --git a/connectivity/source/inc/hsqldb/HStorageMap.hxx b/connectivity/source/inc/hsqldb/HStorageMap.hxx index 746d691cef1c..01975b69696d 100644 --- a/connectivity/source/inc/hsqldb/HStorageMap.hxx +++ b/connectivity/source/inc/hsqldb/HStorageMap.hxx @@ -22,6 +22,7 @@ #include <sal/config.h> #include <map> +#include <memory> #include <com/sun/star/embed/XStorage.hpp> #include <com/sun/star/embed/XTransactionListener.hpp> @@ -29,7 +30,6 @@ #include <com/sun/star/io/XOutputStream.hpp> #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/io/XSeekable.hpp> -#include <boost/shared_ptr.hpp> #include <jni.h> namespace connectivity @@ -53,7 +53,7 @@ namespace connectivity }; - typedef std::map< OUString, ::boost::shared_ptr<StreamHelper> > TStreamMap; + typedef std::map< OUString, std::shared_ptr<StreamHelper> > TStreamMap; typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >, OUString > TStorageURLPair; typedef ::std::pair< TStorageURLPair, TStreamMap> TStoragePair; typedef std::map<OUString, TStoragePair> TStorages; diff --git a/connectivity/source/inc/java/lang/Object.hxx b/connectivity/source/inc/java/lang/Object.hxx index 2200bdf1b661..0efa942752a2 100644 --- a/connectivity/source/inc/java/lang/Object.hxx +++ b/connectivity/source/inc/java/lang/Object.hxx @@ -27,9 +27,7 @@ #include <osl/diagnose.h> #include <jvmaccess/virtualmachine.hxx> #include <functional> -#include <boost/shared_ptr.hpp> - - +#include <memory> #ifdef HAVE_64BIT_POINTERS #error "no 64 bit pointer" @@ -42,7 +40,7 @@ namespace comphelper namespace connectivity { - typedef ::boost::shared_ptr< jvmaccess::VirtualMachine::AttachGuard> TGuard; + typedef std::shared_ptr< jvmaccess::VirtualMachine::AttachGuard> TGuard; class SDBThreadAttach { jvmaccess::VirtualMachine::AttachGuard m_aGuard; diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 9de4ee88d9be..8b78dda65ef7 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -54,9 +54,9 @@ #include <tools/diagnose_ex.h> #include <string.h> #include <boost/bind.hpp> -#include <boost/scoped_ptr.hpp> #include <algorithm> #include <functional> +#include <memory> #include <rtl/ustrbuf.hxx> using namespace ::com::sun::star::sdbc; @@ -666,7 +666,7 @@ bool OSQLParseNode::impl_parseTableNameNodeToString_throw( OUStringBuffer& rStri if ( bEscapeProcessing && rParam.pParser ) { OUString sError; - boost::scoped_ptr< OSQLParseNode > pSubQueryNode( rParam.pParser->parseTree( sError, sCommand ) ); + std::unique_ptr< OSQLParseNode > pSubQueryNode( rParam.pParser->parseTree( sError, sCommand ) ); if ( pSubQueryNode.get() ) { // parse the sub-select to SDBC level, too |