diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-11 14:42:23 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-09 22:17:00 +0100 |
commit | 00f2787a4a68633206635743298926bf2e65a8fa (patch) | |
tree | efc3a4f02b3d8acd69d25071499be5a475cb0338 /dbaccess/source/ui/relationdesign/RelationTableView.cxx | |
parent | b3dcb2996b70caabda1939c9e85545c97d78404a (diff) |
vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr
Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133
Conflicts:
sw/qa/tiledrendering/tiledrendering.cxx
Diffstat (limited to 'dbaccess/source/ui/relationdesign/RelationTableView.cxx')
-rw-r--r-- | dbaccess/source/ui/relationdesign/RelationTableView.cxx | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index bf39293e01a2..8f1ed9ff6dcc 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -222,8 +222,8 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const void ORelationTableView::ConnDoubleClicked( OTableConnection* pConnection ) { - ORelationDialog aRelDlg( this, pConnection->GetData() ); - switch (aRelDlg.Execute()) + VclPtr<ORelationDialog> aRelDlg(new ORelationDialog( this, pConnection->GetData() )); + switch (aRelDlg->Execute()) { case RET_OK: // successfully updated @@ -250,9 +250,9 @@ void ORelationTableView::AddNewRelation() { TTableConnectionData::value_type pNewConnData( new ORelationTableConnectionData() ); - ORelationDialog aRelDlg(this, pNewConnData, true); + VclPtr<ORelationDialog> aRelDlg(new ORelationDialog(this, pNewConnData, true)); - bool bSuccess = (aRelDlg.Execute() == RET_OK); + bool bSuccess = (aRelDlg->Execute() == RET_OK); if (bSuccess) { // already updated by the dialog @@ -325,8 +325,8 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin ) { - OSQLWarningBox aDlg( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES ); - if ( m_bInRemove || aDlg.Execute() == RET_YES ) + VclPtr<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(); OJoinTableView::RemoveTabWin( pTabWin ); @@ -343,13 +343,14 @@ void ORelationTableView::lookForUiActivities() { OUString sTitle(ModuleRes(STR_RELATIONDESIGN)); sTitle = sTitle.copy(3); - 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); - aDlg.AddButton( ModuleRes(STR_QUERY_REL_CREATE), RET_YES, 0); - aDlg.AddButton( StandardButtonType::Cancel,RET_CANCEL,0); - sal_uInt16 nRet = aDlg.Execute(); + + VclPtr<OSQLMessageBox> aDlg(new OSQLMessageBox(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); + aDlg->AddButton( ModuleRes(STR_QUERY_REL_CREATE), RET_YES, 0); + aDlg->AddButton( StandardButtonType::Cancel,RET_CANCEL,0); + sal_uInt16 nRet = aDlg->Execute(); if( nRet == RET_CANCEL) { m_pCurrentlyTabConnData.reset(); @@ -363,8 +364,8 @@ void ORelationTableView::lookForUiActivities() } if(m_pCurrentlyTabConnData) { - ORelationDialog aRelDlg( this, m_pCurrentlyTabConnData ); - if (aRelDlg.Execute() == RET_OK) + VclPtr<ORelationDialog> aRelDlg(new ORelationDialog( this, m_pCurrentlyTabConnData ) ); + if (aRelDlg->Execute() == RET_OK) { // already updated by the dialog addConnection( new ORelationTableConnection( this, m_pCurrentlyTabConnData ) ); |