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 /dbaccess/source/ui/querydesign | |
parent | d41c58164f8e743b9bf7a8983174f71771872472 (diff) |
Replace deprecated std::auto_ptr with boost::scoped_ptr
Change-Id: I1ebfb33063d39f64dc59623df0f942501870c4e7
Diffstat (limited to 'dbaccess/source/ui/querydesign')
8 files changed, 25 insertions, 41 deletions
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx index 8fe635a1a312..75819b048ad5 100644 --- a/dbaccess/source/ui/querydesign/JoinController.cxx +++ b/dbaccess/source/ui/querydesign/JoinController.cxx @@ -58,6 +58,7 @@ #include <osl/diagnose.h> #include <boost/optional.hpp> +#include <boost/scoped_ptr.hpp> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::io; @@ -171,7 +172,7 @@ OJoinDesignView* OJoinController::getJoinView() void OJoinController::disposing() { { - ::std::auto_ptr< Window > pEnsureDelete( m_pAddTableDialog ); + boost::scoped_ptr< Window > pEnsureDelete( m_pAddTableDialog ); m_pAddTableDialog = NULL; } diff --git a/dbaccess/source/ui/querydesign/JoinDesignView.cxx b/dbaccess/source/ui/querydesign/JoinDesignView.cxx index ce3a7cafce43..cfe2d696d8e4 100644 --- a/dbaccess/source/ui/querydesign/JoinDesignView.cxx +++ b/dbaccess/source/ui/querydesign/JoinDesignView.cxx @@ -61,13 +61,9 @@ OJoinDesignView::OJoinDesignView(Window* _pParent, OJoinController& _rController OJoinDesignView::~OJoinDesignView() { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr<Window> aT3(m_pScrollWindow); - SAL_WNODEPRECATED_DECLARATIONS_POP + boost::scoped_ptr<Window> aT3(m_pScrollWindow); m_pScrollWindow = NULL; - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr<Window> aT2(m_pTableView); - SAL_WNODEPRECATED_DECLARATIONS_POP + boost::scoped_ptr<Window> aT2(m_pTableView); m_pTableView = NULL; } diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 203452c88915..3c04399e47c2 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -45,6 +45,7 @@ #include <comphelper/processfactory.hxx> #include <tools/diagnose_ex.h> #include <boost/bind.hpp> +#include <boost/scoped_ptr.hpp> #include <algorithm> #include <functional> @@ -88,9 +89,7 @@ OScrollWindowHelper::OScrollWindowHelper( Window* pParent) : Window( pParent) OScrollWindowHelper::~OScrollWindowHelper() { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr<Window> aTemp(m_pCornerWindow); - SAL_WNODEPRECATED_DECLARATIONS_POP + boost::scoped_ptr<Window> aTemp(m_pCornerWindow); m_pCornerWindow = NULL; m_pTableView = NULL; } @@ -1522,9 +1521,7 @@ void OJoinTableView::clearLayoutInformation() { if ( aIter->second ) aIter->second->clearListBox(); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr<Window> aTemp(aIter->second); - SAL_WNODEPRECATED_DECLARATIONS_POP + boost::scoped_ptr<Window> aTemp(aIter->second); aIter->second = NULL; } diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index dec894f54095..a98fa31d7bb1 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -53,6 +53,7 @@ #include "querycontainerwindow.hxx" #include "sqlmessage.hxx" #include <unotools/syslocale.hxx> +#include <boost/scoped_ptr.hpp> using namespace ::dbaui; using namespace ::utl; @@ -790,9 +791,7 @@ namespace OUString aTmp = aCriteria; OUString aErrorMsg; Reference<XPropertySet> xColumn; - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< ::connectivity::OSQLParseNode> pParseNode(_pView->getPredicateTreeFromEntry(pEntryField,aTmp,aErrorMsg,xColumn)); - SAL_WNODEPRECATED_DECLARATIONS_POP + boost::scoped_ptr< ::connectivity::OSQLParseNode> pParseNode(_pView->getPredicateTreeFromEntry(pEntryField,aTmp,aErrorMsg,xColumn)); if (pParseNode.get()) { if (bMulti && !(pEntryField->isOtherFunction() || (aFieldName.toChar() == '*'))) @@ -823,9 +822,7 @@ namespace OUString aTmp = aCriteria; OUString aErrorMsg; Reference<XPropertySet> xColumn; - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< ::connectivity::OSQLParseNode> pParseNode( _pView->getPredicateTreeFromEntry(pEntryField,aTmp,aErrorMsg,xColumn)); - SAL_WNODEPRECATED_DECLARATIONS_POP + boost::scoped_ptr< ::connectivity::OSQLParseNode> pParseNode( _pView->getPredicateTreeFromEntry(pEntryField,aTmp,aErrorMsg,xColumn)); if (pParseNode.get()) { if (bMulti && !(pEntryField->isOtherFunction() || (aFieldName.toChar() == '*'))) @@ -1168,9 +1165,7 @@ namespace OUString aTmp = pEntryField->GetField(); OUString aErrorMsg; Reference<XPropertySet> xColumn; - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< ::connectivity::OSQLParseNode> pParseNode(_pView->getPredicateTreeFromEntry(pEntryField,aTmp,aErrorMsg,xColumn)); - SAL_WNODEPRECATED_DECLARATIONS_POP + boost::scoped_ptr< ::connectivity::OSQLParseNode> pParseNode(_pView->getPredicateTreeFromEntry(pEntryField,aTmp,aErrorMsg,xColumn)); if (pParseNode.get()) { OUString sGroupBy; @@ -2521,9 +2516,7 @@ OQueryDesignView::~OQueryDesignView() { if ( m_pTableView ) ::dbaui::notifySystemWindow(this,m_pTableView,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr<Window> aTemp(m_pSelectionBox); - SAL_WNODEPRECATED_DECLARATIONS_POP + boost::scoped_ptr<Window> aTemp(m_pSelectionBox); m_pSelectionBox = NULL; } @@ -2929,9 +2922,7 @@ OUString OQueryDesignView::getStatement() { ::connectivity::OSQLParser& rParser( rController.getParser() ); OUString sErrorMessage; - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr<OSQLParseNode> pParseNode( rParser.parseTree( sErrorMessage, sSQL, sal_True ) ); - SAL_WNODEPRECATED_DECLARATIONS_POP + boost::scoped_ptr<OSQLParseNode> pParseNode( rParser.parseTree( sErrorMessage, sSQL, sal_True ) ); if ( pParseNode.get() ) { OSQLParseNode* pNode = pParseNode->getChild(3)->getChild(1); @@ -3043,9 +3034,7 @@ OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(OTableFieldDescRef pE sSql += " FROM x WHERE "; sSql += pEntry->GetField(); sSql += _sCriteria; - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr<OSQLParseNode> pParseNode( rParser.parseTree( _rsErrorMessage, sSql, sal_True ) ); - SAL_WNODEPRECATED_DECLARATIONS_POP + boost::scoped_ptr<OSQLParseNode> pParseNode( rParser.parseTree( _rsErrorMessage, sSql, sal_True ) ); nType = DataType::DOUBLE; if ( pParseNode.get() ) { diff --git a/dbaccess/source/ui/querydesign/QueryTextView.cxx b/dbaccess/source/ui/querydesign/QueryTextView.cxx index 4ebfebdd6d29..d550877e8e6e 100644 --- a/dbaccess/source/ui/querydesign/QueryTextView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTextView.cxx @@ -31,6 +31,7 @@ #include <vcl/svapp.hxx> #include <comphelper/types.hxx> #include "QueryDesignView.hxx" +#include <boost/scoped_ptr.hpp> using namespace dbaui; using namespace ::com::sun::star::uno; @@ -51,7 +52,7 @@ OQueryTextView::OQueryTextView(OQueryContainerWindow* _pParent) OQueryTextView::~OQueryTextView() { - ::std::auto_ptr<Window> aTemp(m_pEdit); + boost::scoped_ptr<Window> aTemp(m_pEdit); m_pEdit = NULL; } diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx index 21fbabb84256..fe4dc3f88fa0 100644 --- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx +++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx @@ -26,6 +26,7 @@ #include "adtabdlg.hxx" #include "querycontroller.hxx" #include "sqledit.hxx" +#include <boost/scoped_ptr.hpp> using namespace dbaui; using namespace ::com::sun::star::uno; @@ -42,15 +43,11 @@ OQueryViewSwitch::OQueryViewSwitch(OQueryContainerWindow* _pParent, OQueryContro OQueryViewSwitch::~OQueryViewSwitch() { { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr<Window> aTemp(m_pTextView); - SAL_WNODEPRECATED_DECLARATIONS_POP + boost::scoped_ptr<Window> aTemp(m_pTextView); m_pTextView = NULL; } { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr<Window> aTemp(m_pDesignView); - SAL_WNODEPRECATED_DECLARATIONS_POP + boost::scoped_ptr<Window> aTemp(m_pDesignView); m_pDesignView = NULL; } } diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index f4e6a73a5e51..4b22d3755e6c 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -45,6 +45,8 @@ #include <connectivity/dbtools.hxx> #include "svtools/treelistentry.hxx" +#include <boost/scoped_ptr.hpp> + using namespace dbaui; using namespace ::utl; using namespace ::com::sun::star; @@ -99,7 +101,7 @@ OTableWindow::~OTableWindow() if (m_pListBox) { OSL_ENSURE(m_pListBox->GetEntryCount()==0,"Forgot to call EmptyListbox()!"); - ::std::auto_ptr<Window> aTemp(m_pListBox); + boost::scoped_ptr<Window> aTemp(m_pListBox); m_pListBox = NULL; } if ( m_pContainerListener.is() ) diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx index 4bc0b92ea678..aeb31373b0e7 100644 --- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx +++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/frame/Frame.hpp> #include <com/sun/star/util/XCloseable.hpp> +#include <boost/scoped_ptr.hpp> namespace dbaui { @@ -56,7 +57,7 @@ namespace dbaui OQueryContainerWindow::~OQueryContainerWindow() { { - ::std::auto_ptr<OQueryViewSwitch> aTemp(m_pViewSwitch); + boost::scoped_ptr<OQueryViewSwitch> aTemp(m_pViewSwitch); m_pViewSwitch = NULL; } if ( m_pBeamer ) @@ -70,7 +71,7 @@ namespace dbaui xCloseable->close(sal_False); // false - holds the owner ship of this frame } - ::std::auto_ptr<Window> aTemp(m_pSplitter); + boost::scoped_ptr<Window> aTemp(m_pSplitter); m_pSplitter = NULL; } |