From 00f2787a4a68633206635743298926bf2e65a8fa Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 11 Feb 2015 14:42:23 +0200 Subject: vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133 Conflicts: sw/qa/tiledrendering/tiledrendering.cxx --- dbaccess/source/ui/relationdesign/RelationController.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dbaccess/source/ui/relationdesign/RelationController.cxx') diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index 184a20e27f0e..6982b38a7888 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -205,8 +205,8 @@ void ORelationController::impl_initialize() { OUString sTitle(ModuleRes(STR_RELATIONDESIGN)); sTitle = sTitle.copy(3); - OSQLMessageBox aDlg(NULL,sTitle,ModuleRes(STR_RELATIONDESIGN_NOT_AVAILABLE)); - aDlg.Execute(); + VclPtr aDlg(new OSQLMessageBox(NULL,sTitle,ModuleRes(STR_RELATIONDESIGN_NOT_AVAILABLE))); + aDlg->Execute(); } disconnect(); throw SQLException(); @@ -255,9 +255,9 @@ short ORelationController::saveModified() short nSaved = RET_YES; if(haveDataSource() && isModified()) { - MessageDialog aQry(getView(), "DesignSaveModifiedDialog", - "dbaccess/ui/designsavemodifieddialog.ui"); - nSaved = aQry.Execute(); + VclPtr aQry(new MessageDialog(getView(), "DesignSaveModifiedDialog", + "dbaccess/ui/designsavemodifieddialog.ui")); + nSaved = aQry->Execute(); if(nSaved == RET_YES) Execute(ID_BROWSER_SAVEDOC,Sequence()); } -- cgit 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/relationdesign/RelationController.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dbaccess/source/ui/relationdesign/RelationController.cxx') diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index 6982b38a7888..8415437ce6ba 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -205,7 +205,7 @@ void ORelationController::impl_initialize() { OUString sTitle(ModuleRes(STR_RELATIONDESIGN)); sTitle = sTitle.copy(3); - VclPtr aDlg(new OSQLMessageBox(NULL,sTitle,ModuleRes(STR_RELATIONDESIGN_NOT_AVAILABLE))); + ScopedVclPtr aDlg(new OSQLMessageBox(NULL,sTitle,ModuleRes(STR_RELATIONDESIGN_NOT_AVAILABLE))); aDlg->Execute(); } disconnect(); @@ -255,7 +255,7 @@ short ORelationController::saveModified() short nSaved = RET_YES; if(haveDataSource() && isModified()) { - VclPtr aQry(new MessageDialog(getView(), "DesignSaveModifiedDialog", + ScopedVclPtr aQry(new MessageDialog(getView(), "DesignSaveModifiedDialog", "dbaccess/ui/designsavemodifieddialog.ui")); nSaved = aQry->Execute(); if(nSaved == RET_YES) -- cgit From 5d133eb62187ae910772ff5dfeb8f2c3276e8481 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 31 Mar 2015 20:57:16 +0100 Subject: first half of non-scriptable, Instance constructor conversion. Change-Id: If73bb41bfa805e22609748f25971724b4778edb3 --- dbaccess/source/ui/relationdesign/RelationController.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dbaccess/source/ui/relationdesign/RelationController.cxx') diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index 8415437ce6ba..f9a9dcf6cf6b 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -255,8 +255,8 @@ short ORelationController::saveModified() short nSaved = RET_YES; if(haveDataSource() && isModified()) { - ScopedVclPtr aQry(new MessageDialog(getView(), "DesignSaveModifiedDialog", - "dbaccess/ui/designsavemodifieddialog.ui")); + ScopedVclPtrInstance aQry(getView(), "DesignSaveModifiedDialog", + "dbaccess/ui/designsavemodifieddialog.ui"); nSaved = aQry->Execute(); if(nSaved == RET_YES) Execute(ID_BROWSER_SAVEDOC,Sequence()); -- cgit From 8a65284fe31e6c0a927cb88b75df7845cd248572 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 31 Mar 2015 23:04:14 +0100 Subject: Automated conversion of VclPtr construction to use Instance template. Change-Id: I8be9141b9653e73ebd23a5a3d810f240c376f97e --- dbaccess/source/ui/relationdesign/RelationController.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dbaccess/source/ui/relationdesign/RelationController.cxx') diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index f9a9dcf6cf6b..c1aa00d46bb2 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -205,7 +205,7 @@ void ORelationController::impl_initialize() { OUString sTitle(ModuleRes(STR_RELATIONDESIGN)); sTitle = sTitle.copy(3); - ScopedVclPtr aDlg(new OSQLMessageBox(NULL,sTitle,ModuleRes(STR_RELATIONDESIGN_NOT_AVAILABLE))); + ScopedVclPtrInstance< OSQLMessageBox > aDlg(nullptr,sTitle,ModuleRes(STR_RELATIONDESIGN_NOT_AVAILABLE)); aDlg->Execute(); } disconnect(); -- cgit From f12488405cdfd8555078d15807aafc5ffd1b037b Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Mon, 20 Apr 2015 14:00:04 +0100 Subject: dbaccess: convert new to ::Create. Also convert svtools' WizardShell::createPage. Change-Id: I09bd40ef4748aa2de7b49eeefc95be06b545ea05 --- dbaccess/source/ui/relationdesign/RelationController.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dbaccess/source/ui/relationdesign/RelationController.cxx') diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index c1aa00d46bb2..8bfa419220ad 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -245,7 +245,7 @@ OUString ORelationController::getPrivateTitle( ) const bool ORelationController::Construct(vcl::Window* pParent) { - setView( * new ORelationDesignView( pParent, *this, getORB() ) ); + setView( VclPtr::Create( pParent, *this, getORB() ) ); OJoinController::Construct(pParent); return true; } -- cgit