diff options
-rw-r--r-- | framework/source/interaction/quietinteraction.cxx | 2 | ||||
-rw-r--r-- | framework/source/services/desktop.cxx | 2 | ||||
-rw-r--r-- | include/vcl/errcode.hxx | 4 |
3 files changed, 3 insertions, 5 deletions
diff --git a/framework/source/interaction/quietinteraction.cxx b/framework/source/interaction/quietinteraction.cxx index 0d2a7fb2f78d..10d96cd4d708 100644 --- a/framework/source/interaction/quietinteraction.cxx +++ b/framework/source/interaction/quietinteraction.cxx @@ -83,7 +83,7 @@ void SAL_CALL QuietInteraction::handle( const css::uno::Reference< css::task::XI { // warnings can be ignored => approve // errors must break loading => abort - bool bWarning = (aErrorCodeRequest.ErrCode & ERRCODE_WARNING_MASK) == ERRCODE_WARNING_MASK; + bool bWarning = ErrCode(aErrorCodeRequest.ErrCode).IsWarning(); if (xApprove.is() && bWarning) xApprove->select(); else diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index d9427c0f5529..580f42b0caeb 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -1269,7 +1269,7 @@ void SAL_CALL Desktop::handle( const css::uno::Reference< css::task::XInteractio css::task::ErrorCodeRequest aErrorCodeRequest; if( aRequest >>= aErrorCodeRequest ) { - bool bWarning = ((aErrorCodeRequest.ErrCode & ERRCODE_WARNING_MASK) == ERRCODE_WARNING_MASK); + bool bWarning = ErrCode(aErrorCodeRequest.ErrCode).IsWarning(); if (xApprove.is() && bWarning) xApprove->select(); else diff --git a/include/vcl/errcode.hxx b/include/vcl/errcode.hxx index 274a4a00ef03..6b6ffdede306 100644 --- a/include/vcl/errcode.hxx +++ b/include/vcl/errcode.hxx @@ -46,7 +46,6 @@ Warning || || | #define ERRCODE_ERROR_MASK 0x3fffffffUL #define ERRCODE_WARNING_MASK 0x80000000UL -#define ERRCODE_RES_MASK 0x7fff #define ERRCODE_CLASS_SHIFT 8 #define ERRCODE_AREA_SHIFT 13 @@ -54,7 +53,6 @@ Warning || || | #define ERRCODE_CLASS_MASK (31UL << ERRCODE_CLASS_SHIFT) -#define ERRCODE_DYNAMIC_START ( 1UL << ERRCODE_DYNAMIC_SHIFT) #define ERRCODE_DYNAMIC_COUNT 31UL #define ERRCODE_DYNAMIC_MASK (31UL << ERRCODE_DYNAMIC_SHIFT) @@ -127,7 +125,7 @@ public: } constexpr sal_uInt16 GetRest() const { - return m_value & ERRCODE_RES_MASK; + return m_value & 0x7fff; } OUString toHexString() const { |