summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorPhilippe Jung <phil.jung@free.fr>2015-05-26 16:26:35 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-05-28 09:55:08 +0100
commitbe8a02364c82df5252a1ced49db29f855c85677a (patch)
tree71ab14185b350d2a593df55713b6b7f5d4ab5eca /svx
parent71079c49ec377ecca2a4410a41d3de3dcd7e07ff (diff)
Rewrite all calls like Dialog(params).Execute()
Replace all calls looking like ADialog(some params).Execute() by ScopedVclPtrInstance<ADialog>::Create(some parms)->Execute() Change-Id: I0b6f0a9ea5ef0a749ffa30ce131e9dc989604639 Reviewed-on: https://gerrit.libreoffice.org/15915 Tested-by: Jenkins <ci@libreoffice.org> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/hdft.cxx4
-rw-r--r--svx/source/dialog/imapdlg.cxx4
-rw-r--r--svx/source/dialog/passwd.cxx4
-rw-r--r--svx/source/form/fmshimp.cxx4
-rw-r--r--svx/source/gallery2/galbrws1.cxx2
-rw-r--r--svx/source/gallery2/galbrws2.cxx2
6 files changed, 10 insertions, 10 deletions
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index 6f21f6c1a760..06639f4b029b 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -535,9 +535,9 @@ IMPL_LINK( SvxHFPage, TurnOnHdl, CheckBox *, pBox )
{
short nResult;
if (nId == SID_ATTR_PAGE_HEADERSET)
- nResult = DeleteHeaderDialog(this).Execute();
+ nResult = ScopedVclPtrInstance<DeleteHeaderDialog>::Create(this)->Execute();
else
- nResult = DeleteFooterDialog(this).Execute();
+ nResult = ScopedVclPtrInstance<DeleteFooterDialog>::Create(this)->Execute();
bDelete = nResult == RET_YES;
}
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 295c32f08beb..a98f1a60f827 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -699,8 +699,8 @@ IMPL_LINK_NOARG_TYPED(SvxIMapDlg, UpdateHdl, Idle *, void)
if ( pOwnData->pUpdateEditingObject != pCheckObj )
{
if ( pIMapWnd->IsChanged() &&
- ( MessageDialog( this,"QuerySaveImageMapChangesDialog",
- "svx/ui/querysaveimagemapchangesdialog.ui" ).Execute() == RET_YES ) )
+ ( ScopedVclPtrInstance<MessageDialog>::Create( this,"QuerySaveImageMapChangesDialog",
+ "svx/ui/querysaveimagemapchangesdialog.ui" )->Execute() == RET_YES ) )
{
DoSave();
}
diff --git a/svx/source/dialog/passwd.cxx b/svx/source/dialog/passwd.cxx
index 25b01d703dfa..5139bafe8bb1 100644
--- a/svx/source/dialog/passwd.cxx
+++ b/svx/source/dialog/passwd.cxx
@@ -31,7 +31,7 @@ IMPL_LINK_NOARG(SvxPasswordDialog, ButtonHdl)
if ( m_pNewPasswdED->GetText() != m_pRepeatPasswdED->GetText() )
{
- MessageDialog(this, aRepeatPasswdErrStr).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aRepeatPasswdErrStr)->Execute();
m_pNewPasswdED->SetText( aEmpty );
m_pRepeatPasswdED->SetText( aEmpty );
m_pNewPasswdED->GrabFocus();
@@ -40,7 +40,7 @@ IMPL_LINK_NOARG(SvxPasswordDialog, ButtonHdl)
if ( bOK && aCheckPasswordHdl.IsSet() && !aCheckPasswordHdl.Call( this ) )
{
- MessageDialog(this, aOldPasswdErrStr).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aOldPasswdErrStr)->Execute();
m_pOldPasswdED->SetText( aEmpty );
m_pOldPasswdED->GrabFocus();
bOK = false;
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index d208c147ee17..68b574ab8832 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1489,7 +1489,7 @@ void FmXFormShell::ExecuteSearch()
if (m_aSearchForms.empty() )
{ // es gibt keine Controls, die alle Bedingungen fuer eine Suche erfuellen
- MessageDialog(NULL, SVX_RESSTR(RID_STR_NODATACONTROLS)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SVX_RESSTR(RID_STR_NODATACONTROLS))->Execute();
return;
}
@@ -3168,7 +3168,7 @@ void FmXFormShell::CreateExternalView()
if (!bHaveUsableControls)
{
- MessageDialog(NULL, SVX_RESSTR(RID_STR_NOCONTROLS_FOR_EXTERNALDISPLAY)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SVX_RESSTR(RID_STR_NOCONTROLS_FOR_EXTERNALDISPLAY))->Execute();
return;
}
}
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index 24c20e4a9cbc..faa108dbc88b 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -370,7 +370,7 @@ void GalleryBrowser1::ImplExecute( sal_uInt16 nId )
case( MN_DELETE ):
{
- if( MessageDialog( NULL, "QueryDeleteThemeDialog","svx/ui/querydeletethemedialog.ui").Execute() == RET_YES )
+ if( ScopedVclPtrInstance<MessageDialog>::Create( nullptr, "QueryDeleteThemeDialog","svx/ui/querydeletethemedialog.ui")->Execute() == RET_YES )
mpGallery->RemoveTheme( mpThemes->GetSelectEntry() );
}
break;
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index c1d49fefc85c..bfa02e4b522f 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -1161,7 +1161,7 @@ void GalleryBrowser2::Execute( sal_uInt16 nId )
case( MN_DELETE ):
{
if( !mpCurTheme->IsReadOnly() &&
- MessageDialog(NULL, "QueryDeleteObjectDialog","svx/ui/querydeleteobjectdialog.ui").Execute() == RET_YES )
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, "QueryDeleteObjectDialog","svx/ui/querydeleteobjectdialog.ui")->Execute() == RET_YES )
{
mpCurTheme->RemoveObject( mnCurActionPos );
}