diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-04-17 09:37:31 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-04-25 23:27:56 +0200 |
commit | 41f5c11c3b5f5b57f480dd809b850fe563b53691 (patch) | |
tree | df139718c1c5249de728e697b6aea74152874fe0 /svtools | |
parent | c67a0d0f7ddd8ababa3197d86998979c1ce725d0 (diff) |
vcl: change ErrorHandlerFlags to DialogMask
Change-Id: I1959ac97f679d8d719f851f9869962b39a20ded9
Reviewed-on: https://gerrit.libreoffice.org/36841
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/misc/ehdl.cxx | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx index c1415de3e3be..abf9af1dd6c6 100644 --- a/svtools/source/misc/ehdl.cxx +++ b/svtools/source/misc/ehdl.cxx @@ -32,9 +32,9 @@ #include <memory> -static ErrorHandlerFlags aWndFunc( +static DialogMask aWndFunc( vcl::Window *pWin, // Parent of the dialog - ErrorHandlerFlags nFlags, + DialogMask nFlags, const OUString &rErr, // error text const OUString &rAction) // action text @@ -53,32 +53,32 @@ static ErrorHandlerFlags aWndFunc( // determine necessary WinBits from the flags WinBits eBits=0; - if ( nFlags & (ErrorHandlerFlags::ButtonsCancel | ErrorHandlerFlags::ButtonsRetry) ) + if ( nFlags & (DialogMask::ButtonsCancel | DialogMask::ButtonsRetry) ) eBits = WB_RETRY_CANCEL; - else if ( nFlags & ErrorHandlerFlags::ButtonsOkCancel ) + else if ( nFlags & DialogMask::ButtonsOkCancel ) eBits = WB_OK_CANCEL; - else if ( nFlags & ErrorHandlerFlags::ButtonsOk ) + else if ( nFlags & DialogMask::ButtonsOk ) eBits = WB_OK; - else if ( nFlags & ErrorHandlerFlags::ButtonsYesNoCancel ) + else if ( nFlags & DialogMask::ButtonsYesNoCancel ) eBits = WB_YES_NO_CANCEL; - else if ( nFlags & ErrorHandlerFlags::ButtonsYesNo ) + else if ( nFlags & DialogMask::ButtonsYesNo ) eBits = WB_YES_NO; - switch(nFlags & ErrorHandlerFlags(0x0f00)) + switch(nFlags & DialogMask(0x0f00)) { - case ErrorHandlerFlags::ButtonDefaultsOk: + case DialogMask::ButtonDefaultsOk: eBits |= WB_DEF_OK; break; - case ErrorHandlerFlags::ButtonDefaultsCancel: + case DialogMask::ButtonDefaultsCancel: eBits |= WB_DEF_CANCEL; break; - case ErrorHandlerFlags::ButtonDefaultsYes: + case DialogMask::ButtonDefaultsYes: eBits |= WB_DEF_YES; break; - case ErrorHandlerFlags::ButtonDefaultsNo: + case DialogMask::ButtonDefaultsNo: eBits |= WB_DEF_NO; break; default: break; @@ -92,44 +92,44 @@ static ErrorHandlerFlags aWndFunc( aErr = aErr.replaceAll("$(ERROR)", rErr); VclPtr<MessBox> pBox; - switch ( nFlags & ErrorHandlerFlags(0xf000) ) + switch ( nFlags & DialogMask(0xf000) ) { - case ErrorHandlerFlags::MessageError: + case DialogMask::MessageError: pBox.reset(VclPtr<ErrorBox>::Create(pWin, eBits, aErr)); break; - case ErrorHandlerFlags::MessageWarning: + case DialogMask::MessageWarning: pBox.reset(VclPtr<WarningBox>::Create(pWin, eBits, aErr)); break; - case ErrorHandlerFlags::MessageInfo: + case DialogMask::MessageInfo: pBox.reset(VclPtr<InfoBox>::Create(pWin, aErr)); break; default: { SAL_WARN( "svtools.misc", "no MessBox type"); - return ErrorHandlerFlags::ButtonsOk; + return DialogMask::ButtonsOk; } } - ErrorHandlerFlags nRet = ErrorHandlerFlags::NONE; + DialogMask nRet = DialogMask::NONE; switch ( pBox->Execute() ) { case RET_OK: - nRet = ErrorHandlerFlags::ButtonsOk; + nRet = DialogMask::ButtonsOk; break; case RET_CANCEL: - nRet = ErrorHandlerFlags::ButtonsCancel; + nRet = DialogMask::ButtonsCancel; break; case RET_RETRY: - nRet = ErrorHandlerFlags::ButtonsRetry; + nRet = DialogMask::ButtonsRetry; break; case RET_YES: - nRet = ErrorHandlerFlags::ButtonsYes; + nRet = DialogMask::ButtonsYes; break; case RET_NO: - nRet = ErrorHandlerFlags::ButtonsNo; + nRet = DialogMask::ButtonsNo; break; default: SAL_WARN( "svtools.misc", "Unknown MessBox return value" ); |