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/relationdesign | |
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/relationdesign')
-rw-r--r-- | dbaccess/source/ui/relationdesign/RelationController.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/relationdesign/RelationTableView.cxx | 11 |
2 files changed, 7 insertions, 8 deletions
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<OSQLMessageBox> aDlg(new OSQLMessageBox(NULL,sTitle,ModuleRes(STR_RELATIONDESIGN_NOT_AVAILABLE))); + ScopedVclPtr<OSQLMessageBox> 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<MessageDialog> aQry(new MessageDialog(getView(), "DesignSaveModifiedDialog", + ScopedVclPtr<MessageDialog> aQry(new MessageDialog(getView(), "DesignSaveModifiedDialog", "dbaccess/ui/designsavemodifieddialog.ui")); nSaved = aQry->Execute(); if(nSaved == RET_YES) diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index 615a760349de..051f03fbf2e9 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -223,7 +223,7 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const void ORelationTableView::ConnDoubleClicked( OTableConnection* pConnection ) { - VclPtr<ORelationDialog> aRelDlg(new ORelationDialog( this, pConnection->GetData() )); + ScopedVclPtr<ORelationDialog> aRelDlg(new ORelationDialog( this, pConnection->GetData() )); switch (aRelDlg->Execute()) { case RET_OK: @@ -251,7 +251,7 @@ void ORelationTableView::AddNewRelation() { TTableConnectionData::value_type pNewConnData( new ORelationTableConnectionData() ); - VclPtr<ORelationDialog> aRelDlg(new ORelationDialog(this, pNewConnData, true)); + ScopedVclPtr<ORelationDialog> aRelDlg(new ORelationDialog(this, pNewConnData, true)); bool bSuccess = (aRelDlg->Execute() == RET_OK); if (bSuccess) @@ -326,7 +326,7 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin ) { - VclPtr<OSQLWarningBox> aDlg(new OSQLWarningBox( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES )); + ScopedVclPtr<OSQLWarningBox> aDlg(new OSQLWarningBox( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES )); if ( m_bInRemove || aDlg->Execute() == RET_YES ) { m_pView->getController().ClearUndoManager(); @@ -344,8 +344,7 @@ void ORelationTableView::lookForUiActivities() { OUString sTitle(ModuleRes(STR_RELATIONDESIGN)); sTitle = sTitle.copy(3); - - VclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox(this,ModuleRes(STR_QUERY_REL_EDIT_RELATION),OUString(),0)); + ScopedVclPtrInstance<OSQLMessageBox> aDlg(this,ModuleRes(STR_QUERY_REL_EDIT_RELATION),OUString(),0); aDlg->SetText(sTitle); aDlg->RemoveButton(aDlg->GetButtonId(0)); aDlg->AddButton( ModuleRes(STR_QUERY_REL_EDIT), RET_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON); @@ -365,7 +364,7 @@ void ORelationTableView::lookForUiActivities() } if(m_pCurrentlyTabConnData) { - VclPtr<ORelationDialog> aRelDlg(new ORelationDialog( this, m_pCurrentlyTabConnData ) ); + ScopedVclPtr<ORelationDialog> aRelDlg(new ORelationDialog( this, m_pCurrentlyTabConnData ) ); if (aRelDlg->Execute() == RET_OK) { // already updated by the dialog |