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/dialogs | |
parent | 3b6091ca42cd2d9f230e7d81648c34f3d7085107 (diff) |
ErrorBox->MessageDialog
Change-Id: I57d4e43460e40d3aff54873280eddbb18c12446b
Diffstat (limited to 'cui/source/dialogs')
-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 |
5 files changed, 19 insertions, 21 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(); |