vcl/source/window/errinf.cxx |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 46a153cbcac1a3e2881b83b5537037321c34797c
Author: Chris Sherlock <chris.sherloc...@gmail.com>
Date:   Sun Apr 23 18:53:58 2017 +1000

    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.sherloc...@gmail.com>
    Tested-by: Chris Sherlock <chris.sherloc...@gmail.com>

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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to