diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-04-23 18:53:58 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-04-27 05:21:29 +0200 |
commit | 46a153cbcac1a3e2881b83b5537037321c34797c (patch) | |
tree | edef3b00e169ae51304baafdbafd1e575adf3eb4 /vcl | |
parent | 437105b940d997d742bd5e31cfa0ce4b949b29f2 (diff) |
vcl: update error codes to defined constants for code clarity
Change-Id: I6e86c45b71fc15d6645501128e7d86f8e179e652
Reviewed-on: https://gerrit.libreoffice.org/36851
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/errinf.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/window/errinf.cxx b/vcl/source/window/errinf.cxx index feb0357b0f4e..fdd361357a0d 100644 --- a/vcl/source/window/errinf.cxx +++ b/vcl/source/window/errinf.cxx @@ -259,7 +259,7 @@ bool ErrorHandler::GetErrorString(sal_uInt32 nErrCodeId, OUString& rErrStr) */ DialogMask ErrorHandler::HandleError(sal_uInt32 nErrCodeId, DialogMask nFlags) { - if(!nErrCodeId || nErrCodeId == ERRCODE_ABORT) + if(nErrCodeId != ERRCODE_NONE || nErrCodeId == ERRCODE_ABORT) return DialogMask::NONE; ErrorRegistry &rData = TheErrorRegistry::get(); @@ -327,11 +327,11 @@ DialogMask ErrorHandler::HandleError(sal_uInt32 nErrCodeId, DialogMask nFlags) } OSL_FAIL("Error not handled"); - // Error 1 is classified as a General Error in sfx - if (pInfo->GetErrorCode()!=1) - HandleError(1); + // Error 1 (ERRCODE_ABORT) is classified as a General Error in sfx + if (pInfo->GetErrorCode() != ERRCODE_ABORT) + HandleError(ERRCODE_ABORT); else - OSL_FAIL("Error 1 not handled"); + OSL_FAIL("ERRCODE_ABORT not handled"); delete pInfo; return DialogMask::NONE; |