diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-08-18 08:50:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-18 10:57:21 +0100 |
commit | a107bdfdfc1baf73f14055262d64bf616fc0a889 (patch) | |
tree | 2e4cbadd538f5e8d495fb8953a5a7939c8ab2bb5 /cui/source | |
parent | 3b6091ca42cd2d9f230e7d81648c34f3d7085107 (diff) |
ErrorBox->MessageDialog
Change-Id: I57d4e43460e40d3aff54873280eddbb18c12446b
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 6 | ||||
-rw-r--r-- | cui/source/dialogs/about.cxx | 4 | ||||
-rw-r--r-- | cui/source/dialogs/insdlg.cxx | 9 | ||||
-rw-r--r-- | cui/source/dialogs/passwdomdlg.cxx | 7 | ||||
-rw-r--r-- | cui/source/dialogs/scriptdlg.cxx | 14 | ||||
-rw-r--r-- | cui/source/options/doclinkdialog.cxx | 8 | ||||
-rw-r--r-- | cui/source/options/optjava.cxx | 5 | ||||
-rw-r--r-- | cui/source/tabpages/tparea.cxx | 4 |
8 files changed, 27 insertions, 30 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index ddcdc42b4277..bae28d33a704 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -20,7 +20,7 @@ #include <tools/shl.hxx> #include <vcl/wrkwin.hxx> #include <vcl/menu.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/layout.hxx> #include <vcl/scrbar.hxx> #include <vcl/settings.hxx> #include <SpellAttrib.hxx> @@ -2030,8 +2030,8 @@ IMPL_LINK( SpellDialog, HandleHyperlink, FixedHyperlink*, pHyperlink ) uno::Any exc( ::cppu::getCaughtException() ); OUString msg( ::comphelper::anyToString( exc ) ); const SolarMutexGuard guard; - ErrorBox aErrorBox( NULL, WB_OK, msg ); - aErrorBox.SetText( sTitle ); + MessageDialog aErrorBox(NULL, msg); + aErrorBox.SetText(sTitle); aErrorBox.Execute(); } diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index ff619623c1f8..06a99138bb10 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -19,7 +19,7 @@ #include <vcl/layout.hxx> #include <vcl/svapp.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/layout.hxx> #include <vcl/settings.hxx> #include <tools/stream.hxx> @@ -127,7 +127,7 @@ IMPL_LINK( AboutDialog, HandleClick, PushButton*, pButton ) Any exc( ::cppu::getCaughtException() ); OUString msg( ::comphelper::anyToString( exc ) ); const SolarMutexGuard guard; - ErrorBox aErrorBox( NULL, WB_OK, msg ); + MessageDialog aErrorBox(NULL, msg); aErrorBox.SetText( GetText() ); aErrorBox.Execute(); } diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index fe7dfea399cf..6a092a64bda1 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -46,7 +46,6 @@ #include <vcl/group.hxx> #include <vcl/layout.hxx> #include <vcl/lstbox.hxx> -#include <vcl/msgbox.hxx> #include <vcl/svapp.hxx> #include <comphelper/classids.hxx> #include <sfx2/frmdescr.hxx> @@ -280,7 +279,7 @@ short SvInsertOleDlg::Execute() // global Resource from svtools (former so3 resource) OUString aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_FROM_FILE ) ); aErr = aErr.replaceFirst( "%", aFileName ); - ErrorBox( this, WB_3DLOOK | WB_OK, aErr ).Execute(); + MessageDialog(this, aErr).Execute(); } else { @@ -288,7 +287,7 @@ short SvInsertOleDlg::Execute() // global Resource from svtools (former so3 resource) OUString aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE ) ); aErr = aErr.replaceFirst( "%", aServerName ); - ErrorBox( this, WB_3DLOOK | WB_OK, aErr ).Execute(); + MessageDialog(this, aErr).Execute(); } } } @@ -329,7 +328,7 @@ short SvInsertOleDlg::Execute() // global Resource from svtools (former so3 resource) OUString aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_FROM_FILE ) ); aErr = aErr.replaceFirst( "%", aFileName ); - ErrorBox( this, WB_3DLOOK | WB_OK, aErr ).Execute(); + MessageDialog(this, aErr).Execute(); } } } @@ -466,7 +465,7 @@ short SvInsertPlugInDialog::Execute() // global Resource from svtools (former so3 resource) OUString aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_PLUGIN ) ); aErr = aErr.replaceFirst( "%", aURL ); - ErrorBox( this, WB_3DLOOK | WB_OK, aErr ).Execute(); + MessageDialog(this, aErr).Execute(); } } diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx index 1a86bc480d6a..cf9faf80336f 100644 --- a/cui/source/dialogs/passwdomdlg.cxx +++ b/cui/source/dialogs/passwdomdlg.cxx @@ -28,7 +28,6 @@ #include <vcl/button.hxx> #include <vcl/layout.hxx> #include <vcl/settings.hxx> -#include <vcl/msgbox.hxx> struct PasswordToOpenModifyDialog_Impl { @@ -102,8 +101,8 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG m_pPasswdToModifyED->GetText().isEmpty(); if (bInvalidState) { - ErrorBox aErrorBox( m_pParent, WB_OK, - m_bIsPasswordToModify? m_aInvalidStateForOkButton : m_aInvalidStateForOkButton_v2 ); + MessageDialog aErrorBox(m_pParent, + m_bIsPasswordToModify? m_aInvalidStateForOkButton : m_aInvalidStateForOkButton_v2); aErrorBox.Execute(); } else // check for mismatched passwords... @@ -113,7 +112,7 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG const int nMismatch = (bToOpenMatch? 0 : 1) + (bToModifyMatch? 0 : 1); if (nMismatch > 0) { - ErrorBox aErrorBox( m_pParent, WB_OK, nMismatch == 1 ? m_aOneMismatch : m_aTwoMismatch ); + MessageDialog aErrorBox(m_pParent, nMismatch == 1 ? m_aOneMismatch : m_aTwoMismatch); aErrorBox.Execute(); Edit* pEdit = !bToOpenMatch ? m_pPasswdToOpenED : m_pPasswdToModifyED; diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 1e43a5751924..358e5d540605 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -21,7 +21,7 @@ #include <sfx2/objsh.hxx> #include <vcl/svapp.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/layout.hxx> #include <osl/mutex.hxx> #include <cuires.hrc> @@ -906,7 +906,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry ) bValid = false; OUString aError( m_createErrStr ); aError += m_createDupStr; - ErrorBox aErrorBox( static_cast<Window*>(this), WB_OK | RET_OK, aError ); + MessageDialog aErrorBox(static_cast<Window*>(this), aError); aErrorBox.SetText( m_createErrTitleStr ); aErrorBox.Execute(); xNewDlg->SetObjectName( aNewName ); @@ -993,7 +993,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry ) { //ISSUE L10N & message from exception? OUString aError( m_createErrStr ); - ErrorBox aErrorBox( static_cast<Window*>(this), WB_OK | RET_OK, aError ); + MessageDialog aErrorBox(static_cast<Window*>(this), aError); aErrorBox.SetText( m_createErrTitleStr ); aErrorBox.Execute(); } @@ -1069,7 +1069,7 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry ) { //ISSUE L10N & message from exception? OUString aError( m_renameErrStr ); - ErrorBox aErrorBox( static_cast<Window*>(this), WB_OK | RET_OK, aError ); + MessageDialog aErrorBox(static_cast<Window*>(this), aError); aErrorBox.SetText( m_renameErrTitleStr ); aErrorBox.Execute(); } @@ -1080,7 +1080,7 @@ void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry ) Reference< browse::XBrowseNode > node = getBrowseNode( pEntry ); // ISSUE L10N string & can we centre list? OUString aQuery = m_delQueryStr + getListOfChildren( node, 0 ); - QueryBox aQueryBox( static_cast<Window*>(this), WB_YES_NO | WB_DEF_YES, aQuery ); + MessageDialog aQueryBox(static_cast<Window*>(this), aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); aQueryBox.SetText( m_delQueryTitleStr ); if ( aQueryBox.Execute() == RET_NO ) { @@ -1115,7 +1115,7 @@ void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry ) else { //ISSUE L10N & message from exception? - ErrorBox aErrorBox( static_cast<Window*>(this), WB_OK | RET_OK, m_delErrStr ); + MessageDialog aErrorBox(static_cast<Window*>(this), m_delErrStr); aErrorBox.SetText( m_delErrTitleStr ); aErrorBox.Execute(); } @@ -1487,7 +1487,7 @@ IMPL_LINK( SvxScriptErrorDialog, ShowDialog, OUString*, pMessage ) message = OUString( CUI_RES( RID_SVXSTR_ERROR_TITLE ) ); } - MessBox* pBox = new WarningBox( NULL, WB_OK, message ); + MessageDialog* pBox = new MessageDialog(NULL, message, VCL_MESSAGE_WARNING); pBox->SetText( CUI_RES( RID_SVXSTR_ERROR_TITLE ) ); pBox->Execute(); diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx index 7c8c2e0eeb40..ad1ba1fd97c3 100644 --- a/cui/source/options/doclinkdialog.cxx +++ b/cui/source/options/doclinkdialog.cxx @@ -23,7 +23,7 @@ #include <comphelper/processfactory.hxx> #include <cuires.hrc> #include <svl/filenotation.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/layout.hxx> #include <ucbhelper/content.hxx> #include <dialmgr.hxx> #include <tools/urlobj.hxx> @@ -116,7 +116,7 @@ namespace svx { OUString sMsg = CUI_RES(STR_LINKEDDOC_DOESNOTEXIST); sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText()); - ErrorBox aError(this, WB_OK , sMsg); + MessageDialog aError(this, sMsg); aError.Execute(); return 0L; } // if (!bFileExists) @@ -125,7 +125,7 @@ namespace svx { OUString sMsg = CUI_RES(STR_LINKEDDOC_NO_SYSTEM_FILE); sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText()); - ErrorBox aError(this, WB_OK , sMsg); + MessageDialog aError(this, sMsg); aError.Execute(); return 0L; } @@ -137,7 +137,7 @@ namespace svx { OUString sMsg = CUI_RES(STR_NAME_CONFLICT); sMsg = sMsg.replaceFirst("$file$", sCurrentText); - InfoBox aError(this, sMsg); + MessageDialog aError(this, sMsg, VCL_MESSAGE_INFO); aError.Execute(); m_pName->SetSelection(Selection(0,sCurrentText.getLength())); diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 77f9e69bf006..533bd97e1fca 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -32,7 +32,6 @@ #include <vcl/help.hxx> #include <tools/urlobj.hxx> #include <vcl/layout.hxx> -#include <vcl/msgbox.hxx> #include <vcl/waitobj.hxx> #include <unotools/pathoptions.hxx> #include <svtools/imagemgr.hxx> @@ -978,7 +977,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl) { OUString sMsg( CUI_RES( RID_SVXSTR_MULTIFILE_DBL_ERR ) ); sMsg = sMsg.replaceFirst( "%1", sFile ); - ErrorBox( this, WB_OK, sMsg ).Execute(); + MessageDialog(this, sMsg).Execute(); } } EnableRemoveButton(); @@ -1015,7 +1014,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl) { OUString sMsg( CUI_RES( RID_SVXSTR_MULTIFILE_DBL_ERR ) ); sMsg = sMsg.replaceFirst( "%1", sNewFolder ); - ErrorBox( this, WB_OK, sMsg ).Execute(); + MessageDialog(this, sMsg).Execute(); } } EnableRemoveButton(); diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 1b7a65ea3717..809441338804 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -43,7 +43,7 @@ //UUUU #include "sfx2/opengrf.hxx" -#include <vcl/msgbox.hxx> +#include <vcl/layout.hxx> #include <boost/scoped_ptr.hpp> using namespace com::sun::star; @@ -2166,7 +2166,7 @@ IMPL_LINK_NOARG( SvxAreaTabPage, ClickImportHdl_Impl ) else { // graphic could not be loaded - ErrorBox(this, WB_OK, OUString(ResId(RID_SVXSTR_READ_DATA_ERROR, rMgr))).Execute(); + MessageDialog (this, OUString(ResId(RID_SVXSTR_READ_DATA_ERROR, rMgr))).Execute(); } } |