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 /sc/source/ui | |
parent | 3b6091ca42cd2d9f230e7d81648c34f3d7085107 (diff) |
ErrorBox->MessageDialog
Change-Id: I57d4e43460e40d3aff54873280eddbb18c12446b
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/dbgui/dbnamdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/dbgui/filtdlg.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/dbgui/sfiltdlg.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/dbgui/tpsort.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/documentlinkmgr.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/crnrdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/filldlg.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/instbdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/optsolver.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/scuiautofmt.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/solvrdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpcalc.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpusrlst.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/pagedlg/areasdlg.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh3.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/dbfunc.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshf.cxx | 3 |
17 files changed, 30 insertions, 36 deletions
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index c70040ffd968..022283e06e78 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) ErrorBox(this,WinBits(WB_OK|WB_DEF_OK),s).Execute() +#define ERRORBOX(s) MessageDialog(this, s).Execute() // class DBSaveData diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index f0860c22a9fd..c80dede2be71 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -36,13 +36,12 @@ #include "filter.hrc" #include "filtdlg.hxx" -#include <vcl/msgbox.hxx> +#include <vcl/layout.hxx> #include <svl/sharedstringpool.hxx> #include <limits> -#define ERRORBOX(rid) ErrorBox( this, WinBits( WB_OK|WB_DEF_OK), \ - ScGlobal::GetRscString(rid) ).Execute() +#define ERRORBOX(rid) MessageDialog(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 620b54c1658e..af6fe97c2900 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -38,8 +38,7 @@ // DEFINE -------------------------------------------------------------------- -#define ERRORBOX(rid) ErrorBox( this, WinBits( WB_OK|WB_DEF_OK),\ - ScGlobal::GetRscString(rid) ).Execute() +#define ERRORBOX(rid) MessageDialog(this, ScGlobal::GetRscString(rid)).Execute() // class ScSpecialFilterDialog diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 5b805a505962..271af19386b3 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -778,9 +778,7 @@ int ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP ) if ( !bPosInputOk ) { - ErrorBox( this, WinBits( WB_OK | WB_DEF_OK ), - ScGlobal::GetRscString( STR_INVALID_TABREF ) - ).Execute(); + MessageDialog(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/docshell/documentlinkmgr.cxx b/sc/source/ui/docshell/documentlinkmgr.cxx index 27097365d481..419778f0bf29 100644 --- a/sc/source/ui/docshell/documentlinkmgr.cxx +++ b/sc/source/ui/docshell/documentlinkmgr.cxx @@ -24,7 +24,7 @@ #include <scresid.hxx> #include <sfx2/linkmgr.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/layout.hxx> #include <boost/noncopyable.hpp> #include <boost/scoped_ptr.hpp> @@ -165,7 +165,7 @@ bool DocumentLinkManager::updateDdeLinks( Window* pWin ) aBuf.append(aElem); aBuf.appendAscii("\nType : "); aBuf.append(aType); - ErrorBox aBox(pWin, WB_OK, aBuf.makeStringAndClear()); + MessageDialog aBox(pWin, aBuf.makeStringAndClear()); aBox.Execute(); } } diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx index dc4a3b83eea4..ec6c4fda964d 100644 --- a/sc/source/ui/miscdlgs/crnrdlg.cxx +++ b/sc/source/ui/miscdlgs/crnrdlg.cxx @@ -26,7 +26,7 @@ #include <vcl/msgbox.hxx> #include <boost/scoped_array.hpp> -#define ERRORBOX(s) ErrorBox(this,WinBits(WB_OK|WB_DEF_OK),s).Execute() +#define ERRORBOX(s) MessageDialog(this, s).Execute() #define QUERYBOX(m) QueryBox(this,WinBits(WB_YES_NO|WB_DEF_YES),m).Execute() const sal_uLong nEntryDataCol = 0; diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx index 3b057dab871f..deb798d1738f 100644 --- a/sc/source/ui/miscdlgs/filldlg.cxx +++ b/sc/source/ui/miscdlgs/filldlg.cxx @@ -20,7 +20,7 @@ #undef SC_DLLIMPLEMENTATION #include <svl/zforlist.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/layout.hxx> #include <limits.h> #include "scresid.hxx" @@ -299,8 +299,7 @@ IMPL_LINK_NOARG(ScFillSeriesDlg, OKHdl) EndDialog( RET_OK ); else { - ErrorBox( this, - WinBits( WB_OK | WB_DEF_OK ), + MessageDialog(this, aErrMsgInvalidVal ).Execute(); pEdWrong->GrabFocus(); diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx index f48035515bf6..ffe119b0603c 100644 --- a/sc/source/ui/miscdlgs/instbdlg.cxx +++ b/sc/source/ui/miscdlgs/instbdlg.cxx @@ -293,7 +293,7 @@ IMPL_LINK_NOARG(ScInsertTableDlg, DoEnterHdl) else { OUString aErrMsg ( ScGlobal::GetRscString( STR_INVALIDTABNAME ) ); - (void)ErrorBox( this,WinBits( WB_OK | WB_DEF_OK ),aErrMsg).Execute(); + (void)MessageDialog(this, aErrMsg).Execute(); } return 0; } diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index db7d9f103f08..72cf968d96cf 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -721,7 +721,7 @@ IMPL_LINK( ScOptSolverDlg, CursorDownHdl, ScCursorRefEdit*, pEdit ) void ScOptSolverDlg::ShowError( bool bCondition, formula::RefEdit* pFocus ) { OUString aMessage = bCondition ? maConditionError : maInputError; - ErrorBox( this, WinBits( WB_OK | WB_DEF_OK ), aMessage ).Execute(); + MessageDialog(this, aMessage).Execute(); if (pFocus) { mpEdActive = pFocus; diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index 381ce874b72c..cfb075418e83 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -245,9 +245,10 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, AddHdl) if ( !bFmtInserted ) { - sal_uInt16 nRet = ErrorBox( this, - WinBits( WB_OK_CANCEL | WB_DEF_OK), - ScGlobal::GetRscString(STR_INVALID_AFNAME) + sal_uInt16 nRet = MessageDialog(this, + ScGlobal::GetRscString(STR_INVALID_AFNAME), + VCL_MESSAGE_ERROR, + VCL_BUTTONS_OK_CANCEL ).Execute(); bOk = ( nRet == RET_CANCEL ); @@ -369,9 +370,10 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, RenameHdl) } if( !bFmtRenamed ) { - bOk = RET_CANCEL == ErrorBox( this, - WinBits( WB_OK_CANCEL | WB_DEF_OK), - ScGlobal::GetRscString(STR_INVALID_AFNAME) + bOk = RET_CANCEL == MessageDialog( this, + ScGlobal::GetRscString(STR_INVALID_AFNAME), + VCL_MESSAGE_ERROR, + VCL_BUTTONS_OK_CANCEL ).Execute(); } } diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx index 0e93c2f9337c..bd3fa622b7d0 100644 --- a/sc/source/ui/miscdlgs/solvrdlg.cxx +++ b/sc/source/ui/miscdlgs/solvrdlg.cxx @@ -35,7 +35,7 @@ namespace { void lclErrorDialog( Window* pParent, const OUString& aString ) { - ErrorBox( pParent, WinBits( WB_OK | WB_DEF_OK), aString ).Execute(); + MessageDialog(pParent, aString).Execute(); } } diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx index 68d2952d0525..662eeabf3210 100644 --- a/sc/source/ui/optdlg/tpcalc.cxx +++ b/sc/source/ui/optdlg/tpcalc.cxx @@ -170,8 +170,7 @@ int ScTpCalcOptions::DeactivatePage( SfxItemSet* pSetP ) if ( nReturn == KEEP_PAGE ) { - ErrorBox( this, - WinBits( WB_OK | WB_DEF_OK ), + MessageDialog( this, ScGlobal::GetRscString( STR_INVALID_EPS ) ).Execute(); diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index a2b637dcb5e3..71b038c8077a 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -683,7 +683,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn ) } else { - ErrorBox( this, WinBits( WB_OK | WB_DEF_OK ), + MessageDialog(this, ScGlobal::GetRscString( STR_INVALID_TABREF ) ).Execute(); mpEdCopyFrom->GrabFocus(); diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx index fe7a88e4ee1f..982816334f2d 100644 --- a/sc/source/ui/pagedlg/areasdlg.cxx +++ b/sc/source/ui/pagedlg/areasdlg.cxx @@ -50,8 +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) ErrorBox( this, WinBits(WB_OK|WB_DEF_OK), \ - ScGlobal::GetRscString( nId ) ).Execute() +#define ERRORBOX(nId) MessageDialog(this, ScGlobal::GetRscString(nId)).Execute() // globale Funktionen (->am Ende der Datei): diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index 32912761193e..d1b7759a89b2 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -425,8 +425,8 @@ void ScCellShell::Execute( SfxRequest& rReq ) } else if( ! rReq.IsAPI() ) { - ErrorBox aErrorBox( pTabViewShell->GetDialogParent(), WinBits(WB_OK | WB_DEF_OK), - ScGlobal::GetRscString(STR_NOAREASELECTED) ); + MessageDialog aErrorBox(pTabViewShell->GetDialogParent(), + ScGlobal::GetRscString(STR_NOAREASELECTED)); aErrorBox.Execute(); } } @@ -838,7 +838,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) } } else - ErrorBox( pDlgParent, WinBits( WB_OK | WB_DEF_OK ), + MessageDialog (pDlgParent, ScGlobal::GetRscString(STR_INVALID_AFAREA) ).Execute(); } break; diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx index 50d638cdcf50..b0c0efc66e84 100644 --- a/sc/source/ui/view/dbfunc.cxx +++ b/sc/source/ui/view/dbfunc.cxx @@ -383,8 +383,8 @@ void ScDBFunc::ToggleAutoFilter() } else { - ErrorBox aErrorBox( GetViewData().GetDialogParent(), WinBits( WB_OK | WB_DEF_OK ), - ScGlobal::GetRscString( STR_ERR_AUTOFILTER ) ); + MessageDialog aErrorBox(GetViewData().GetDialogParent(), + ScGlobal::GetRscString(STR_ERR_AUTOFILTER)); aErrorBox.Execute(); } } diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index 5a6725663839..75b221ecff45 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -410,8 +410,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) } else { - nRet = ErrorBox( GetDialogParent(), - WinBits( WB_OK | WB_DEF_OK ), + nRet = MessageDialog(GetDialogParent(), aErrMsg ).Execute(); } |