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 /basctl | |
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 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 10 | ||||
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 10 | ||||
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 8 | ||||
-rw-r--r-- | basctl/source/basicide/basides1.cxx | 8 | ||||
-rw-r--r-- | basctl/source/basicide/basobj2.cxx | 8 | ||||
-rw-r--r-- | basctl/source/basicide/basobj3.cxx | 8 | ||||
-rw-r--r-- | basctl/source/basicide/bastypes.cxx | 18 | ||||
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 16 | ||||
-rw-r--r-- | basctl/source/basicide/moduldlg.cxx | 18 | ||||
-rw-r--r-- | basctl/source/dlged/managelang.cxx | 10 |
10 files changed, 57 insertions, 57 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index a5d4af81b6c7..9b4837673dbe 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -619,8 +619,8 @@ void ModulWindow::BasicToggleBreakPointEnabled() void ModulWindow::ManageBreakPoints() { BreakPointWindow& rBrkWin = GetBreakPointWindow(); - BreakPointDialog aBrkDlg( &rBrkWin, GetBreakPoints() ); - aBrkDlg.Execute(); + VclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( &rBrkWin, GetBreakPoints() )); + aBrkDlg->Execute(); rBrkWin.Invalidate(); } @@ -1043,9 +1043,9 @@ void ModulWindow::ExecuteCommand (SfxRequest& rReq) break; case SID_GOTOLINE: { - GotoLineDialog aGotoDlg(this); - if (aGotoDlg.Execute()) - if (sal_Int32 const nLine = aGotoDlg.GetLineNumber()) + VclPtr<GotoLineDialog> aGotoDlg(new GotoLineDialog(this)); + if (aGotoDlg->Execute()) + if (sal_Int32 const nLine = aGotoDlg->GetLineNumber()) { TextSelection const aSel(TextPaM(nLine - 1, 0), TextPaM(nLine - 1, 0)); GetEditView()->SetSelection(aSel); diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 605c1f4d6752..be6895cdfd42 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1519,9 +1519,9 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt ) break; case RID_BRKPROPS: { - BreakPointDialog aBrkDlg( this, GetBreakPoints() ); - aBrkDlg.SetCurrentBreakPoint( pBrk ); - aBrkDlg.Execute(); + VclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( this, GetBreakPoints() )); + aBrkDlg->SetCurrentBreakPoint( pBrk ); + aBrkDlg->Execute(); Invalidate(); } break; @@ -1534,8 +1534,8 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt ) { case RID_BRKDLG: { - BreakPointDialog aBrkDlg( this, GetBreakPoints() ); - aBrkDlg.Execute(); + VclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( this, GetBreakPoints() )); + aBrkDlg->Execute(); Invalidate(); } break; diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 7a6a04ee6708..642981f8e7cc 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -1024,8 +1024,8 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TEXT)); aQueryBoxText = aQueryBoxText.replaceAll("$(ARG1)", aXmlDlgName); - NameClashQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ); - sal_uInt16 nRet = aQueryBox.Execute(); + VclPtr<NameClashQueryBox> aQueryBox(new NameClashQueryBox( pWin, aQueryBoxTitle, aQueryBoxText )); + sal_uInt16 nRet = aQueryBox->Execute(); if( RET_YES == nRet ) { // RET_YES == Rename, see NameClashQueryBox::NameClashQueryBox @@ -1086,8 +1086,8 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script { OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TITLE)); OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TEXT)); - LanguageMismatchQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ); - sal_uInt16 nRet = aQueryBox.Execute(); + VclPtr<LanguageMismatchQueryBox> aQueryBox(new LanguageMismatchQueryBox( pWin, aQueryBoxTitle, aQueryBoxText )); + sal_uInt16 nRet = aQueryBox->Execute(); if( RET_YES == nRet ) { // RET_YES == Add, see LanguageMismatchQueryBox::LanguageMismatchQueryBox diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 2f1e8fdc7304..c6374bf8e43d 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -136,8 +136,8 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) SfxViewFrame* pViewFrame = GetViewFrame(); SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow( SID_SEARCH_DLG ) : NULL; vcl::Window* pParent = pChildWin ? pChildWin->GetWindow() : NULL; - QueryBox aQuery(pParent, WB_YES_NO|WB_DEF_YES, IDE_RESSTR(RID_STR_SEARCHFROMSTART)); - if ( aQuery.Execute() == RET_YES ) + VclPtr<QueryBox> aQuery(new QueryBox(pParent, WB_YES_NO|WB_DEF_YES, IDE_RESSTR(RID_STR_SEARCHFROMSTART))); + if ( aQuery->Execute() == RET_YES ) { it = aWindowTable.begin(); if ( it != aWindowTable.end() ) @@ -676,8 +676,8 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) case SID_BASICIDE_MANAGE_LANG: { - ManageLanguageDialog aDlg(pCurWin, m_pCurLocalizationMgr); - aDlg.Execute(); + VclPtr<ManageLanguageDialog> aDlg(new ManageLanguageDialog(pCurWin, m_pCurLocalizationMgr)); + aDlg->Execute(); rReq.Done(); } break; diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index 2e41965b81c9..6fee19e737b5 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -149,16 +149,16 @@ bool RenameModule ( if ( rDocument.hasModule( rLibName, rNewName ) ) { - MessageDialog aError(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)); - aError.Execute(); + VclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2))); + aError->Execute(); return false; } // #i74440 if ( rNewName.isEmpty() ) { - MessageDialog aError(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME)); - aError.Execute(); + VclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME))); + aError->Execute(); return false; } diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx index 87f5790e2765..c280c3b7be0b 100644 --- a/basctl/source/basicide/basobj3.cxx +++ b/basctl/source/basicide/basobj3.cxx @@ -155,16 +155,16 @@ bool RenameDialog ( if ( rDocument.hasDialog( rLibName, rNewName ) ) { - MessageDialog aError(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)); - aError.Execute(); + VclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2))); + aError->Execute(); return false; } // #i74440 if ( rNewName.isEmpty() ) { - MessageDialog aError(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME)); - aError.Execute(); + VclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME))); + aError->Execute(); return false; } diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 0da73c2c1c90..3a6be366accc 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -790,8 +790,8 @@ bool QueryDel( const OUString& rName, const ResId& rId, vcl::Window* pParent ) aNameBuf.append('\''); aNameBuf.insert(0, '\''); aQuery = aQuery.replaceAll("XX", aNameBuf.makeStringAndClear()); - MessageDialog aQueryBox(pParent, aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); - return ( aQueryBox.Execute() == RET_YES ); + VclPtr<MessageDialog> aQueryBox(new MessageDialog(pParent, aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)); + return ( aQueryBox->Execute() == RET_YES ); } bool QueryDelMacro( const OUString& rName, vcl::Window* pParent ) @@ -827,19 +827,19 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, do { // password dialog - SfxPasswordDialog aDlg(Application::GetDefDialogParent()); - aDlg.SetMinLen( 1 ); + VclPtr<SfxPasswordDialog> aDlg(new SfxPasswordDialog(Application::GetDefDialogParent())); + aDlg->SetMinLen( 1 ); // set new title if ( bNewTitle ) { OUString aTitle(IDE_RESSTR(RID_STR_ENTERPASSWORD)); aTitle = aTitle.replaceAll("XX", rLibName); - aDlg.SetText( aTitle ); + aDlg->SetText( aTitle ); } // execute dialog - nRet = aDlg.Execute(); + nRet = aDlg->Execute(); // verify password if ( nRet == RET_OK ) @@ -849,14 +849,14 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, Reference< script::XLibraryContainerPassword > xPasswd( xLibContainer, UNO_QUERY ); if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( rLibName ) && !xPasswd->isLibraryPasswordVerified( rLibName ) ) { - rPassword = aDlg.GetPassword(); + rPassword = aDlg->GetPassword(); // OUString aOUPassword( rPassword ); bOK = xPasswd->verifyLibraryPassword( rLibName, rPassword ); if ( !bOK ) { - MessageDialog aErrorBox(Application::GetDefDialogParent(), IDE_RESSTR(RID_STR_WRONGPASSWORD)); - aErrorBox.Execute(); + VclPtr<MessageDialog> aErrorBox(new MessageDialog(Application::GetDefDialogParent(), IDE_RESSTR(RID_STR_WRONGPASSWORD))); + aErrorBox->Execute(); } } } diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 9907076da27e..48cd1ed09b95 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -1078,12 +1078,12 @@ void LibPage::Export( void ) return; } - ExportDialog aNewDlg(this); - if (aNewDlg.Execute() == RET_OK) + VclPtr<ExportDialog> aNewDlg(new ExportDialog(this)); + if (aNewDlg->Execute() == RET_OK) { try { - if (aNewDlg.isExportAsPackage()) + if (aNewDlg->isExportAsPackage()) ExportAsPackage( aLibName ); else ExportAsBasic( aLibName ); @@ -1454,13 +1454,13 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument, i++; } - NewObjectDialog aNewDlg(pWin, ObjectMode::Library); - aNewDlg.SetObjectName(aLibName); + VclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(pWin, ObjectMode::Library)); + aNewDlg->SetObjectName(aLibName); - if (aNewDlg.Execute()) + if (aNewDlg->Execute()) { - if (!aNewDlg.GetObjectName().isEmpty()) - aLibName = aNewDlg.GetObjectName(); + if (!aNewDlg->GetObjectName().isEmpty()) + aLibName = aNewDlg->GetObjectName(); if ( aLibName.getLength() > 30 ) { diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index fd15d17e8350..9d3185b37402 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -804,12 +804,12 @@ void ObjectPage::NewDialog() { aDocument.getOrCreateLibrary( E_DIALOGS, aLibName ); - NewObjectDialog aNewDlg(this, ObjectMode::Dialog, true); - aNewDlg.SetObjectName( aDocument.createObjectName( E_DIALOGS, aLibName ) ); + VclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(this, ObjectMode::Dialog, true)); + aNewDlg->SetObjectName( aDocument.createObjectName( E_DIALOGS, aLibName ) ); - if (aNewDlg.Execute() != 0) + if (aNewDlg->Execute() != 0) { - OUString aDlgName = aNewDlg.GetObjectName(); + OUString aDlgName = aNewDlg->GetObjectName(); if (aDlgName.isEmpty()) aDlgName = aDocument.createObjectName( E_DIALOGS, aLibName); @@ -947,13 +947,13 @@ SbModule* createModImpl( vcl::Window* pWin, const ScriptDocument& rDocument, if ( aModName.isEmpty() ) aModName = rDocument.createObjectName( E_SCRIPTS, aLibName ); - NewObjectDialog aNewDlg(pWin, ObjectMode::Module, true); - aNewDlg.SetObjectName( aModName ); + VclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(pWin, ObjectMode::Module, true)); + aNewDlg->SetObjectName( aModName ); - if (aNewDlg.Execute() != 0) + if (aNewDlg->Execute() != 0) { - if (!aNewDlg.GetObjectName().isEmpty() ) - aModName = aNewDlg.GetObjectName(); + if (!aNewDlg->GetObjectName().isEmpty() ) + aModName = aNewDlg->GetObjectName(); try { diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx index ed304b218d5d..953f96b92316 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -142,11 +142,11 @@ void ManageLanguageDialog::ClearLanguageBox() IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl) { - SetDefaultLanguageDialog aDlg( this, m_xLocalizationMgr ); - if ( RET_OK == aDlg.Execute() ) + VclPtr<SetDefaultLanguageDialog> aDlg(new SetDefaultLanguageDialog( this, m_xLocalizationMgr )); + if ( RET_OK == aDlg->Execute() ) { // add new locales - Sequence< Locale > aLocaleSeq = aDlg.GetLocales(); + Sequence< Locale > aLocaleSeq = aDlg->GetLocales(); m_xLocalizationMgr->handleAddLocales( aLocaleSeq ); // update listbox ClearLanguageBox(); @@ -160,8 +160,8 @@ IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl) IMPL_LINK_NOARG(ManageLanguageDialog, DeleteHdl) { - MessageDialog aQBox(this, "DeleteLangDialog", "modules/BasicIDE/ui/deletelang.ui"); - if ( aQBox.Execute() == RET_OK ) + VclPtr<MessageDialog> aQBox(new MessageDialog(this, "DeleteLangDialog", "modules/BasicIDE/ui/deletelang.ui")); + if ( aQBox->Execute() == RET_OK ) { sal_uInt16 i, nCount = m_pLanguageLB->GetSelectEntryCount(); sal_uInt16 nPos = m_pLanguageLB->GetSelectEntryPos(); |