summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-20 11:27:10 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 12:37:44 +0100
commit61b224f392eb856bf4cfa0c04c68202a463cbdbf (patch)
tree77a28e38763bc5f9d95e2c278601d31dc6fbf65d /basctl
parentf1d9eef4163e88a3cb6360178b52ce441e65d8ae (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 'basctl')
-rw-r--r--basctl/source/basicide/baside2.cxx4
-rw-r--r--basctl/source/basicide/baside2b.cxx4
-rw-r--r--basctl/source/basicide/baside3.cxx4
-rw-r--r--basctl/source/basicide/basides1.cxx4
-rw-r--r--basctl/source/basicide/basobj2.cxx4
-rw-r--r--basctl/source/basicide/basobj3.cxx4
-rw-r--r--basctl/source/basicide/bastypes.cxx6
-rw-r--r--basctl/source/basicide/moduldl2.cxx4
-rw-r--r--basctl/source/basicide/moduldlg.cxx4
-rw-r--r--basctl/source/dlged/managelang.cxx4
10 files changed, 21 insertions, 21 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 152fe617b374..25c3b5c80510 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -619,7 +619,7 @@ void ModulWindow::BasicToggleBreakPointEnabled()
void ModulWindow::ManageBreakPoints()
{
BreakPointWindow& rBrkWin = GetBreakPointWindow();
- VclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( &rBrkWin, GetBreakPoints() ));
+ ScopedVclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( &rBrkWin, GetBreakPoints() ));
aBrkDlg->Execute();
rBrkWin.Invalidate();
}
@@ -1043,7 +1043,7 @@ void ModulWindow::ExecuteCommand (SfxRequest& rReq)
break;
case SID_GOTOLINE:
{
- VclPtr<GotoLineDialog> aGotoDlg(new GotoLineDialog(this));
+ ScopedVclPtr<GotoLineDialog> aGotoDlg(new GotoLineDialog(this));
if (aGotoDlg->Execute())
if (sal_Int32 const nLine = aGotoDlg->GetLineNumber())
{
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 66f5349a2ec6..3456cfd78c77 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1520,7 +1520,7 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt )
break;
case RID_BRKPROPS:
{
- VclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( this, GetBreakPoints() ));
+ ScopedVclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( this, GetBreakPoints() ));
aBrkDlg->SetCurrentBreakPoint( pBrk );
aBrkDlg->Execute();
Invalidate();
@@ -1535,7 +1535,7 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt )
{
case RID_BRKDLG:
{
- VclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( this, GetBreakPoints() ));
+ ScopedVclPtr<BreakPointDialog> aBrkDlg(new BreakPointDialog( this, GetBreakPoints() ));
aBrkDlg->Execute();
Invalidate();
}
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index c6957e326ed9..52d173bf87ef 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -1024,7 +1024,7 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script
OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TEXT));
aQueryBoxText = aQueryBoxText.replaceAll("$(ARG1)", aXmlDlgName);
- VclPtr<NameClashQueryBox> aQueryBox(new NameClashQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ));
+ ScopedVclPtr<NameClashQueryBox> aQueryBox(new NameClashQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ));
sal_uInt16 nRet = aQueryBox->Execute();
if( RET_YES == nRet )
{
@@ -1086,7 +1086,7 @@ 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));
- VclPtr<LanguageMismatchQueryBox> aQueryBox(new LanguageMismatchQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ));
+ ScopedVclPtr<LanguageMismatchQueryBox> aQueryBox(new LanguageMismatchQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ));
sal_uInt16 nRet = aQueryBox->Execute();
if( RET_YES == nRet )
{
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index c9aaa23447c7..139b1a369a5e 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -136,7 +136,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq )
SfxViewFrame* pViewFrame = GetViewFrame();
SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow( SID_SEARCH_DLG ) : NULL;
vcl::Window* pParent = pChildWin ? pChildWin->GetWindow() : NULL;
- VclPtr<QueryBox> aQuery(new QueryBox(pParent, WB_YES_NO|WB_DEF_YES, IDE_RESSTR(RID_STR_SEARCHFROMSTART)));
+ ScopedVclPtr<QueryBox> aQuery(new QueryBox(pParent, WB_YES_NO|WB_DEF_YES, IDE_RESSTR(RID_STR_SEARCHFROMSTART)));
if ( aQuery->Execute() == RET_YES )
{
it = aWindowTable.begin();
@@ -676,7 +676,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_MANAGE_LANG:
{
- VclPtr<ManageLanguageDialog> aDlg(new ManageLanguageDialog(pCurWin, m_pCurLocalizationMgr));
+ ScopedVclPtr<ManageLanguageDialog> aDlg(new ManageLanguageDialog(pCurWin, m_pCurLocalizationMgr));
aDlg->Execute();
rReq.Done();
}
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index a746060c0c5b..f8169374db5b 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -149,7 +149,7 @@ bool RenameModule (
if ( rDocument.hasModule( rLibName, rNewName ) )
{
- VclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)));
+ ScopedVclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)));
aError->Execute();
return false;
}
@@ -157,7 +157,7 @@ bool RenameModule (
// #i74440
if ( rNewName.isEmpty() )
{
- VclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME)));
+ ScopedVclPtr<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 c280c3b7be0b..e7a7f0513e16 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -155,7 +155,7 @@ bool RenameDialog (
if ( rDocument.hasDialog( rLibName, rNewName ) )
{
- VclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)));
+ ScopedVclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)));
aError->Execute();
return false;
}
@@ -163,7 +163,7 @@ bool RenameDialog (
// #i74440
if ( rNewName.isEmpty() )
{
- VclPtr<MessageDialog> aError(new MessageDialog(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME)));
+ ScopedVclPtr<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 da7e39300659..67d4c5482378 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -803,7 +803,7 @@ bool QueryDel( const OUString& rName, const ResId& rId, vcl::Window* pParent )
aNameBuf.append('\'');
aNameBuf.insert(0, '\'');
aQuery = aQuery.replaceAll("XX", aNameBuf.makeStringAndClear());
- VclPtr<MessageDialog> aQueryBox(new MessageDialog(pParent, aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtr<MessageDialog> aQueryBox(new MessageDialog(pParent, aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
return ( aQueryBox->Execute() == RET_YES );
}
@@ -840,7 +840,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer,
do
{
// password dialog
- VclPtr<SfxPasswordDialog> aDlg(new SfxPasswordDialog(Application::GetDefDialogParent()));
+ ScopedVclPtr<SfxPasswordDialog> aDlg(new SfxPasswordDialog(Application::GetDefDialogParent()));
aDlg->SetMinLen( 1 );
// set new title
@@ -868,7 +868,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer,
if ( !bOK )
{
- VclPtr<MessageDialog> aErrorBox(new MessageDialog(Application::GetDefDialogParent(), IDE_RESSTR(RID_STR_WRONGPASSWORD)));
+ ScopedVclPtr<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 d231fe906dd9..57352492f1f3 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1128,7 +1128,7 @@ void LibPage::Export( void )
return;
}
- VclPtr<ExportDialog> aNewDlg(new ExportDialog(this));
+ ScopedVclPtr<ExportDialog> aNewDlg(new ExportDialog(this));
if (aNewDlg->Execute() == RET_OK)
{
try
@@ -1504,7 +1504,7 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
i++;
}
- VclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(pWin, ObjectMode::Library));
+ ScopedVclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(pWin, ObjectMode::Library));
aNewDlg->SetObjectName(aLibName);
if (aNewDlg->Execute())
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 62d5dae9b996..67e3915edcc8 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -825,7 +825,7 @@ void ObjectPage::NewDialog()
{
aDocument.getOrCreateLibrary( E_DIALOGS, aLibName );
- VclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(this, ObjectMode::Dialog, true));
+ ScopedVclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(this, ObjectMode::Dialog, true));
aNewDlg->SetObjectName( aDocument.createObjectName( E_DIALOGS, aLibName ) );
if (aNewDlg->Execute() != 0)
@@ -983,7 +983,7 @@ SbModule* createModImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
if ( aModName.isEmpty() )
aModName = rDocument.createObjectName( E_SCRIPTS, aLibName );
- VclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(pWin, ObjectMode::Module, true));
+ ScopedVclPtr<NewObjectDialog> aNewDlg(new NewObjectDialog(pWin, ObjectMode::Module, true));
aNewDlg->SetObjectName( aModName );
if (aNewDlg->Execute() != 0)
diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx
index 27be747ddf3a..a3ee64950c8d 100644
--- a/basctl/source/dlged/managelang.cxx
+++ b/basctl/source/dlged/managelang.cxx
@@ -146,7 +146,7 @@ void ManageLanguageDialog::ClearLanguageBox()
IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl)
{
- VclPtr<SetDefaultLanguageDialog> aDlg(new SetDefaultLanguageDialog( this, m_xLocalizationMgr ));
+ ScopedVclPtr<SetDefaultLanguageDialog> aDlg(new SetDefaultLanguageDialog( this, m_xLocalizationMgr ));
if ( RET_OK == aDlg->Execute() )
{
// add new locales
@@ -164,7 +164,7 @@ IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl)
IMPL_LINK_NOARG(ManageLanguageDialog, DeleteHdl)
{
- VclPtr<MessageDialog> aQBox(new MessageDialog(this, "DeleteLangDialog", "modules/BasicIDE/ui/deletelang.ui"));
+ ScopedVclPtr<MessageDialog> aQBox(new MessageDialog(this, "DeleteLangDialog", "modules/BasicIDE/ui/deletelang.ui"));
if ( aQBox->Execute() == RET_OK )
{
sal_uInt16 i, nCount = m_pLanguageLB->GetSelectEntryCount();