summaryrefslogtreecommitdiff
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
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>
-rw-r--r--basctl/source/basicide/baside2.cxx6
-rw-r--r--basctl/source/basicide/baside3.cxx2
-rw-r--r--basctl/source/basicide/basobj2.cxx4
-rw-r--r--basctl/source/basicide/bastypes.cxx2
-rw-r--r--basctl/source/basicide/macrodlg.cxx6
-rw-r--r--basctl/source/basicide/moduldl2.cxx28
-rw-r--r--basctl/source/basicide/moduldlg.cxx6
-rw-r--r--basic/source/runtime/iosys.cxx4
-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
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx2
-rw-r--r--dbaccess/source/ui/dlg/TextConnectionHelper.cxx2
-rw-r--r--dbaccess/source/ui/dlg/paramdialog.cxx2
-rw-r--r--dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx4
-rw-r--r--extensions/source/abpilot/abspilot.cxx2
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx2
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx2
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx4
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx2
-rw-r--r--sc/source/ui/miscdlgs/solvrdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/tabopdlg.cxx2
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx2
-rw-r--r--scripting/source/dlgprov/dlgevtatt.cxx2
-rw-r--r--sd/source/ui/app/sdmod1.cxx2
-rw-r--r--sd/source/ui/func/fuinsert.cxx2
-rw-r--r--sd/source/ui/func/futhes.cxx4
-rw-r--r--sfx2/source/appl/appserv.cxx2
-rw-r--r--sfx2/source/appl/lnkbase2.cxx2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx2
-rw-r--r--sfx2/source/dialog/newstyle.cxx2
-rw-r--r--sfx2/source/doc/objserv.cxx12
-rw-r--r--sfx2/source/doc/templatedlg.cxx18
-rw-r--r--sfx2/source/view/viewprn.cxx8
-rw-r--r--starmath/source/view.cxx2
-rw-r--r--svtools/source/dialogs/restartdialog.cxx2
-rw-r--r--svtools/source/filter/SvFilterOptionsDialog.cxx2
-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
-rw-r--r--sw/source/core/crsr/viscrs.cxx4
-rw-r--r--sw/source/ui/chrdlg/break.cxx2
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx10
-rw-r--r--sw/source/ui/envelp/labfmt.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx6
-rw-r--r--sw/source/ui/misc/srtdlg.cxx2
-rw-r--r--sw/source/ui/table/tabledlg.cxx2
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx2
-rw-r--r--sw/source/uibase/dochdl/gloshdl.cxx2
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx10
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx4
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx12
-rw-r--r--sw/source/uibase/uiview/srcview.cxx14
-rw-r--r--sw/source/uibase/uiview/uivwimp.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx2
-rw-r--r--vcl/source/app/dbggui.cxx2
77 files changed, 181 insertions, 181 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 6079ed448b02..d602a7439d37 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -305,7 +305,7 @@ bool ModulWindow::BasicExecute()
{
if ( !aDocument.allowMacros() )
{
- MessageDialog(this, IDE_RESSTR(RID_STR_CANNOTRUNMACRO), VCL_MESSAGE_WARNING).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_CANNOTRUNMACRO), VCL_MESSAGE_WARNING)->Execute();
return false;
}
}
@@ -443,7 +443,7 @@ bool ModulWindow::LoadBasic()
bDone = true;
}
else
- MessageDialog(this, IDE_RESSTR(RID_STR_COULDNTREAD)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_COULDNTREAD))->Execute();
}
return bDone;
}
@@ -489,7 +489,7 @@ bool ModulWindow::SaveBasicSource()
bDone = true;
}
else
- MessageDialog(this, IDEResId(RID_STR_COULDNTWRITE)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDEResId(RID_STR_COULDNTWRITE))->Execute();
}
return bDone;
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index a37b00dd16c3..19c052d928b4 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -834,7 +834,7 @@ bool DialogWindow::SaveDialog()
}
}
else
- MessageDialog(this, IDE_RESSTR(RID_STR_COULDNTWRITE)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_COULDNTWRITE))->Execute();
}
return bDone;
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index 530d0fc26c5c..987c1aa65ae8 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -67,7 +67,7 @@ void Organize( sal_Int16 tabId )
aDesc = pCurWin->CreateEntryDescriptor();
vcl::Window* pParent = Application::GetDefDialogParent();
- OrganizeDialog(pParent, tabId, aDesc).Execute();
+ ScopedVclPtrInstance<OrganizeDialog>::Create(pParent, tabId, aDesc)->Execute();
}
bool IsValidSbxName( const OUString& rName )
@@ -331,7 +331,7 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument,
{
// error
bError = true;
- MessageDialog(NULL, IDEResId(RID_STR_ERRORCHOOSEMACRO)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, IDEResId(RID_STR_ERRORCHOOSEMACRO))->Execute();
}
}
}
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 5fc8268a77ec..77febec71f3a 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -558,7 +558,7 @@ TabBarAllowRenamingReturnCode TabBar::AllowRenaming()
bool const bValid = IsValidSbxName(GetEditText());
if ( !bValid )
- MessageDialog(this, IDEResId(RID_STR_BADSBXNAME)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDEResId(RID_STR_BADSBXNAME))->Execute();
return bValid ? TABBAR_RENAMING_YES : TABBAR_RENAMING_NO;
}
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 7dbd9836d6e7..23e2597c413f 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -632,7 +632,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
if ( aDocument.isDocument() && !aDocument.allowMacros() )
{
- MessageDialog(this, IDEResId(RID_STR_CANNOTRUNMACRO), VCL_MESSAGE_WARNING).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDEResId(RID_STR_CANNOTRUNMACRO), VCL_MESSAGE_WARNING)->Execute();
return 0;
}
}
@@ -641,7 +641,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
{
if ( !IsValidSbxName(m_pMacroNameEdit->GetText()) )
{
- MessageDialog(this, IDEResId(RID_STR_BADSBXNAME)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDEResId(RID_STR_BADSBXNAME))->Execute();
m_pMacroNameEdit->SetSelection( Selection( 0, m_pMacroNameEdit->GetText().getLength() ) );
m_pMacroNameEdit->GrabFocus();
return 0;
@@ -709,7 +709,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
{
if ( !IsValidSbxName(m_pMacroNameEdit->GetText()) )
{
- MessageDialog(this, IDEResId(RID_STR_BADSBXNAME)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDEResId(RID_STR_BADSBXNAME))->Execute();
m_pMacroNameEdit->SetSelection( Selection( 0, m_pMacroNameEdit->GetText().getLength() ) );
m_pMacroNameEdit->GrabFocus();
return 1;
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 68499f3ca18a..70c4f583d4cc 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -269,7 +269,7 @@ bool CheckBox::EditingEntry( SvTreeListEntry* pEntry, Selection& )
OUString aLibName = GetEntryText( pEntry, 0 );
if ( aLibName.equalsIgnoreAsciiCase( "Standard" ) )
{
- MessageDialog(this, IDE_RESSTR(RID_STR_CANNOTCHANGENAMESTDLIB)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_CANNOTCHANGENAMESTDLIB))->Execute();
return false;
}
@@ -279,7 +279,7 @@ bool CheckBox::EditingEntry( SvTreeListEntry* pEntry, Selection& )
if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) && xModLibContainer->isLibraryReadOnly( aLibName ) && !xModLibContainer->isLibraryLink( aLibName ) ) ||
( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) && !xDlgLibContainer->isLibraryLink( aLibName ) ) )
{
- MessageDialog(this, IDE_RESSTR(RID_STR_LIBISREADONLY)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_LIBISREADONLY))->Execute();
return false;
}
@@ -329,7 +329,7 @@ bool CheckBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewName )
}
catch (const container::ElementExistException& )
{
- MessageDialog(this, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED))->Execute();
return false;
}
catch (const container::NoSuchElementException& )
@@ -342,9 +342,9 @@ bool CheckBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewName )
if ( !bValid )
{
if ( rNewName.getLength() > 30 )
- MessageDialog(this, IDE_RESSTR(RID_STR_LIBNAMETOLONG)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_LIBNAMETOLONG))->Execute();
else
- MessageDialog(this, IDE_RESSTR(RID_STR_BADSBXNAME)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_BADSBXNAME))->Execute();
}
return bValid;
@@ -357,7 +357,7 @@ IMPL_LINK_NOARG(NewObjectDialog, OkButtonHandler)
EndDialog(1);
else
{
- MessageDialog(this, IDE_RESSTR(RID_STR_BADSBXNAME)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_BADSBXNAME))->Execute();
m_pEdit->GrabFocus();
}
return 0;
@@ -854,7 +854,7 @@ void LibPage::InsertLib()
}
if ( !pLibDlg )
- MessageDialog(this, IDE_RESSTR(RID_STR_NOLIBINSTORAGE), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_NOLIBINSTORAGE), VCL_MESSAGE_INFO)->Execute();
else
{
bool bChanges = false;
@@ -891,7 +891,7 @@ void LibPage::InsertLib()
// check, if the library is the Standard library
if ( aLibName == "Standard" )
{
- MessageDialog(this, IDE_RESSTR(RID_STR_REPLACESTDLIB)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_REPLACESTDLIB))->Execute();
continue;
}
@@ -903,7 +903,7 @@ void LibPage::InsertLib()
aErrStr = aErrStr.replaceAll("XX", aLibName);
aErrStr += "\n";
aErrStr += IDE_RESSTR(RID_STR_LIBISREADONLY);
- MessageDialog(this, aErrStr).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aErrStr)->Execute();
continue;
}
@@ -920,7 +920,7 @@ void LibPage::InsertLib()
aErrStr = aErrStr.replaceAll("XX", aLibName);
aErrStr += "\n" ;
aErrStr += IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED);
- MessageDialog(this, aErrStr).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aErrStr)->Execute();
continue;
}
}
@@ -939,7 +939,7 @@ void LibPage::InsertLib()
{
OUString aErrStr( IDE_RESSTR(RID_STR_NOIMPORT) );
aErrStr = aErrStr.replaceAll("XX", aLibName);
- MessageDialog(this, aErrStr).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aErrStr)->Execute();
continue;
}
}
@@ -1513,15 +1513,15 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
if ( aLibName.getLength() > 30 )
{
- MessageDialog(pWin, IDEResId(RID_STR_LIBNAMETOLONG).toString()).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(pWin, IDEResId(RID_STR_LIBNAMETOLONG).toString())->Execute();
}
else if ( !IsValidSbxName( aLibName ) )
{
- MessageDialog(pWin, IDEResId(RID_STR_BADSBXNAME).toString()).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(pWin, IDEResId(RID_STR_BADSBXNAME).toString())->Execute();
}
else if ( rDocument.hasLibrary( E_SCRIPTS, aLibName ) || rDocument.hasLibrary( E_DIALOGS, aLibName ) )
{
- MessageDialog(pWin, IDEResId(RID_STR_SBXNAMEALLREADYUSED2).toString()).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(pWin, IDEResId(RID_STR_SBXNAMEALLREADYUSED2).toString())->Execute();
}
else
{
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 504545e2dc70..0da8cdb3d640 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -91,7 +91,7 @@ bool ExtTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewT
{
if ( !IsValidSbxName(rNewText) )
{
- MessageDialog(this, IDE_RESSTR(RID_STR_BADSBXNAME)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_BADSBXNAME))->Execute();
return false;
}
@@ -835,7 +835,7 @@ void ObjectPage::NewDialog()
if ( aDocument.hasDialog( aLibName, aDlgName ) )
{
- MessageDialog(this, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2))->Execute();
}
else
{
@@ -1047,7 +1047,7 @@ SbModule* createModImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
}
catch (const container::ElementExistException& )
{
- MessageDialog(pWin, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(pWin, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2))->Execute();
}
catch (const container::NoSuchElementException& )
{
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index f4958278c91a..2e666ea04128 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -859,9 +859,9 @@ void SbiIoSystem::Shutdown()
{
#if defined __GNUC__
vcl::Window* pParent = Application::GetDefDialogParent();
- MessBox( pParent, WinBits( WB_OK ), OUString(), aOut ).Execute();
+ ScopedVclPtrInstance<MessBox>::Create( pParent, WinBits( WB_OK ), OUString(), aOut )->Execute();
#else
- MessBox( GetpApp()->GetDefDialogParent(), WinBits( WB_OK ), OUString(), aOut ).Execute();
+ ScopedVclPtrInstance<MessBox>::Create( GetpApp()->GetDefDialogParent(), WinBits( WB_OK ), OUString(), aOut )->Execute();
#endif
}
aOut.clear();
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 a46b634f4135..ae3f3f34cd32 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -2227,7 +2227,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;
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 484e941648c7..8bbc09474704 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -1386,7 +1386,7 @@ void SbaXDataBrowserController::resetted(const ::com::sun::star::lang::EventObje
sal_Bool SbaXDataBrowserController::confirmDelete(const ::com::sun::star::sdb::RowChangeEvent& /*aEvent*/) throw( RuntimeException, std::exception )
{
- if (MessageDialog(getBrowserView(), ModuleRes(STR_QUERY_BRW_DELETE_ROWS), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO).Execute() != RET_YES)
+ if (ScopedVclPtrInstance<MessageDialog>::Create(getBrowserView(), ModuleRes(STR_QUERY_BRW_DELETE_ROWS), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() != RET_YES)
return sal_False;
return sal_True;
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
index 66fedee4469b..8b43ab4cfe7b 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
@@ -328,7 +328,7 @@ namespace dbaui
}
else
return true;
- MessageDialog(NULL, MnemonicGenerator::EraseAllMnemonicChars(aErrorText)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, MnemonicGenerator::EraseAllMnemonicChars(aErrorText))->Execute();
pErrorWin->GrabFocus();
return false;
}
diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx
index 3b34eabc3406..6d8762a3a6c7 100644
--- a/dbaccess/source/ui/dlg/paramdialog.cxx
+++ b/dbaccess/source/ui/dlg/paramdialog.cxx
@@ -198,7 +198,7 @@ namespace dbaui
OUString sMessage(ModuleRes(STR_COULD_NOT_CONVERT_PARAM));
sMessage = sMessage.replaceAll( "$name$", sName );
- MessageDialog(NULL, sMessage).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, sMessage)->Execute();
m_pParam->GrabFocus();
return 1L;
}
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index 1903b0cd6029..4665a9a882af 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -457,7 +457,7 @@ namespace dbaui
if ( !pWin )
pWin = getView()->Window::GetParent();
- MessageDialog(pWin, aMessage, VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(pWin, aMessage, VCL_MESSAGE_INFO)->Execute();
}
const Reference< XConnection >& DBSubComponentController::getConnection() const
{
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index de79ceb57cc3..8cdb1012d338 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -759,7 +759,7 @@ namespace
{
// only show the messagebox the first time
if (!bCritsOnAsterikWarning)
- MessageDialog(_pView, ModuleRes( STR_QRY_CRITERIA_ON_ASTERISK)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(_pView, ModuleRes( STR_QRY_CRITERIA_ON_ASTERISK))->Execute();
bCritsOnAsterikWarning = true;
continue;
}
@@ -918,7 +918,7 @@ namespace
{
// only show the MessageBox the first time
if (!bCritsOnAsterikWarning)
- MessageDialog(_pView, ModuleRes( STR_QRY_ORDERBY_ON_ASTERISK)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(_pView, ModuleRes( STR_QRY_ORDERBY_ON_ASTERISK))->Execute();
bCritsOnAsterikWarning = true;
continue;
}
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 7e97c526d33c..3ff721489ea7 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -407,7 +407,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
}
{
SolarMutexGuard guard;
- short n = DependencyDialog( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, deps ).Execute();
+ short n = ScopedVclPtrInstance<DependencyDialog>::Create( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, deps )->Execute();
// Distinguish between closing the dialog and programatically
// canceling the dialog (headless VCL):
approve = n == RET_OK
@@ -949,7 +949,7 @@ void ExtensionCmdQueue::Thread::_checkForUpdates(
short nDialogResult = RET_OK;
if ( !dataDownload.empty() )
{
- nDialogResult = UpdateInstallDialog( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, dataDownload, m_xContext ).Execute();
+ nDialogResult = ScopedVclPtrInstance<UpdateInstallDialog>::Create( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, dataDownload, m_xContext )->Execute();
pUpdateDialog->notifyMenubar( false, true ); // Check, if there are still pending updates to be notified via menu bar icon
}
else
diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx
index 9150d42ea9be..a27b1e66040d 100644
--- a/extensions/source/abpilot/abspilot.cxx
+++ b/extensions/source/abpilot/abspilot.cxx
@@ -267,7 +267,7 @@ namespace abp
if ( aTables.empty() )
{
- if (RET_YES != MessageDialog(this, ModuleRes(( getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_STR_QRY_NO_EVO_GW : RID_STR_QRY_NOTABLES)), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO).Execute())
+ if (RET_YES != ScopedVclPtrInstance<MessageDialog>::Create(this, ModuleRes(( getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_STR_QRY_NO_EVO_GW : RID_STR_QRY_NOTABLES)), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute())
{
// cannot ask the user, or the user chose to use this data source, though there are no tables
bAllow = false;
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index 389c39d541a5..88570c5af09f 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -593,7 +593,7 @@ IMPL_LINK_NOARG(UpdateCheckUI, ClickHdl)
mrJob->execute( aEmpty );
}
catch(const uno::Exception&) {
- MessageDialog( NULL, ResId( STR_NO_WEBBROWSER_FOUND, *mpSfxResMgr )).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create( nullptr, ResId( STR_NO_WEBBROWSER_FOUND, *mpSfxResMgr ))->Execute();
}
}
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index ca24f23fa763..ba3163b9ece4 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -43,7 +43,7 @@ class DBSaveData;
static DBSaveData* pSaveObj = NULL;
-#define ERRORBOX(s) MessageDialog(this, s).Execute()
+#define ERRORBOX(s) ScopedVclPtrInstance<MessageDialog>::Create(this, s)->Execute()
// class DBSaveData
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index c6f226689276..5ffac4434adf 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -41,7 +41,7 @@
#include <limits>
-#define ERRORBOX(rid) MessageDialog(this, ScGlobal::GetRscString(rid)).Execute()
+#define ERRORBOX(rid) ScopedVclPtrInstance<MessageDialog>::Create(this, ScGlobal::GetRscString(rid))->Execute()
#define QUERY_ENTRY_COUNT 4
#define INVALID_HEADER_POS std::numeric_limits<size_t>::max()
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index 4cf0a86013d1..9ae4d34a1e85 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -39,7 +39,7 @@
// DEFINE --------------------------------------------------------------------
-#define ERRORBOX(rid) MessageDialog(this, ScGlobal::GetRscString(rid)).Execute()
+#define ERRORBOX(rid) ScopedVclPtrInstance<MessageDialog>::Create(this, ScGlobal::GetRscString(rid))->Execute()
// class ScSpecialFilterDialog
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 68fbc944025c..85661d1067a2 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -807,7 +807,7 @@ SfxTabPage::sfxpg ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP )
if ( !bPosInputOk )
{
- MessageDialog(this, ScGlobal::GetRscString( STR_INVALID_TABREF)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, ScGlobal::GetRscString( STR_INVALID_TABREF))->Execute();
m_pEdOutPos->GrabFocus();
m_pEdOutPos->SetSelection( Selection( 0, SELECTION_MAX ) );
theOutPos.Set(0,0,0);
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index d44b489ff2ad..8772dc0b5004 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -26,8 +26,8 @@
#include <vcl/msgbox.hxx>
#include <boost/scoped_array.hpp>
-#define ERRORBOX(s) MessageDialog(this, s).Execute()
-#define QUERYBOX(m) QueryBox(this,WinBits(WB_YES_NO|WB_DEF_YES),m).Execute()
+#define ERRORBOX(s) ScopedVclPtrInstance<MessageDialog>::Create(this, s)->Execute()
+#define QUERYBOX(m) ScopedVclPtrInstance<QueryBox>::Create(this,WinBits(WB_YES_NO|WB_DEF_YES),m)->Execute()
const sal_uLong nEntryDataCol = 0;
const sal_uLong nEntryDataRow = 1;
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx
index fd92d08981e9..719f03726188 100644
--- a/sc/source/ui/miscdlgs/instbdlg.cxx
+++ b/sc/source/ui/miscdlgs/instbdlg.cxx
@@ -312,7 +312,7 @@ IMPL_LINK_NOARG(ScInsertTableDlg, DoEnterHdl)
else
{
OUString aErrMsg ( ScGlobal::GetRscString( STR_INVALIDTABNAME ) );
- (void)MessageDialog(this, aErrMsg).Execute();
+ (void)ScopedVclPtrInstance<MessageDialog>::Create(this, aErrMsg)->Execute();
}
return 0;
}
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index 8072c83a067c..7f960aca2994 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -809,7 +809,7 @@ IMPL_LINK( ScOptSolverDlg, CursorDownHdl, ScCursorRefEdit*, pEdit )
void ScOptSolverDlg::ShowError( bool bCondition, formula::RefEdit* pFocus )
{
OUString aMessage = bCondition ? maConditionError : maInputError;
- MessageDialog(this, aMessage).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aMessage)->Execute();
if (pFocus)
{
mpEdActive = pFocus;
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx
index af94aabb8424..e8904376f098 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -35,7 +35,7 @@ namespace
{
void lclErrorDialog( vcl::Window* pParent, const OUString& aString )
{
- MessageDialog(pParent, aString).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(pParent, aString)->Execute();
}
}
diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx
index e86b3b42785d..3706a34edced 100644
--- a/sc/source/ui/miscdlgs/tabopdlg.cxx
+++ b/sc/source/ui/miscdlgs/tabopdlg.cxx
@@ -223,7 +223,7 @@ void ScTabOpDlg::RaiseError( ScTabOpErr eError )
break;
}
- MessageDialog(this, *pMsg, VCL_MESSAGE_ERROR, VCL_BUTTONS_OK_CANCEL).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, *pMsg, VCL_MESSAGE_ERROR, VCL_BUTTONS_OK_CANCEL)->Execute();
pEd->GrabFocus();
}
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 1985e09eb118..30a124ebc9da 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -50,7 +50,7 @@ const sal_uInt16 SC_AREASDLG_RR_USER = 1;
const sal_uInt16 SC_AREASDLG_RR_OFFSET = 2;
#define HDL(hdl) LINK( this, ScPrintAreasDlg, hdl )
-#define ERRORBOX(nId) MessageDialog(this, ScGlobal::GetRscString(nId)).Execute()
+#define ERRORBOX(nId) ScopedVclPtrInstance<MessageDialog>::Create(this, ScGlobal::GetRscString(nId))->Execute()
// globale Funktionen (->am Ende der Datei):
diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx
index 22fc503094a4..cedfc188e44c 100644
--- a/scripting/source/dlgprov/dlgevtatt.cxx
+++ b/scripting/source/dlgprov/dlgevtatt.cxx
@@ -646,7 +646,7 @@ namespace dlgprov
aOUFinal += aQuoteChar;
aOUFinal += aOURes.copy( nIndex + 2 );
- MessageDialog(NULL, aOUFinal).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, aOUFinal)->Execute();
}
}
}
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 448dd30947f9..e6af0be68110 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -234,7 +234,7 @@ void SdModule::Execute(SfxRequest& rReq)
}
else
{
- MessageDialog(NULL, SD_RESSTR(STR_CANT_PERFORM_IN_LIVEMODE)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SD_RESSTR(STR_CANT_PERFORM_IN_LIVEMODE))->Execute();
SFX_REQUEST_ARG( rReq, pLinkItem, SfxLinkItem, SID_DONELINK, false );
if( pLinkItem )
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index d3708df9bb04..7691f2dc0113 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -511,7 +511,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
// unable to create PlugIn
OUString aStrErr( SdResId( STR_ERROR_OBJNOCREATE_PLUGIN ) );
aStrErr = aStrErr.replaceFirst( "%", aStrURL );
- MessageDialog(mpWindow, aStrErr).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(mpWindow, aStrErr)->Execute();
}
}
}
diff --git a/sd/source/ui/func/futhes.cxx b/sd/source/ui/func/futhes.cxx
index 327e58fea3cc..7ccee443f4d6 100644
--- a/sd/source/ui/func/futhes.cxx
+++ b/sd/source/ui/func/futhes.cxx
@@ -113,7 +113,7 @@ void FuThesaurus::DoExecute( SfxRequest& )
if (eState == EE_SPELL_NOLANGUAGE)
{
- MessageDialog(mpWindow, SD_RESSTR(STR_NOLANGUAGE)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(mpWindow, SD_RESSTR(STR_NOLANGUAGE))->Execute();
}
}
}
@@ -140,7 +140,7 @@ void FuThesaurus::DoExecute( SfxRequest& )
if (eState == EE_SPELL_NOLANGUAGE)
{
- MessageDialog(mpWindow, SD_RESSTR(STR_NOLANGUAGE)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(mpWindow, SD_RESSTR(STR_NOLANGUAGE))->Execute();
}
}
}
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index b60da280bf12..40c80143dc92 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1258,7 +1258,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
SvtModuleOptions aModuleOpt;
if ( !aModuleOpt.IsImpress() )
{
- MessageDialog( 0, SFX2_RESSTR( STR_MODULENOTINSTALLED )).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SFX2_RESSTR( STR_MODULENOTINSTALLED ))->Execute();
return;
}
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 3c899b35c91e..ac35800f3d99 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -545,7 +545,7 @@ bool SvBaseLink::ExecuteEdit( const OUString& _rNewName )
else
return false;
- MessageDialog(pImpl->m_pParentWin, sError).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(pImpl->m_pParentWin, sError)->Execute();
}
}
else if( !pImpl->m_bIsConnect )
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index bda4806c4c89..0e47101b7385 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1652,7 +1652,7 @@ void CustomPropertiesWindow::ValidateLine( CustomPropertyLine* pLine, bool bIsFr
if ( bIsFromTypeBox ) // LoseFocus of TypeBox
pLine->m_bTypeLostFocus = true;
vcl::Window* pParent = GetParent()->GetParent();
- if (MessageDialog(pParent, SfxResId(STR_SFX_QUERY_WRONG_TYPE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_OK_CANCEL).Execute() == RET_OK)
+ if (ScopedVclPtrInstance<MessageDialog>::Create(pParent, SfxResId(STR_SFX_QUERY_WRONG_TYPE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_OK_CANCEL)->Execute() == RET_OK)
pLine->m_aTypeBox->SelectEntryPos( m_aTypeBox->GetEntryPos( reinterpret_cast<void*>(CUSTOM_TYPE_TEXT) ) );
else
pLine->m_aValueEdit->GrabFocus();
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index 0824e3d3c09d..464d12a6a5b3 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -37,7 +37,7 @@ IMPL_LINK( SfxNewStyleDlg, OKHdl, Control *, pControl )
{
if ( !pStyle->IsUserDefined() )
{
- MessageDialog( this, SfxResId( STR_POOL_STYLE_NAME ), VCL_MESSAGE_INFO ).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create( this, SfxResId( STR_POOL_STYLE_NAME ), VCL_MESSAGE_INFO )->Execute();
return 0;
}
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index f4ba28b17d79..f35c470dbaed 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -872,7 +872,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
}
case SID_CANCELCHECKOUT:
{
- if (MessageDialog(NULL, SfxResId(STR_QUERY_CANCELCHECKOUT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO).Execute() == RET_YES)
+ if (ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_QUERY_CANCELCHECKOUT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() == RET_YES)
{
CancelCheckOut( );
@@ -1398,7 +1398,7 @@ void SfxObjectShell::ImplSign( bool bScriptingContent )
)
{
// Only OASIS and OOo6.x formats will be handled further
- MessageDialog( NULL, SfxResId( STR_INFO_WRONGDOCFORMAT ), VCL_MESSAGE_INFO ).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SfxResId( STR_INFO_WRONGDOCFORMAT ), VCL_MESSAGE_INFO )->Execute();
return;
}
@@ -1432,8 +1432,8 @@ void SfxObjectShell::ImplSign( bool bScriptingContent )
if ( nVersion >= SvtSaveOptions::ODFVER_012 )
{
- if ( (bHasSign && MessageDialog(NULL, SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO).Execute() == RET_YES)
- || (!bHasSign && MessageDialog(NULL, SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO).Execute() == RET_YES) )
+ if ( (bHasSign && ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() == RET_YES)
+ || (!bHasSign && ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) )
{
sal_uInt16 nId = SID_SAVEDOC;
if ( !GetMedium() || GetMedium()->GetName().isEmpty() )
@@ -1449,7 +1449,7 @@ void SfxObjectShell::ImplSign( bool bScriptingContent )
|| SotStorage::GetVersion( GetMedium()->GetStorage() ) <= SOFFICE_FILEFORMAT_60 ) )
{
// Only OASIS format will be handled further
- MessageDialog( NULL, SfxResId( STR_INFO_WRONGDOCFORMAT ), VCL_MESSAGE_INFO ).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SfxResId( STR_INFO_WRONGDOCFORMAT ), VCL_MESSAGE_INFO )->Execute();
return;
}
}
@@ -1464,7 +1464,7 @@ void SfxObjectShell::ImplSign( bool bScriptingContent )
}
else
{
- MessageDialog(NULL, SfxResId(STR_XMLSEC_ODF12_EXPECTED)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_XMLSEC_ODF12_EXPECTED))->Execute();
return;
}
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 8885a5d7267d..0114dfb0ff77 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -942,7 +942,7 @@ void SfxTemplateManagerDlg::OnTemplateImport ()
{
OUString aMsg(SfxResId(STR_MSG_ERROR_IMPORT).toString());
aMsg = aMsg.replaceFirst("$1",pFolder->maTitle);
- MessageDialog(this, aMsg.replaceFirst("$2",aTemplateList)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aMsg.replaceFirst("$2",aTemplateList))->Execute();
}
}
}
@@ -965,7 +965,7 @@ void SfxTemplateManagerDlg::OnTemplateImport ()
{
OUString aMsg(SfxResId(STR_MSG_ERROR_IMPORT).toString());
aMsg = aMsg.replaceFirst("$1",mpLocalView->getCurRegionName());
- MessageDialog(this, aMsg.replaceFirst("$2",aTemplateList)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aMsg.replaceFirst("$2",aTemplateList))->Execute();
}
}
@@ -1054,7 +1054,7 @@ void SfxTemplateManagerDlg::OnTemplateExport()
if (!aTemplateList.isEmpty())
{
OUString aText( SfxResId(STR_MSG_ERROR_EXPORT).toString() );
- MessageDialog(this, aText.replaceFirst("$1",aTemplateList)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aText.replaceFirst("$1",aTemplateList))->Execute();
}
}
}
@@ -1216,7 +1216,7 @@ void SfxTemplateManagerDlg::OnTemplateDelete ()
if (!aTemplateList.isEmpty())
{
OUString aMsg( SfxResId(STR_MSG_ERROR_DELETE_TEMPLATE).toString() );
- MessageDialog(this, aMsg.replaceFirst("$1",aTemplateList)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aMsg.replaceFirst("$1",aTemplateList))->Execute();
}
}
@@ -1280,7 +1280,7 @@ void SfxTemplateManagerDlg::OnFolderDelete()
if (!aFolderList.isEmpty())
{
OUString aMsg( SfxResId(STR_MSG_ERROR_DELETE_FOLDER).toString() );
- MessageDialog(this, aMsg.replaceFirst("$1",aFolderList)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aMsg.replaceFirst("$1",aFolderList))->Execute();
}
}
@@ -1301,7 +1301,7 @@ void SfxTemplateManagerDlg::OnTemplateSaveAs()
if (!mpLocalView->isNonRootRegionVisible() && maSelFolders.empty())
{
- MessageDialog(this, SfxResId(STR_MSG_ERROR_SELECT_FOLDER)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, SfxResId(STR_MSG_ERROR_SELECT_FOLDER))->Execute();
return;
}
@@ -1480,7 +1480,7 @@ void SfxTemplateManagerDlg::localMoveTo(sal_uInt16 nMenuId)
OUString aDst = mpLocalView->getRegionItemName(nItemId);
OUString aMsg(SfxResId(STR_MSG_ERROR_LOCAL_MOVE).toString());
aMsg = aMsg.replaceFirst("$1",aDst);
- MessageDialog(this, aMsg.replaceFirst( "$2",aTemplateList)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aMsg.replaceFirst( "$2",aTemplateList))->Execute();
}
}
}
@@ -1534,7 +1534,7 @@ void SfxTemplateManagerDlg::remoteMoveTo(const sal_uInt16 nMenuId)
OUString aMsg(SfxResId(STR_MSG_ERROR_REMOTE_MOVE).toString());
aMsg = aMsg.replaceFirst("$1",mpRemoteView->getCurRegionName());
aMsg = aMsg.replaceFirst("$2",mpLocalView->getRegionItemName(nItemId));
- MessageDialog(this, aMsg.replaceFirst("$1",aTemplateList)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aMsg.replaceFirst("$1",aTemplateList))->Execute();
}
}
}
@@ -1590,7 +1590,7 @@ void SfxTemplateManagerDlg::localSearchMoveTo(sal_uInt16 nMenuId)
OUString aDst = mpLocalView->getRegionItemName(nItemId);
OUString aMsg(SfxResId(STR_MSG_ERROR_LOCAL_MOVE).toString());
aMsg = aMsg.replaceFirst("$1",aDst);
- MessageDialog(this, aMsg.replaceFirst( "$2",aTemplateList)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, aMsg.replaceFirst( "$2",aTemplateList))->Execute();
}
}
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 5655d61b7a50..3f238fb9d965 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -343,7 +343,7 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt
// "real" problem (not simply printing cancelled by user)
OUString aMsg( SfxResId(STR_NOSTARTPRINTER).toString() );
if ( !m_bApi )
- MessageDialog(mpViewShell->GetWindow(), aMsg).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(mpViewShell->GetWindow(), aMsg)->Execute();
// intentionally no break
}
case view::PrintableState_JOB_ABORTED :
@@ -521,7 +521,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter )
// Ask if possible, if page format should be taken over from printer.
if ( ( bOriChg || bPgSzChg ) &&
- RET_YES == MessageDialog(NULL, aMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO).Execute() )
+ RET_YES == ScopedVclPtrInstance<MessageDialog>::Create(nullptr, aMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute() )
{
// Flags with changes for <SetPrinter(SfxPrinter*)> are maintained
nChangedFlags |= nNewOpt;
@@ -794,7 +794,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
{
// no valid printer either in ItemSet or at the document
if ( !bSilent )
- MessageDialog(NULL, SfxResId(STR_NODEFPRINTER)).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_NODEFPRINTER))->Execute();
rReq.SetReturnValue(SfxBoolItem(0,false));
@@ -806,7 +806,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
{
// if printer is busy, abort configuration
if ( !bSilent )
- MessageDialog(NULL, SfxResId(STR_ERROR_PRINTER_BUSY), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_ERROR_PRINTER_BUSY), VCL_MESSAGE_INFO)->Execute();
rReq.SetReturnValue(SfxBoolItem(0,false));
return;
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 0086cadda2a1..4e4ad7902b3e 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1787,7 +1787,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
SAL_WARN_IF( !pDev, "starmath", "device for font list missing" );
SmModule *pp = SM_MOD();
- SmSymbolDialog( NULL, pDev, pp->GetSymbolManager(), *this ).Execute();
+ ScopedVclPtrInstance<SmSymbolDialog>::Create( nullptr, pDev, pp->GetSymbolManager(), *this )->Execute();
}
break;
}
diff --git a/svtools/source/dialogs/restartdialog.cxx b/svtools/source/dialogs/restartdialog.cxx
index 7bef79758c47..828188f7e034 100644
--- a/svtools/source/dialogs/restartdialog.cxx
+++ b/svtools/source/dialogs/restartdialog.cxx
@@ -83,7 +83,7 @@ void svtools::executeRestartDialog(
css::uno::Reference< css::uno::XComponentContext > const & context,
vcl::Window * parent, RestartReason reason)
{
- if (RestartDialog(parent, reason).Execute()) {
+ if (ScopedVclPtrInstance<RestartDialog>::Create(parent, reason)->Execute()) {
css::task::OfficeRestartManager::get(context)->requestRestart(
css::uno::Reference< css::task::XInteractionHandler >());
}
diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx
index 46fe1a8c4868..e2734837a793 100644
--- a/svtools/source/filter/SvFilterOptionsDialog.cxx
+++ b/svtools/source/filter/SvFilterOptionsDialog.cxx
@@ -255,7 +255,7 @@ sal_Int16 SvFilterOptionsDialog::execute()
aFltCallDlgPara.aFilterExt = aGraphicFilter.GetExportFormatShortName( nFormat );
bool bIsPixelFormat( aGraphicFilter.IsExportPixelFormat( nFormat ) );
- if ( ExportDialog( aFltCallDlgPara, mxContext, mxSourceDocument, mbExportSelection, bIsPixelFormat ).Execute() == RET_OK )
+ if ( ScopedVclPtrInstance<ExportDialog>::Create( aFltCallDlgPara, mxContext, mxSourceDocument, mbExportSelection, bIsPixelFormat )->Execute() == RET_OK )
nRet = ui::dialogs::ExecutableDialogResults::OK;
pResMgr.reset();
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 );
}
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 1366935e485c..38e6ef867ef8 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -622,8 +622,8 @@ short SwShellCrsr::MaxReplaceArived()
}
vActionCounts.push_back(nActCnt);
}
- nRet = MessageDialog(pDlg, "AskSearchDialog",
- "modules/swriter/ui/asksearchdialog.ui").Execute();
+ nRet = ScopedVclPtrInstance<MessageDialog>::Create(pDlg, "AskSearchDialog",
+ "modules/swriter/ui/asksearchdialog.ui")->Execute();
auto pActionCount = vActionCounts.begin();
for(SwViewShell& rShell : const_cast< SwCrsrShell* >( GetShell() )->GetRingContainer())
{
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index 66becc79d534..b57801d0a9ff 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -112,7 +112,7 @@ IMPL_LINK_NOARG(SwBreakDlg, OkHdl)
default:; //prevent warning
}
if(!bOk) {
- MessageDialog(this, SW_RES(STR_ILLEGAL_PAGENUM), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_ILLEGAL_PAGENUM), VCL_MESSAGE_INFO)->Execute();
m_pPageNumEdit->GrabFocus();
return 0;
}
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index 06937b723b41..ad03fa047c51 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -224,7 +224,7 @@ IMPL_LINK_NOARG(SwMailConfigPage, AuthenticationHdl)
IMPL_LINK_NOARG(SwMailConfigPage, TestHdl)
{
- SwTestAccountSettingsDialog(this).Execute();
+ ScopedVclPtrInstance<SwTestAccountSettingsDialog>::Create(this)->Execute();
return 0;
}
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index df9817f77684..5a04751c036f 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -183,7 +183,7 @@ IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressListHdl_Impl)
catch (const uno::Exception& e)
{
OSL_FAIL(OUStringToOString(e.Message, osl_getThreadTextEncoding()).getStr());
- MessageDialog(this, e.Message).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, e.Message)->Execute();
}
return 0;
}
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 42760d17958f..617a604d8457 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -419,7 +419,7 @@ bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
}
else
{
- MessageDialog(this, SW_RES(STR_WRONG_PASSWORD), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_WRONG_PASSWORD), VCL_MESSAGE_INFO)->Execute();
}
}
}
@@ -988,7 +988,7 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox )
bool bContent = pSectRepr->IsContent();
if( pBox->IsChecked() && bContent && rSh.HasSelection() )
{
- if (RET_NO == MessageDialog(this, SW_RES(STR_QUERY_CONNECT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO).Execute())
+ if (RET_NO == ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_QUERY_CONNECT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute())
pBox->Check( false );
}
if( bFile )
@@ -1271,7 +1271,7 @@ IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox )
}
else
{
- MessageDialog(pBox, SW_RES(STR_WRONG_PASSWD_REPEAT), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(pBox, SW_RES(STR_WRONG_PASSWD_REPEAT), VCL_MESSAGE_INFO)->Execute();
ChangePasswdHdl(pBox);
break;
}
@@ -1725,7 +1725,7 @@ IMPL_LINK( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton )
}
else
{
- MessageDialog(pButton, SW_RES(STR_WRONG_PASSWD_REPEAT), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(pButton, SW_RES(STR_WRONG_PASSWD_REPEAT), VCL_MESSAGE_INFO)->Execute();
}
}
else if(!bChange)
@@ -1750,7 +1750,7 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox )
if( pBox->IsChecked() )
{
if( m_pWrtSh->HasSelection() &&
- RET_NO == MessageDialog(this, SW_RES(STR_QUERY_CONNECT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO).Execute())
+ RET_NO == ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_QUERY_CONNECT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)->Execute())
pBox->Check( false );
}
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index aa81e11ef13b..e8b3d53c1369 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -646,7 +646,7 @@ IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl)
if ( rCfg.IsPredefinedLabel(sMake, sType) )
{
SAL_WARN( "sw.envelp", "label is predefined and cannot be overwritten" );
- MessageDialog(this, "CannotSaveLabelDialog", "modules/swriter/ui/cannotsavelabeldialog.ui").Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, "CannotSaveLabelDialog", "modules/swriter/ui/cannotsavelabeldialog.ui")->Execute();
return 0;
}
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index d82a5c11e397..7df83b17c2b9 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -465,7 +465,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
const OUString aShortName(m_pShortNameEdit->GetText());
if(pGlossaryHdl->HasShortName(aShortName))
{
- MessageDialog(this, SW_RES(STR_DOUBLE_SHORTNAME), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_DOUBLE_SHORTNAME), VCL_MESSAGE_INFO)->Execute();
m_pShortNameEdit->SetSelection(Selection(0, SELECTION_MAX));
m_pShortNameEdit->GrabFocus();
return 1;
@@ -602,7 +602,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
Init();
else
{
- MessageDialog(this, SW_RES( STR_NO_GLOSSARIES ), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES( STR_NO_GLOSSARIES ), VCL_MESSAGE_INFO)->Execute();
}
}
}
@@ -817,7 +817,7 @@ IMPL_LINK_NOARG(SwNewGlosNameDlg, Rename)
if( pDlg->pGlossaryHdl->HasShortName(m_pNewShort->GetText())
&& sNew != m_pOldShort->GetText() )
{
- MessageDialog(this, SW_RES(STR_DOUBLE_SHORTNAME), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_DOUBLE_SHORTNAME), VCL_MESSAGE_INFO)->Execute();
m_pNewShort->GrabFocus();
}
else
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index 37b42cd0a06f..7692e9272565 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -382,7 +382,7 @@ void SwSortDlg::Apply()
}
if( !bRet )
- MessageDialog( this->GetParent(), SW_RES(STR_SRTERR), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create( this->GetParent(), SW_RES(STR_SRTERR), VCL_MESSAGE_INFO)->Execute();
}
IMPL_LINK( SwSortDlg, DelimHdl, RadioButton*, pButton )
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index e757f3d02903..d27f981bf812 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -628,7 +628,7 @@ SfxTabPage::sfxpg SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
OUString sTableName = m_pNameED->GetText();
if(sTableName.indexOf(' ') != -1)
{
- MessageDialog(this, SW_RES(STR_WRONG_TABLENAME), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_WRONG_TABLENAME), VCL_MESSAGE_INFO)->Execute();
m_pNameED->GrabFocus();
return KEEP_PAGE;
}
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 3716b92f774c..08050057add8 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -421,7 +421,7 @@ The code below would only be part of the solution.
OUString sInfo(SW_RES(STR_SPELLING_COMPLETED));
// #i84610#
vcl::Window* pTemp = GetWindow(); // temporary needed for g++ 3.3.5
- MessageDialog(pTemp, sInfo, VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(pTemp, sInfo, VCL_MESSAGE_INFO)->Execute();
LockFocusNotification( false );
// take care that the now valid selection is stored
LoseFocus();
diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx
index fbd4f6d92332..844f6b6ab6af 100644
--- a/sw/source/uibase/dochdl/gloshdl.cxx
+++ b/sw/source/uibase/dochdl/gloshdl.cxx
@@ -327,7 +327,7 @@ bool SwGlossaryHdl::NewGlossary(const OUString& rName, const OUString& rShortNam
rCfg.IsSaveRelFile(), pOnlyText );
if(nSuccess == (sal_uInt16) -1 )
{
- MessageDialog(pWrtShell->GetView().GetWindow(), SW_RES(STR_ERR_INSERT_GLOS), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(pWrtShell->GetView().GetWindow(), SW_RES(STR_ERR_INSERT_GLOS), VCL_MESSAGE_INFO)->Execute();
}
if( !pCurGrp )
delete pTmp;
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 9178fd23692d..5e00968a0de9 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1717,7 +1717,7 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
if( bMsg && nResId )
{
- MessageDialog( 0, SW_RES( nResId ), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES( nResId ), VCL_MESSAGE_INFO)->Execute();
}
return nRet;
}
@@ -1793,7 +1793,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
if( !IsError( aReader.Read( *pRead )) )
nRet = true;
else if( bMsg )
- MessageDialog( 0, SW_RES(STR_ERROR_CLPBRD_READ), VCL_MESSAGE_INFO ).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_ERROR_CLPBRD_READ), VCL_MESSAGE_INFO )->Execute();
}
else
{
@@ -2172,7 +2172,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData,
if( !nRows || !nCols )
{
if( bMsg )
- MessageDialog(0, SW_RESSTR(STR_NO_TABLE), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SW_RESSTR(STR_NO_TABLE), VCL_MESSAGE_INFO)->Execute();
pDDETyp = 0;
break;
}
@@ -2717,7 +2717,7 @@ bool SwTransferable::_PasteDBData( TransferableDataHelper& rData,
}
else if( bMsg )
{
- MessageDialog( 0, SW_RES(STR_CLPBRD_FORMAT_ERROR), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VCL_MESSAGE_INFO)->Execute();
}
return nRet;
}
@@ -2756,7 +2756,7 @@ bool SwTransferable::_PasteFileList( TransferableDataHelper& rData,
}
else if( bMsg )
{
- MessageDialog( 0, SW_RES(STR_CLPBRD_FORMAT_ERROR), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VCL_MESSAGE_INFO)->Execute();
}
return nRet;
}
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index 3d6be4699168..155e394e143d 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -228,8 +228,8 @@ void SidebarTextControl::KeyInput( const KeyEvent& rKeyEvt )
}
else
{
- MessageDialog(this, "InfoReadonlyDialog",
- "modules/swriter/ui/inforeadonlydialog.ui").Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, "InfoReadonlyDialog",
+ "modules/swriter/ui/inforeadonlydialog.ui")->Execute();
}
}
if (bDone)
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 0d714731149c..53e7cebe51a2 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -1828,8 +1828,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
else
{
- MessageDialog(this, "InfoReadonlyDialog",
- "modules/swriter/ui/inforeadonlydialog.ui").Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, "InfoReadonlyDialog",
+ "modules/swriter/ui/inforeadonlydialog.ui")->Execute();
eKeyState = KS_End;
}
break;
@@ -1992,8 +1992,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
else
{
- MessageDialog(this, "InfoReadonlyDialog",
- "modules/swriter/ui/inforeadonlydialog.ui").Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, "InfoReadonlyDialog",
+ "modules/swriter/ui/inforeadonlydialog.ui")->Execute();
eKeyState = KS_End;
}
break;
@@ -2418,8 +2418,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
else
{
- MessageDialog(this, "InfoReadonlyDialog",
- "modules/swriter/ui/inforeadonlydialog.ui").Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(this, "InfoReadonlyDialog",
+ "modules/swriter/ui/inforeadonlydialog.ui")->Execute();
eKeyState = KS_End;
}
break;
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index 7eb1db935f03..b29c8975a0b3 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -631,8 +631,8 @@ sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
{
if(bNotFoundMessage)
{
- MessageDialog(0, "InfoNotFoundDialog",
- "modules/swriter/ui/infonotfounddialog.ui").Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, "InfoNotFoundDialog",
+ "modules/swriter/ui/infonotfounddialog.ui")->Execute();
}
else if(!bRecursive)
{
@@ -640,13 +640,13 @@ sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
if (!bForward)
{
- nRet = MessageDialog(0, "QueryContinueEndDialog",
- "modules/swriter/ui/querycontinueenddialog.ui").Execute();
+ nRet = ScopedVclPtrInstance<MessageDialog>::Create(nullptr, "QueryContinueEndDialog",
+ "modules/swriter/ui/querycontinueenddialog.ui")->Execute();
}
else
{
- nRet = MessageDialog(0, "QueryContinueBeginDialog",
- "modules/swriter/ui/querycontinuebegindialog.ui").Execute();
+ nRet = ScopedVclPtrInstance<MessageDialog>::Create(nullptr, "QueryContinueBeginDialog",
+ "modules/swriter/ui/querycontinuebegindialog.ui")->Execute();
}
if (nRet == RET_YES)
@@ -829,7 +829,7 @@ void SwSrcView::Load(SwDocShell* pDocShell)
else
{
vcl::Window *pTmpWindow = &GetViewFrame()->GetWindow();
- MessageDialog(pTmpWindow, SW_RES(STR_ERR_SRCSTREAM), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(pTmpWindow, SW_RES(STR_ERR_SRCSTREAM), VCL_MESSAGE_INFO)->Execute();
}
}
else
diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx
index 3ede0e371744..54ceb1f1cf50 100644
--- a/sw/source/uibase/uiview/uivwimp.cxx
+++ b/sw/source/uibase/uiview/uivwimp.cxx
@@ -182,7 +182,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
if( !bDone )
{
- MessageDialog( 0, SW_RES(STR_SCAN_NOSOURCE), VCL_MESSAGE_INFO ).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_SCAN_NOSOURCE), VCL_MESSAGE_INFO )->Execute();
rReq.Ignore();
}
else
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index b6f947ddfb5f..02b58fbd6337 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -2233,7 +2233,7 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe
if (!bCompare && !nFound)
{
vcl::Window* pWin = &GetEditWin();
- MessageDialog(pWin, SW_RES(STR_NO_MERGE_ENTRY), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(pWin, SW_RES(STR_NO_MERGE_ENTRY), VCL_MESSAGE_INFO)->Execute();
}
if( nRet==2 && xDocSh.Is() )
xDocSh->DoClose();
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index 9a174079ce33..d3ef95a5525c 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -842,7 +842,7 @@ void DbgGUIStart()
}
else
{
- MessageDialog(0, OUString("TOOLS Library has no Debug-Routines")).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, OUString("TOOLS Library has no Debug-Routines"))->Execute();
}
}