diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-20 11:27:10 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 12:37:44 +0100 |
commit | 61b224f392eb856bf4cfa0c04c68202a463cbdbf (patch) | |
tree | 77a28e38763bc5f9d95e2c278601d31dc6fbf65d /dbaccess/source/ui/app | |
parent | f1d9eef4163e88a3cb6360178b52ce441e65d8ae (diff) |
vclwidget: fixup locally allocated vcl::Window objects
They need to be wrapped in ScopedVclPtr in order to be disposed properly.
Change-Id: Ib64dba353774f54711e4de7f5d15d859c6a4dc7e
Diffstat (limited to 'dbaccess/source/ui/app')
-rw-r--r-- | dbaccess/source/ui/app/AppControllerDnD.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppControllerGen.cxx | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx index ec583e17860d..a4dff8c95b42 100644 --- a/dbaccess/source/ui/app/AppControllerDnD.cxx +++ b/dbaccess/source/ui/app/AppControllerDnD.cxx @@ -175,7 +175,7 @@ void OApplicationController::deleteTables(const ::std::vector< OUString>& _rList else { OUString sMessage(ModuleRes(STR_MISSING_TABLES_XDROP)); - VclPtr<MessageDialog> aError(new MessageDialog(getView(), sMessage)); + ScopedVclPtr<MessageDialog> aError(new MessageDialog(getView(), sMessage)); aError->Execute(); } } @@ -210,7 +210,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec if ( eResult != svtools::QUERYDELETE_ALL ) { - VclPtr<svtools::QueryDeleteDlg_Impl> aDlg( new svtools::QueryDeleteDlg_Impl(getView(), *aThisRound) ); + ScopedVclPtr<svtools::QueryDeleteDlg_Impl> aDlg( new svtools::QueryDeleteDlg_Impl(getView(), *aThisRound) ); if ( !sDialogPosition.isEmpty() ) aDlg->SetWindowState( sDialogPosition ); @@ -686,7 +686,7 @@ bool OApplicationController::paste( ElementType _eType, const ::svx::ODataAccess has a /table/ with that name) */ if ( bNeedAskForName ) { - VclPtr<OSaveAsDlg> aAskForName(new OSaveAsDlg( getView(), + ScopedVclPtr<OSaveAsDlg> aAskForName(new OSaveAsDlg( getView(), CommandType::QUERY, getORB(), getConnection(), diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index df90c32fd9dc..237a31f1033d 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -111,7 +111,7 @@ void OApplicationController::convertToView(const OUString& _sName) OUString aDefaultName = ::dbaui::createDefaultName(xMeta,xTables,aName); DynamicTableOrQueryNameCheck aNameChecker( xConnection, CommandType::TABLE ); - VclPtr<OSaveAsDlg> aDlg(new OSaveAsDlg( getView(), CommandType::TABLE, getORB(), xConnection, aDefaultName, aNameChecker ) ); + ScopedVclPtr<OSaveAsDlg> aDlg(new OSaveAsDlg( getView(), CommandType::TABLE, getORB(), xConnection, aDefaultName, aNameChecker ) ); if ( aDlg->Execute() == RET_OK ) { OUString sName = aDlg->getName(); @@ -534,7 +534,7 @@ void OApplicationController::askToReconnect() bool bClear = true; if ( !m_pSubComponentManager->empty() ) { - VclPtr<MessageDialog> aQry(new MessageDialog(getView(), ModuleRes(STR_QUERY_CLOSEDOCUMENTS), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + ScopedVclPtr<MessageDialog> aQry(new MessageDialog(getView(), ModuleRes(STR_QUERY_CLOSEDOCUMENTS), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); switch (aQry->Execute()) { case RET_YES: |