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 08:44:31 +0000
commit1379e2feaad6344999358bbfb271edbaea66ce2a (patch)
treef2d15c298b21e8aa83ec4bbc025ca0561896906e /svx
parentf9e0e3a4eb8a23bfb9fb66055511c53d120e6579 (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 592f1e8ac976..0c119475d1f1 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 76dc9d2c04e6..b97bc9d48061 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 );
}