From 61b224f392eb856bf4cfa0c04c68202a463cbdbf Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 20 Mar 2015 11:27:10 +0200 Subject: vclwidget: fixup locally allocated vcl::Window objects They need to be wrapped in ScopedVclPtr in order to be disposed properly. Change-Id: Ib64dba353774f54711e4de7f5d15d859c6a4dc7e --- dbaccess/source/ui/app/AppControllerDnD.cxx | 6 +++--- dbaccess/source/ui/app/AppControllerGen.cxx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'dbaccess/source/ui/app') 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 aError(new MessageDialog(getView(), sMessage)); + ScopedVclPtr 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 aDlg( new svtools::QueryDeleteDlg_Impl(getView(), *aThisRound) ); + ScopedVclPtr 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 aAskForName(new OSaveAsDlg( getView(), + ScopedVclPtr 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 aDlg(new OSaveAsDlg( getView(), CommandType::TABLE, getORB(), xConnection, aDefaultName, aNameChecker ) ); + ScopedVclPtr 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 aQry(new MessageDialog(getView(), ModuleRes(STR_QUERY_CLOSEDOCUMENTS), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + ScopedVclPtr aQry(new MessageDialog(getView(), ModuleRes(STR_QUERY_CLOSEDOCUMENTS), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); switch (aQry->Execute()) { case RET_YES: -- cgit