summaryrefslogtreecommitdiff
path: root/uui/source/iahndl-errorhandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'uui/source/iahndl-errorhandler.cxx')
-rw-r--r--uui/source/iahndl-errorhandler.cxx32
1 files changed, 18 insertions, 14 deletions
diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx
index 786ba755a298..a549cc2a4e7b 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -40,7 +40,7 @@ using namespace com::sun::star;
namespace {
-sal_uInt16
+ErrorHandlerFlags
executeErrorDialog(
vcl::Window * pParent,
task::InteractionClassification eClassification,
@@ -101,27 +101,29 @@ executeErrorDialog(
throw uno::RuntimeException("out of memory");
}
- sal_uInt16 aResult = xBox->Execute();
+ sal_uInt16 aMessResult = xBox->Execute();
xBox.disposeAndClear();
- switch( aResult )
+ ErrorHandlerFlags aResult = ErrorHandlerFlags::NONE;
+ switch( aMessResult )
{
case RET_OK:
- aResult = ERRCODE_BUTTON_OK;
+ aResult = ErrorHandlerFlags::ButtonsOk;
break;
case RET_CANCEL:
- aResult = ERRCODE_BUTTON_CANCEL;
+ aResult = ErrorHandlerFlags::ButtonsCancel;
break;
case RET_YES:
- aResult = ERRCODE_BUTTON_YES;
+ aResult = ErrorHandlerFlags::ButtonsYes;
break;
case RET_NO:
- aResult = ERRCODE_BUTTON_NO;
+ aResult = ErrorHandlerFlags::ButtonsNo;
break;
case RET_RETRY:
- aResult = ERRCODE_BUTTON_RETRY;
+ aResult = ErrorHandlerFlags::ButtonsRetry;
break;
+ default: assert(false);
}
return aResult;
@@ -257,12 +259,12 @@ UUIInteractionHelper::handleErrorHandlerRequest(
}
}
- sal_uInt16 nResult = executeErrorDialog(
+ ErrorHandlerFlags nResult = executeErrorDialog(
getParentProperty(), eClassification, aContext, aMessage, nButtonMask );
switch (nResult)
{
- case ERRCODE_BUTTON_OK:
+ case ErrorHandlerFlags::ButtonsOk:
OSL_ENSURE(xApprove.is() || xAbort.is(), "unexpected situation");
if (xApprove.is())
xApprove->select();
@@ -270,29 +272,31 @@ UUIInteractionHelper::handleErrorHandlerRequest(
xAbort->select();
break;
- case ERRCODE_BUTTON_CANCEL:
+ case ErrorHandlerFlags::ButtonsCancel:
OSL_ENSURE(xAbort.is(), "unexpected situation");
if (xAbort.is())
xAbort->select();
break;
- case ERRCODE_BUTTON_RETRY:
+ case ErrorHandlerFlags::ButtonsRetry:
OSL_ENSURE(xRetry.is(), "unexpected situation");
if (xRetry.is())
xRetry->select();
break;
- case ERRCODE_BUTTON_NO:
+ case ErrorHandlerFlags::ButtonsNo:
OSL_ENSURE(xDisapprove.is(), "unexpected situation");
if (xDisapprove.is())
xDisapprove->select();
break;
- case ERRCODE_BUTTON_YES:
+ case ErrorHandlerFlags::ButtonsYes:
OSL_ENSURE(xApprove.is(), "unexpected situation");
if (xApprove.is())
xApprove->select();
break;
+
+ default: break;
}
}