From d54a72a40852e206d78ab4c57a6898cfae39b8d0 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 24 Sep 2014 18:50:37 +0200 Subject: dbaccess: std::auto_ptr -> std::unique_ptr Change-Id: I2b27aaf589fcbe4da1680f624a57be7ae62b0dc5 --- dbaccess/source/ui/app/AppController.cxx | 42 +++++++------------------- dbaccess/source/ui/app/AppController.hxx | 6 ++-- dbaccess/source/ui/app/AppControllerDnD.cxx | 7 ++--- dbaccess/source/ui/app/AppDetailPageHelper.hxx | 2 +- dbaccess/source/ui/app/subcomponentmanager.hxx | 2 +- 5 files changed, 18 insertions(+), 41 deletions(-) (limited to 'dbaccess/source/ui/app') diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 092ee4a909b1..6eee77829d60 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -311,9 +311,7 @@ OApplicationController::~OApplicationController() osl_atomic_increment( &m_refCount ); dispose(); } - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< vcl::Window> aTemp( getView() ); - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr< vcl::Window> aTemp( getView() ); clearView(); } @@ -451,9 +449,7 @@ bool OApplicationController::Construct(vcl::Window* _pParent) if ( !bSuccess ) { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< vcl::Window> aTemp( getView() ); - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr< vcl::Window> aTemp( getView() ); clearView(); return false; } @@ -1069,9 +1065,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa if ( !aArgs.getLength() ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr pDlg(pFact->CreatePasteDialog( getView() )); - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr pDlg(pFact->CreatePasteDialog( getView() )); ::std::vector aFormatIds; getSupportedFormats(getContainer()->getElementType(),aFormatIds); const ::std::vector::iterator aEnd = aFormatIds.end(); @@ -1822,9 +1816,7 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const { if ( isStandaloneDocument || !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode, xRet ) ) { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< OLinkedDocumentsAccess > aHelper = getDocumentsAccess( _eType ); - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr< OLinkedDocumentsAccess > aHelper = getDocumentsAccess( _eType ); if ( !aHelper->isConnected() ) break; @@ -1846,9 +1838,7 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const if ( !xConnection.is() ) break; - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< DatabaseObjectView > pDesigner; - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr< DatabaseObjectView > pDesigner; ::comphelper::NamedValueCollection aArguments( _rAdditionalArguments ); Any aDataSource; @@ -1932,9 +1922,7 @@ void OApplicationController::newElementWithPilot( ElementType _eType ) case E_REPORT: case E_FORM: { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr aHelper = getDocumentsAccess(_eType); - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr aHelper = getDocumentsAccess(_eType); if ( aHelper->isConnected() ) { sal_Int32 nCommandType = -1; @@ -1949,9 +1937,7 @@ void OApplicationController::newElementWithPilot( ElementType _eType ) case E_QUERY: case E_TABLE: { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr aHelper = getDocumentsAccess(_eType); - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr aHelper = getDocumentsAccess(_eType); if ( aHelper->isConnected() ) { if ( E_QUERY == _eType ) @@ -1982,9 +1968,7 @@ Reference< XComponent > OApplicationController::newElement( ElementType _eType, case E_FORM: case E_REPORT: { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr aHelper = getDocumentsAccess( _eType ); - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr aHelper = getDocumentsAccess( _eType ); if ( !aHelper->isConnected() ) break; @@ -1995,9 +1979,7 @@ Reference< XComponent > OApplicationController::newElement( ElementType _eType, case E_QUERY: case E_TABLE: { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< DatabaseObjectView > pDesigner; - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr< DatabaseObjectView > pDesigner; SharedConnection xConnection( ensureConnection() ); if ( !xConnection.is() ) break; @@ -2067,10 +2049,8 @@ void OApplicationController::renameEntry() { if ( xContainer.is() ) { - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< IObjectNameCheck > pNameChecker; - ::std::auto_ptr< OSaveAsDlg > aDialog; - SAL_WNODEPRECATED_DECLARATIONS_POP + ::std::unique_ptr< IObjectNameCheck > pNameChecker; + ::std::unique_ptr< OSaveAsDlg > aDialog; Reference xRename; const ElementType eType = getContainer()->getElementType(); diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx index 2e262c67d22f..95a14572a611 100644 --- a/dbaccess/source/ui/app/AppController.hxx +++ b/dbaccess/source/ui/app/AppController.hxx @@ -123,7 +123,7 @@ namespace dbaui bool m_bNeedToReconnect; // true when the settings of the data source were modified and the connection is no longer up to date bool m_bSuspended; // is true when the controller was already suspended - ::std::auto_ptr< SelectionNotifier > + ::std::unique_ptr< SelectionNotifier > m_pSelectionNotifier; typedef ::std::map< ElementType, ::std::vector< OUString > > SelectionByElementType; SelectionByElementType m_aPendingSelection; @@ -248,9 +248,9 @@ namespace dbaui /** returns the document access for the specific type @param _eType the type - @return ::std::auto_ptr + @return ::std::unique_ptr */ - ::std::auto_ptr getDocumentsAccess(ElementType _eType); + ::std::unique_ptr getDocumentsAccess(ElementType _eType); /// returns the query definitions of the active data source. ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer> getQueryDefintions() const; diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx index e0c111aefb41..5957ac8fea93 100644 --- a/dbaccess/source/ui/app/AppControllerDnD.cxx +++ b/dbaccess/source/ui/app/AppControllerDnD.cxx @@ -492,8 +492,7 @@ void OApplicationController::getSelectionElementNames(::std::vector< OUString>& getContainer()->getSelectionElementNames( _rNames ); } -SAL_WNODEPRECATED_DECLARATIONS_PUSH -::std::auto_ptr< OLinkedDocumentsAccess > OApplicationController::getDocumentsAccess( ElementType _eType ) +::std::unique_ptr< OLinkedDocumentsAccess > OApplicationController::getDocumentsAccess( ElementType _eType ) { OSL_ENSURE( ( _eType == E_TABLE ) || ( _eType == E_QUERY ) || ( _eType == E_FORM ) || ( _eType == E_REPORT ), "OApplicationController::getDocumentsAccess: only forms and reports are supported here!" ); @@ -507,14 +506,12 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH OSL_ENSURE( xDocContainer.is(), "OApplicationController::getDocumentsAccess: invalid container!" ); } - ::std::auto_ptr< OLinkedDocumentsAccess > pDocuments( new OLinkedDocumentsAccess( + ::std::unique_ptr< OLinkedDocumentsAccess > pDocuments( new OLinkedDocumentsAccess( getView(), this, getORB(), xDocContainer, xConnection, getDatabaseName() ) ); return pDocuments; } -SAL_WNODEPRECATED_DECLARATIONS_POP - TransferableHelper* OApplicationController::copyObject() { try diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx index 24affd63da1e..95c3b63c6358 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx @@ -86,7 +86,7 @@ namespace dbaui ::svtools::ODocumentInfoPreview m_aDocumentInfo; vcl::Window* m_pTablePreview; - ::std::auto_ptr m_aMenu; + ::std::unique_ptr m_aMenu; PreviewMode m_ePreviewMode; ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 > m_xFrame; diff --git a/dbaccess/source/ui/app/subcomponentmanager.hxx b/dbaccess/source/ui/app/subcomponentmanager.hxx index 33e7711865e2..76bde5d2438a 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.hxx +++ b/dbaccess/source/ui/app/subcomponentmanager.hxx @@ -113,7 +113,7 @@ namespace dbaui ); private: - ::std::auto_ptr< SubComponentManager_Data > m_pData; + ::std::unique_ptr< SubComponentManager_Data > m_pData; }; } // namespace dbaui -- cgit v1.2.3