Replace deprecated std::auto_ptr with boost::scoped_ptr
Change-Id: Iafdebacd43ed24a30fb8e2d041fe975a1adbcfa0
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
|
||||
#include <comphelper/logging.hxx>
|
||||
|
||||
#include <memory>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
using namespace connectivity;
|
||||
using namespace ::com::sun::star::uno;
|
||||
@@ -172,14 +172,14 @@ namespace
|
||||
|
||||
if ( _pEnvironment->IsInstanceOf( jThrow, java_sql_SQLException_BASE::st_getMyClass() ) )
|
||||
{
|
||||
::std::auto_ptr< java_sql_SQLException_BASE > pException( new java_sql_SQLException_BASE( _pEnvironment, jThrow ) );
|
||||
boost::scoped_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() ) )
|
||||
{
|
||||
::std::auto_ptr< java_lang_Throwable > pThrow( new java_lang_Throwable( _pEnvironment, jThrow ) );
|
||||
boost::scoped_ptr< java_lang_Throwable > pThrow( new java_lang_Throwable( _pEnvironment, jThrow ) );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
pThrow->printStackTrace();
|
||||
#endif
|
||||
|
@@ -55,7 +55,7 @@
|
||||
#include <unotools/configmgr.hxx>
|
||||
#include <unotools/sharedunocomponent.hxx>
|
||||
|
||||
#include <memory>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
using namespace ::dbaccess;
|
||||
using namespace ::dbtools;
|
||||
@@ -676,9 +676,7 @@ void OSingleSelectQueryComposer::setSingleAdditiveClause( SQLPart _ePart, const
|
||||
aClauses.push_back( getSQLPart( eLoopParts, m_aSqlIterator, sal_True ) );
|
||||
|
||||
// overwrite the one part in question here
|
||||
SAL_WNODEPRECATED_DECLARATIONS_PUSH
|
||||
::std::auto_ptr< TokenComposer > pComposer;
|
||||
SAL_WNODEPRECATED_DECLARATIONS_POP
|
||||
boost::scoped_ptr< TokenComposer > pComposer;
|
||||
if ( ( _ePart == Where ) || ( _ePart == Having ) )
|
||||
pComposer.reset( new FilterCreator );
|
||||
else
|
||||
@@ -816,9 +814,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
|
||||
OUString sSQL( aSQL.makeStringAndClear() );
|
||||
// normalize the statement so that it doesn't contain any application-level features anymore
|
||||
OUString sError;
|
||||
SAL_WNODEPRECATED_DECLARATIONS_PUSH
|
||||
const ::std::auto_ptr< OSQLParseNode > pStatementTree( m_aSqlParser.parseTree( sError, sSQL, false ) );
|
||||
SAL_WNODEPRECATED_DECLARATIONS_POP
|
||||
const boost::scoped_ptr< OSQLParseNode > pStatementTree( m_aSqlParser.parseTree( sError, sSQL, false ) );
|
||||
OSL_ENSURE( pStatementTree.get(), "OSingleSelectQueryComposer::getColumns: could not parse the column retrieval statement!" );
|
||||
if ( pStatementTree.get() )
|
||||
if ( !pStatementTree->parseNodeToExecutableStatement( sSQL, m_xConnection, m_aSqlParser, NULL ) )
|
||||
@@ -1738,9 +1734,7 @@ Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredC
|
||||
const OSQLParseNode* pTempNode = m_aAdditiveIterator.getParseTree();
|
||||
|
||||
OUString aErrorMsg;
|
||||
SAL_WNODEPRECATED_DECLARATIONS_PUSH
|
||||
::std::auto_ptr<OSQLParseNode> pSqlParseNode( m_aSqlParser.parseTree(aErrorMsg,aSql));
|
||||
SAL_WNODEPRECATED_DECLARATIONS_POP
|
||||
boost::scoped_ptr<OSQLParseNode> pSqlParseNode( m_aSqlParser.parseTree(aErrorMsg,aSql));
|
||||
if ( pSqlParseNode.get() )
|
||||
{
|
||||
m_aAdditiveIterator.setParseTree(pSqlParseNode.get());
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#include <vcl/image.hxx>
|
||||
#include "callbacks.hxx"
|
||||
#include "AppElementType.hxx"
|
||||
#include <memory>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
using namespace ::dbaui;
|
||||
// class OApplicationIconControl
|
||||
@@ -68,7 +68,7 @@ OApplicationIconControl::~OApplicationIconControl()
|
||||
SvxIconChoiceCtrlEntry* pEntry = GetEntry( i );
|
||||
if ( pEntry )
|
||||
{
|
||||
::std::auto_ptr<ElementType> aType(static_cast<ElementType*>(pEntry->GetUserData()));
|
||||
boost::scoped_ptr<ElementType> aType(static_cast<ElementType*>(pEntry->GetUserData()));
|
||||
pEntry->SetUserData(NULL);
|
||||
}
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@
|
||||
#include <comphelper/numbers.hxx>
|
||||
#include <comphelper/string.hxx>
|
||||
#include "UITools.hxx"
|
||||
#include <memory>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include "dbu_control.hrc"
|
||||
#include "dbu_tbl.hrc"
|
||||
#include <osl/diagnose.h>
|
||||
@@ -212,15 +212,11 @@ OFieldDescControl::~OFieldDescControl()
|
||||
{
|
||||
|
||||
{
|
||||
SAL_WNODEPRECATED_DECLARATIONS_PUSH
|
||||
::std::auto_ptr<Window> aTemp(m_pVertScroll);
|
||||
SAL_WNODEPRECATED_DECLARATIONS_POP
|
||||
boost::scoped_ptr<Window> aTemp(m_pVertScroll);
|
||||
m_pVertScroll = NULL;
|
||||
}
|
||||
{
|
||||
SAL_WNODEPRECATED_DECLARATIONS_PUSH
|
||||
::std::auto_ptr<Window> aTemp(m_pHorzScroll);
|
||||
SAL_WNODEPRECATED_DECLARATIONS_POP
|
||||
boost::scoped_ptr<Window> aTemp(m_pHorzScroll);
|
||||
m_pHorzScroll = NULL;
|
||||
}
|
||||
if ( m_bAdded )
|
||||
|
@@ -23,7 +23,8 @@
|
||||
#include <svl/stritem.hxx>
|
||||
#include <svl/eitem.hxx>
|
||||
|
||||
#include <memory>
|
||||
#include <cassert>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
namespace dbaui
|
||||
{
|
||||
@@ -61,7 +62,8 @@ namespace dbaui
|
||||
// TODO: one could throw an IllegalArgumentException here - finally, this method
|
||||
// is (to be) used from within an XPropertySet::setPropertyValue implementation,
|
||||
// where this would be the appropriate reaction on wrong value types
|
||||
::std::auto_ptr< ITEMTYPE > pClone( dynamic_cast< ITEMTYPE* >( pTypedItem->Clone() ) );
|
||||
boost::scoped_ptr< ITEMTYPE > pClone( dynamic_cast< ITEMTYPE* >( pTypedItem->Clone() ) );
|
||||
assert(pClone.get());
|
||||
pClone->SetValue( aValue );
|
||||
_rSet.Put( *pClone );
|
||||
return true;
|
||||
|
@@ -21,7 +21,7 @@
|
||||
#include <tools/debug.hxx>
|
||||
#include <svtools/svmedit.hxx>
|
||||
#include "dbaccess_helpid.hrc"
|
||||
#include <memory>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
using namespace dbaui;
|
||||
#define STANDARD_MARGIN 6
|
||||
// class OTableDesignHelpBar
|
||||
@@ -37,7 +37,7 @@ OTableDesignHelpBar::OTableDesignHelpBar( Window* pParent ) :
|
||||
|
||||
OTableDesignHelpBar::~OTableDesignHelpBar()
|
||||
{
|
||||
::std::auto_ptr<Window> aTemp(m_pTextWin);
|
||||
boost::scoped_ptr<Window> aTemp(m_pTextWin);
|
||||
m_pTextWin = NULL;
|
||||
}
|
||||
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#include <vcl/fixed.hxx>
|
||||
#include "dbaccess_helpid.hrc"
|
||||
#include "moduledbu.hxx"
|
||||
#include <memory>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
#define STANDARD_MARGIN 6
|
||||
#define DETAILS_HEADER_HEIGHT 25
|
||||
@@ -70,21 +70,15 @@ OTableFieldDescWin::~OTableFieldDescWin()
|
||||
m_pHeader->Hide();
|
||||
|
||||
{
|
||||
SAL_WNODEPRECATED_DECLARATIONS_PUSH
|
||||
::std::auto_ptr<Window> aTemp(m_pGenPage);
|
||||
SAL_WNODEPRECATED_DECLARATIONS_POP
|
||||
boost::scoped_ptr<Window> aTemp(m_pGenPage);
|
||||
m_pGenPage = NULL;
|
||||
}
|
||||
{
|
||||
SAL_WNODEPRECATED_DECLARATIONS_PUSH
|
||||
::std::auto_ptr<Window> aTemp(m_pHeader);
|
||||
SAL_WNODEPRECATED_DECLARATIONS_POP
|
||||
boost::scoped_ptr<Window> aTemp(m_pHeader);
|
||||
m_pHeader = NULL;
|
||||
}
|
||||
{
|
||||
SAL_WNODEPRECATED_DECLARATIONS_PUSH
|
||||
::std::auto_ptr<Window> aTemp(m_pHelpBar);
|
||||
SAL_WNODEPRECATED_DECLARATIONS_POP
|
||||
boost::scoped_ptr<Window> aTemp(m_pHelpBar);
|
||||
m_pHelpBar = NULL;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user