summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/dialogs/cuifmsearch.cxx2
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx2
-rw-r--r--cui/source/dialogs/insdlg.cxx8
-rw-r--r--cui/source/options/optdict.cxx2
-rw-r--r--cui/source/options/optinet2.cxx2
-rw-r--r--cui/source/options/optjava.cxx4
-rw-r--r--cui/source/tabpages/tparea.cxx2
-rw-r--r--cui/source/tabpages/tpbitmap.cxx16
-rw-r--r--cui/source/tabpages/tpcolor.cxx12
-rw-r--r--cui/source/tabpages/tpgradnt.cxx12
-rw-r--r--cui/source/tabpages/tphatch.cxx12
-rw-r--r--cui/source/tabpages/tplnedef.cxx12
-rw-r--r--cui/source/tabpages/tplneend.cxx12
13 files changed, 49 insertions, 49 deletions
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index 76c132ab7305..2a5c31f5c199 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -752,7 +752,7 @@ IMPL_LINK(FmSearchDialog, OnSearchProgress, FmSearchProgress*, pProgress)
sal_uInt16 nErrorId = (FmSearchProgress::STATE_ERROR == pProgress->aSearchState)
? RID_STR_SEARCH_GENERAL_ERROR
: RID_STR_SEARCH_NORECORD;
- MessageDialog(this, CUI_RES(nErrorId)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, CUI_RES(nErrorId))->Execute();
}
// NO break !
case FmSearchProgress::STATE_CANCELED:
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 4eafd4904a23..def7872b7edf 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -1024,7 +1024,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, SelectFileTypeHdl)
{
aLastFilterName = aText;
- if( MessageDialog( this, "QueryUpdateFileListDialog","cui/ui/queryupdategalleryfilelistdialog.ui" ).Execute() == RET_YES )
+ if( ScopedVclPtrInstance<MessageDialog>::Create( this, "QueryUpdateFileListDialog","cui/ui/queryupdategalleryfilelistdialog.ui" )->Execute() == RET_YES )
SearchFiles();
}
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index eacfed6d6e9b..a68af459b3f7 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -292,7 +292,7 @@ short SvInsertOleDlg::Execute()
// global Resource from svtools (former so3 resource)
OUString aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_FROM_FILE ) );
aErr = aErr.replaceFirst( "%", aFileName );
- MessageDialog(this, aErr).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aErr)->Execute();
}
else
{
@@ -300,7 +300,7 @@ short SvInsertOleDlg::Execute()
// global Resource from svtools (former so3 resource)
OUString aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE ) );
aErr = aErr.replaceFirst( "%", aServerName );
- MessageDialog(this, aErr).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aErr)->Execute();
}
}
}
@@ -341,7 +341,7 @@ short SvInsertOleDlg::Execute()
// global Resource from svtools (former so3 resource)
OUString aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_FROM_FILE ) );
aErr = aErr.replaceFirst( "%", aFileName );
- MessageDialog(this, aErr).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aErr)->Execute();
}
}
}
@@ -486,7 +486,7 @@ short SvInsertPlugInDialog::Execute()
// global Resource from svtools (former so3 resource)
OUString aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_PLUGIN ) );
aErr = aErr.replaceFirst( "%", aURL );
- MessageDialog(this, aErr).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aErr)->Execute();
}
}
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index a59093124c82..5b79a08ad60a 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -156,7 +156,7 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl)
if ( bFound )
{
// duplicate names?
- MessageDialog(this, CUI_RESSTR(RID_SVXSTR_OPT_DOUBLE_DICTS), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, CUI_RESSTR(RID_SVXSTR_OPT_DOUBLE_DICTS), VCL_MESSAGE_INFO)->Execute();
pNameEdit->GrabFocus();
return 0;
}
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 91296cb5a1d5..62989f32822c 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -133,7 +133,7 @@ void SvxNoSpaceEdit::Modify()
if ( !comphelper::string::isdigitAsciiString(aValue) || (long)aValue.toInt32() > USHRT_MAX )
// the maximum value of a port number is USHRT_MAX
- MessageDialog( this, CUI_RES( RID_SVXSTR_OPT_PROXYPORTS ) ).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create( this, CUI_RES( RID_SVXSTR_OPT_PROXYPORTS ) )->Execute();
}
}
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 80c6819f7f5b..31c94c6eb1bd 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -1008,7 +1008,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl)
{
OUString sMsg( CUI_RES( RID_SVXSTR_MULTIFILE_DBL_ERR ) );
sMsg = sMsg.replaceFirst( "%1", sFile );
- MessageDialog(this, sMsg).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, sMsg)->Execute();
}
}
EnableRemoveButton();
@@ -1045,7 +1045,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl)
{
OUString sMsg( CUI_RES( RID_SVXSTR_MULTIFILE_DBL_ERR ) );
sMsg = sMsg.replaceFirst( "%1", sNewFolder );
- MessageDialog(this, sMsg).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, sMsg)->Execute();
}
}
EnableRemoveButton();
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 441fecb0928b..87e480ff4ced 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -2234,7 +2234,7 @@ IMPL_LINK_NOARG( SvxAreaTabPage, ClickImportHdl_Impl )
else
{
// graphic could not be loaded
- MessageDialog (this, OUString(ResId(RID_SVXSTR_READ_DATA_ERROR, rMgr))).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create (this, OUString(ResId(RID_SVXSTR_READ_DATA_ERROR, rMgr)))->Execute();
}
}
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 77f2c6265941..0d11116b9533 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -667,9 +667,9 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl_Impl)
}
else
// graphic couldn't be loaded
- MessageDialog( GetParentDialog()
+ ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"NoLoadedFileDialog"
- ,"cui/ui/querynoloadedfiledialog.ui").Execute();
+ ,"cui/ui/querynoloadedfiledialog.ui")->Execute();
}
return 0L;
@@ -782,9 +782,9 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickLoadHdl_Impl)
if ( *pnBitmapListState & ChangeType::MODIFIED )
{
- nReturn = MessageDialog( GetParentDialog()
+ nReturn = ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"AskSaveList"
- ,"cui/ui/querysavelistdialog.ui").Execute();
+ ,"cui/ui/querysavelistdialog.ui")->Execute();
if ( nReturn == RET_YES )
pBitmapList->Save();
@@ -844,9 +844,9 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickLoadHdl_Impl)
else
{
LeaveWait();
- MessageDialog( GetParentDialog()
+ ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"NoLoadedFileDialog"
- ,"cui/ui/querynoloadedfiledialog.ui").Execute();
+ ,"cui/ui/querynoloadedfiledialog.ui")->Execute();
}
}
}
@@ -918,9 +918,9 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickSaveHdl_Impl)
}
else
{
- MessageDialog( GetParentDialog()
+ ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"NoSaveFileDialog"
- ,"cui/ui/querynosavefiledialog.ui").Execute();
+ ,"cui/ui/querynosavefiledialog.ui")->Execute();
}
}
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 9a09d3be1a7d..6319c4d47752 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -128,9 +128,9 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickLoadHdl_Impl)
if( IsModified() && GetList()->Count() > 0 )
{
- nReturn = MessageDialog( GetParentDialog()
+ nReturn = ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"AskSaveList"
- ,"cui/ui/querysavelistdialog.ui").Execute();
+ ,"cui/ui/querysavelistdialog.ui")->Execute();
if ( nReturn == RET_YES )
GetList()->Save();
@@ -173,9 +173,9 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickLoadHdl_Impl)
}
else
{
- MessageDialog( mpTopDlg
+ ScopedVclPtrInstance<MessageDialog>::Create( mpTopDlg
,"NoLoadedFileDialog"
- ,"cui/ui/querynoloadedfiledialog.ui").Execute();
+ ,"cui/ui/querynoloadedfiledialog.ui")->Execute();
}
}
}
@@ -235,9 +235,9 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickSaveHdl_Impl)
}
else
{
- MessageDialog( mpTopDlg
+ ScopedVclPtrInstance<MessageDialog>::Create( mpTopDlg
,"NoSaveFileDialog"
- ,"cui/ui/querynosavefiledialog.ui").Execute();
+ ,"cui/ui/querynosavefiledialog.ui")->Execute();
}
}
return 0;
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index d9b7c824c557..e737410c36cb 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -642,9 +642,9 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickLoadHdl_Impl)
if ( *pnGradientListState & ChangeType::MODIFIED )
{
- nReturn = MessageDialog( GetParentDialog()
+ nReturn = ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"AskSaveList"
- ,"cui/ui/querysavelistdialog.ui").Execute();
+ ,"cui/ui/querysavelistdialog.ui")->Execute();
if ( nReturn == RET_YES )
pGradientList->Save();
@@ -707,9 +707,9 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickLoadHdl_Impl)
else
{
LeaveWait();
- MessageDialog( GetParentDialog()
+ ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"NoLoadedFileDialog"
- ,"cui/ui/querynoloadedfiledialog.ui").Execute();
+ ,"cui/ui/querynoloadedfiledialog.ui")->Execute();
}
}
}
@@ -782,9 +782,9 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickSaveHdl_Impl)
}
else
{
- MessageDialog( GetParentDialog()
+ ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"NoSaveFileDialog"
- ,"cui/ui/querynosavefiledialog.ui").Execute();
+ ,"cui/ui/querynosavefiledialog.ui")->Execute();
}
}
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 5c0a0c182d8b..bad1e714cbf6 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -679,9 +679,9 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl)
if ( *pnHatchingListState & ChangeType::MODIFIED )
{
- nReturn = MessageDialog( GetParentDialog()
+ nReturn = ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"AskSaveList"
- ,"cui/ui/querysavelistdialog.ui").Execute();
+ ,"cui/ui/querysavelistdialog.ui")->Execute();
if ( nReturn == RET_YES )
pHatchingList->Save();
@@ -735,9 +735,9 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl)
*pnHatchingListState &= ~ChangeType::MODIFIED;
}
else
- MessageDialog( GetParentDialog()
+ ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"NoLoadedFileDialog"
- ,"cui/ui/querynoloadedfiledialog.ui").Execute();
+ ,"cui/ui/querynoloadedfiledialog.ui")->Execute();
}
}
@@ -808,9 +808,9 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickSaveHdl_Impl)
}
else
{
- MessageDialog( GetParentDialog()
+ ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"NoSaveFileDialog"
- ,"cui/ui/querynosavefiledialog.ui").Execute();
+ ,"cui/ui/querynosavefiledialog.ui")->Execute();
}
}
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 8bac22399f6b..6694a549ce5a 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -748,9 +748,9 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl)
if ( *pnDashListState & ChangeType::MODIFIED )
{
- nReturn = MessageDialog( GetParentDialog()
+ nReturn = ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"AskSaveList"
- ,"cui/ui/querysavelistdialog.ui").Execute();
+ ,"cui/ui/querysavelistdialog.ui")->Execute();
if ( nReturn == RET_YES )
pDashList->Save();
@@ -791,9 +791,9 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl)
}
else
//aIStream.Close();
- MessageDialog( GetParentDialog()
+ ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"NoLoadedFileDialog"
- ,"cui/ui/querynoloadedfiledialog.ui").Execute();
+ ,"cui/ui/querynoloadedfiledialog.ui")->Execute();
}
}
@@ -851,9 +851,9 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickSaveHdl_Impl)
}
else
{
- MessageDialog( GetParentDialog()
+ ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"NoSaveFileDialog"
- ,"cui/ui/querynosavefiledialog.ui").Execute();
+ ,"cui/ui/querynosavefiledialog.ui")->Execute();
}
}
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 21f946c1e741..aff55b93eefa 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -560,9 +560,9 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickLoadHdl_Impl)
if ( *pnLineEndListState & ChangeType::MODIFIED )
{
- nReturn = MessageDialog( GetParentDialog()
+ nReturn = ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"AskSaveList"
- ,"cui/ui/querysavelistdialog.ui").Execute();
+ ,"cui/ui/querysavelistdialog.ui")->Execute();
if ( nReturn == RET_YES )
pLineEndList->Save();
@@ -603,9 +603,9 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickLoadHdl_Impl)
*pnLineEndListState &= ~ChangeType::MODIFIED;
}
else
- MessageDialog( GetParentDialog()
+ ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"NoLoadedFileDialog"
- ,"cui/ui/querynoloadedfiledialog.ui").Execute();
+ ,"cui/ui/querynoloadedfiledialog.ui")->Execute();
}
}
@@ -663,9 +663,9 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickSaveHdl_Impl)
}
else
{
- MessageDialog( GetParentDialog()
+ ScopedVclPtrInstance<MessageDialog>::Create( GetParentDialog()
,"NoSaveFileDialog"
- ,"cui/ui/querynosavefiledialog.ui").Execute();
+ ,"cui/ui/querynosavefiledialog.ui")->Execute();
}
}
return 0L;