diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2014-02-22 21:51:27 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2014-02-22 21:51:27 +0900 |
commit | 3b06e5e646878c751c02f395dce9002822895f07 (patch) | |
tree | d6c010835546334c376b3c42af66cc2b62994a68 /connectivity | |
parent | Strategic SolarMutexGuard (diff) | |
download | core-3b06e5e646878c751c02f395dce9002822895f07.tar.gz core-3b06e5e646878c751c02f395dce9002822895f07.zip |
Replace deprecated std::auto_ptr with boost::scoped_ptr
Change-Id: I1ebfb33063d39f64dc59623df0f942501870c4e7
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/commontools/predicateinput.cxx | 3 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HDriver.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/drivers/jdbc/PreparedStatement.cxx | 3 | ||||
-rw-r--r-- | connectivity/source/drivers/jdbc/ResultSet.cxx | 3 | ||||
-rw-r--r-- | connectivity/source/drivers/odbc/OPreparedStatement.cxx | 3 | ||||
-rw-r--r-- | connectivity/source/parse/sqliterator.cxx | 3 | ||||
-rw-r--r-- | connectivity/source/parse/sqlnode.cxx | 3 |
7 files changed, 15 insertions, 7 deletions
diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx index ca69ce7074ee..79cc2697c64b 100644 --- a/connectivity/source/commontools/predicateinput.cxx +++ b/connectivity/source/commontools/predicateinput.cxx @@ -31,6 +31,7 @@ #include <connectivity/PColumn.hxx> #include <comphelper/numbers.hxx> +#include <boost/scoped_ptr.hpp> #include <boost/shared_ptr.hpp> //......................................................................... @@ -344,7 +345,7 @@ namespace dbtools { // first try the international version OUString sSql = "SELECT * FROM x WHERE " + sField + _rPredicateValue; - ::std::auto_ptr<OSQLParseNode> pParseNode( const_cast< OSQLParser& >( m_aParser ).parseTree( sError, sSql, sal_True ) ); + boost::scoped_ptr<OSQLParseNode> pParseNode( const_cast< OSQLParser& >( m_aParser ).parseTree( sError, sSql, sal_True ) ); nType = DataType::DOUBLE; if ( pParseNode.get() ) { diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 37eee505d7d6..f11ca6154bc4 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -57,6 +57,8 @@ #include <o3tl/compat_functional.hxx> +#include <boost/scoped_ptr.hpp> + //........................................................................ namespace connectivity { @@ -266,7 +268,7 @@ namespace connectivity Reference<XStream > xStream = xStorage->openStreamElement(sProperties,ElementModes::READ); if ( xStream.is() ) { - ::std::auto_ptr<SvStream> pStream( ::utl::UcbStreamHelper::CreateStream(xStream) ); + boost::scoped_ptr<SvStream> pStream( ::utl::UcbStreamHelper::CreateStream(xStream) ); if ( pStream.get() ) { OString sLine; diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx index c66b703075f0..fa941de61820 100644 --- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx +++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx @@ -34,6 +34,7 @@ #include "resource/sharedresources.hxx" #include "java/LocalRef.hxx" #include <string.h> +#include <boost/scoped_ptr.hpp> using namespace connectivity; using namespace ::com::sun::star::uno; @@ -340,7 +341,7 @@ void SAL_CALL java_sql_PreparedStatement::setObjectWithInfo( sal_Int32 parameter case DataType::DECIMAL: case DataType::NUMERIC: { - ::std::auto_ptr<java_math_BigDecimal> pBigDecimal; + boost::scoped_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 34526cacdbde..1b3c38c658c0 100644 --- a/connectivity/source/drivers/jdbc/ResultSet.cxx +++ b/connectivity/source/drivers/jdbc/ResultSet.cxx @@ -46,6 +46,7 @@ #include "java/LocalRef.hxx" #include <string.h> +#include <boost/scoped_ptr.hpp> using namespace ::comphelper; @@ -873,7 +874,7 @@ void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, co { // convert parameter double nTemp = 0.0; - ::std::auto_ptr<java_math_BigDecimal> pBigDecimal; + boost::scoped_ptr<java_math_BigDecimal> pBigDecimal; if ( x >>= nTemp) { pBigDecimal.reset(new java_math_BigDecimal(nTemp)); diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx index c0e4f0dfc9cb..c5a3bdf0bc74 100644 --- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx +++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx @@ -38,6 +38,7 @@ #include "connectivity/FValue.hxx" #include "resource/common_res.hrc" #include "connectivity/sqlparse.hxx" +#include <boost/scoped_ptr.hpp> #include <boost/type_traits/remove_reference.hpp> #include <boost/type_traits/is_same.hpp> @@ -77,7 +78,7 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OUString OSQLParser aParser( comphelper::getComponentContext(_pConnection->getDriver()->getORB()) ); OUString sErrorMessage; OUString sNewSql; - ::std::auto_ptr<OSQLParseNode> pNode( aParser.parseTree(sErrorMessage,sql) ); + boost::scoped_ptr<OSQLParseNode> pNode( aParser.parseTree(sErrorMessage,sql) ); if ( pNode.get() ) { // special handling for parameters OSQLParseNode::substituteParameterNames(pNode.get()); diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index 31a69ae4ff89..f896a1ec10df 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -41,6 +41,7 @@ #include <iterator> +#include <boost/scoped_ptr.hpp> using namespace ::comphelper; using namespace ::connectivity; @@ -339,7 +340,7 @@ void OSQLParseTreeIterator::impl_getQueryParameterColumns( const OSQLTable& _rQu break; OUString sError; - ::std::auto_ptr< OSQLParseNode > pSubQueryNode( const_cast< OSQLParser& >( m_rParser ).parseTree( sError, sSubQueryCommand, sal_False ) ); + boost::scoped_ptr< OSQLParseNode > pSubQueryNode( const_cast< OSQLParser& >( m_rParser ).parseTree( sError, sSubQueryCommand, sal_False ) ); if ( !pSubQueryNode.get() ) break; diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 2e60e8e88bf6..5ac2712bed11 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -54,6 +54,7 @@ #include <tools/diagnose_ex.h> #include <string.h> #include <boost/bind.hpp> +#include <boost/scoped_ptr.hpp> #include <boost/static_assert.hpp> #include <algorithm> #include <functional> @@ -687,7 +688,7 @@ bool OSQLParseNode::impl_parseTableNameNodeToString_throw( OUStringBuffer& rStri if ( bEscapeProcessing && rParam.pParser ) { OUString sError; - ::std::auto_ptr< OSQLParseNode > pSubQueryNode( rParam.pParser->parseTree( sError, sCommand, sal_False ) ); + boost::scoped_ptr< OSQLParseNode > pSubQueryNode( rParam.pParser->parseTree( sError, sCommand, sal_False ) ); if ( pSubQueryNode.get() ) { // parse the sub-select to SDBC level, too |