basic/source/basmgr/basmgr.cxx                              |    2 
 basic/source/classes/sbintern.cxx                           |    2 
 basic/source/classes/sbxmod.cxx                             |    2 
 basic/source/comp/scanner.cxx                               |    2 
 basic/source/runtime/ddectrl.cxx                            |    6 -
 basic/source/runtime/methods.cxx                            |    2 
 basic/source/runtime/methods1.cxx                           |    8 +-
 basic/source/runtime/runtime.cxx                            |   26 +++---
 cui/source/dialogs/hldocntp.cxx                             |    2 
 cui/source/options/doclinkdialog.cxx                        |    2 
 cui/source/tabpages/tpbitmap.cxx                            |    2 
 dbaccess/source/filter/xml/xmlfilter.cxx                    |   10 +-
 dbaccess/source/ui/dlg/ConnectionHelper.cxx                 |    2 
 editeng/source/items/bulitem.cxx                            |    2 
 extensions/source/dbpilots/commonpagesdbp.cxx               |    2 
 extensions/source/propctrlr/formcomponenthandler.cxx        |    6 -
 filter/source/graphicfilter/ios2met/ios2met.cxx             |   14 +--
 filter/source/msfilter/msdffimp.cxx                         |    8 +-
 filter/source/msfilter/svdfppt.cxx                          |   42 +++++-----
 forms/source/component/clickableimage.cxx                   |    2 
 forms/source/richtext/richtextvclcontrol.cxx                |    2 
 framework/source/fwe/classes/addonsoptions.cxx              |    2 
 framework/source/uielement/imagebuttontoolbarcontroller.cxx |    2 
 include/tools/stream.hxx                                    |    2 
 linguistic/source/convdicxml.cxx                            |    2 
 sc/source/core/tool/autoform.cxx                            |   22 ++---
 sc/source/filter/html/htmlexp.cxx                           |    2 
 sc/source/filter/starcalc/scflt.cxx                         |   48 ++++++------
 sc/source/ui/docshell/tablink.cxx                           |    2 
 sd/source/filter/html/pubdlg.cxx                            |    4 -
 sd/source/filter/ppt/pptatom.cxx                            |    6 -
 sd/source/filter/ppt/pptatom.hxx                            |    2 
 sd/source/filter/ppt/pptin.cxx                              |   14 +--
 sd/source/ui/dlg/navigatr.cxx                               |    2 
 sd/source/ui/view/drviews1.cxx                              |    2 
 sd/source/ui/view/viewshe2.cxx                              |    8 +-
 sfx2/source/bastyp/sfxhtml.cxx                              |    2 
 sfx2/source/doc/graphhelp.cxx                               |    2 
 sfx2/source/view/viewfrm.cxx                                |    2 
 sot/source/sdstor/ucbstorage.cxx                            |   10 +-
 starmath/source/document.cxx                                |    2 
 starmath/source/mathmlexport.cxx                            |    2 
 starmath/source/mathmlimport.cxx                            |    2 
 starmath/source/view.cxx                                    |    4 -
 svtools/source/urlobj/inetimg.cxx                           |    2 
 svx/source/core/graphichelper.cxx                           |    4 -
 svx/source/xml/xmlgrhlp.cxx                                 |   12 +--
 sw/source/core/doc/docbasic.cxx                             |    8 +-
 sw/source/core/doc/tblafmt.cxx                              |   24 +++---
 sw/source/core/swg/SwXMLBlockExport.cxx                     |    2 
 sw/source/filter/ascii/parasc.cxx                           |    2 
 sw/source/filter/ascii/wrtasc.cxx                           |    2 
 sw/source/filter/html/wrthtml.cxx                           |    2 
 sw/source/filter/writer/writer.cxx                          |    2 
 sw/source/filter/ww8/ww8graf2.cxx                           |    2 
 sw/source/filter/ww8/ww8par3.cxx                            |    6 -
 sw/source/filter/ww8/ww8scan.cxx                            |   10 +-
 sw/source/uibase/config/uinums.cxx                          |    2 
 sw/source/uibase/dbui/dbmgr.cxx                             |    4 -
 sw/source/uibase/uiview/srcview.cxx                         |    2 
 sw/source/uibase/uno/unoatxt.cxx                            |    2 
 tools/source/rc/resmgr.cxx                                  |    2 
 uui/source/iahndl-errorhandler.cxx                          |    2 
 vcl/qa/cppunit/graphicfilter/filters-test.cxx               |    2 
 vcl/source/edit/texteng.cxx                                 |    4 -
 vcl/source/gdi/dibtools.cxx                                 |   12 +--
 vcl/source/gdi/impgraph.cxx                                 |    4 -
 vcl/source/gdi/print.cxx                                    |    2 
 vcl/source/gdi/print3.cxx                                   |    2 
 vcl/workben/icontest.cxx                                    |    2 
 70 files changed, 206 insertions(+), 206 deletions(-)

New commits:
commit a6aa57ff591fdf3d834a7e0b1e9e2ebad1d87c5c
Author: Noel Grandin <noel.gran...@collabora.co.uk>
Date:   Wed Jun 14 13:34:55 2017 +0200

    use ERRCODE_NONE instead of 0
    
    peeling off a small chunk of my ErrCode strong_int conversion
    
    Change-Id: Idc89e8496083beed7608cba705cd981139eb7111
    Reviewed-on: https://gerrit.libreoffice.org/38777
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index cd9774b84ff0..e66cf58edf4a 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1542,7 +1542,7 @@ bool BasicManager::HasMacro( OUString const& 
i_fullyQualifiedName ) const
 ErrCode BasicManager::ExecuteMacro( OUString const& i_fullyQualifiedName, 
SbxArray* i_arguments, SbxValue* i_retValue )
 {
     SbMethod* pMethod = lcl_queryMacro( this, i_fullyQualifiedName );
-    ErrCode nError = 0;
+    ErrCode nError = ERRCODE_NONE;
     if ( pMethod )
     {
         if ( i_arguments )
diff --git a/basic/source/classes/sbintern.cxx 
b/basic/source/classes/sbintern.cxx
index 20cbf6f9db6a..371f1daad2b6 100644
--- a/basic/source/classes/sbintern.cxx
+++ b/basic/source/classes/sbintern.cxx
@@ -46,7 +46,7 @@ SbiGlobals::SbiGlobals()
     pMod  = nullptr;
     pCompMod = nullptr; // JSM
     nInst = 0;
-    nCode = 0;
+    nCode = ERRCODE_NONE;
     nLine = 0;
     nCol1 = nCol2 = 0;
     bCompilerError = false;
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 25b45ca3b36f..d77e7dd0f881 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1064,7 +1064,7 @@ void SbModule::Run( SbMethod* pMeth )
 
         // Launcher problem
         // i80726 The Find below will generate an error in Testtool so we 
reset it unless there was one before already
-        bool bWasError = SbxBase::GetError() != 0;
+        bool bWasError = SbxBase::GetError() != ERRCODE_NONE;
         SbxVariable* pMSOMacroRuntimeLibVar = Find( "Launcher", 
SbxClassType::Object );
         if ( !bWasError && (SbxBase::GetError() == ERRCODE_SBX_PROC_UNDEFINED) 
)
             SbxBase::ResetError();
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index f6c87116dc68..c851384a342b 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -376,7 +376,7 @@ bool SbiScanner::NextSym()
         aSym = p; bNumber = true;
 
         // For bad characters, scan and parse errors generate only one error.
-        SbError nError = 0;
+        ErrCode nError = ERRCODE_NONE;
         if (bScanError)
         {
             --pLine;
diff --git a/basic/source/runtime/ddectrl.cxx b/basic/source/runtime/ddectrl.cxx
index c4cd17ec1765..24484b274109 100644
--- a/basic/source/runtime/ddectrl.cxx
+++ b/basic/source/runtime/ddectrl.cxx
@@ -115,7 +115,7 @@ SbError SbiDdeControl::Initiate( const OUString& rService, 
const OUString& rTopi
         aConvList[nChannel-1] = pConv;
         rnHandle = nChannel;
     }
-    return 0;
+    return ERRCODE_NONE;
 }
 
 SbError SbiDdeControl::Terminate( size_t nChannel )
@@ -133,7 +133,7 @@ SbError SbiDdeControl::Terminate( size_t nChannel )
     delete pConv;
     aConvList[nChannel-1] = DDE_FREECHANNEL;
 
-    return 0;
+    return ERRCODE_NONE;
 }
 
 SbError SbiDdeControl::TerminateAll()
@@ -148,7 +148,7 @@ SbError SbiDdeControl::TerminateAll()
 
     aConvList.clear();
 
-    return 0;
+    return ERRCODE_NONE;
 }
 
 SbError SbiDdeControl::Request( size_t nChannel, const OUString& rItem, 
OUString& rResult )
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 92a50b638935..396ae9e8fc26 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -206,7 +206,7 @@ RTLFUNC(Error)
     else
     {
         OUString aErrorMsg;
-        SbError nErr = 0;
+        SbError nErr = ERRCODE_NONE;
         sal_Int32 nCode = 0;
         if( rPar.Count() == 1 )
         {
diff --git a/basic/source/runtime/methods1.cxx 
b/basic/source/runtime/methods1.cxx
index 021e7f21b950..965379d7a49f 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -1080,7 +1080,7 @@ static bool lcl_WriteSbxVariable( const SbxVariable& 
rVar, SvStream* pStrm,
     {
         pStrm->Seek( nFPos + nBlockLen );
     }
-    return pStrm->GetErrorCode() == 0;
+    return pStrm->GetErrorCode() == ERRCODE_NONE;
 }
 
 static bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm,
@@ -1191,7 +1191,7 @@ static bool lcl_ReadSbxVariable( SbxVariable& rVar, 
SvStream* pStrm,
     {
         pStrm->Seek( nFPos + nBlockLen );
     }
-    return pStrm->GetErrorCode() == 0;
+    return pStrm->GetErrorCode() == ERRCODE_NONE;
 }
 
 
@@ -2283,7 +2283,7 @@ RTLFUNC(DateDiff)
 double implGetDateOfFirstDayInFirstWeek
     ( sal_Int16 nYear, sal_Int16& nFirstDay, sal_Int16& nFirstWeek, bool* 
pbError = nullptr )
 {
-    SbError nError = 0;
+    SbError nError = ERRCODE_NONE;
     if( nFirstDay < 0 || nFirstDay > 7 )
         nError = ERRCODE_BASIC_BAD_ARGUMENT;
 
@@ -2298,7 +2298,7 @@ double implGetDateOfFirstDayInFirstWeek
             nError = ERRCODE_BASIC_BAD_ARGUMENT;
     }
 
-    if( nError != 0 )
+    if( nError != ERRCODE_NONE )
     {
         StarBASIC::Error( nError );
         if( pbError )
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 7b8761cc750f..5054c9bf9f6a 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -585,7 +585,7 @@ SbiRuntime::SbiRuntime( SbModule* pm, SbMethod* pe, 
sal_uInt32 nStart )
     nCol2     = 0;
     nExprLvl  = 0;
     nArgc     = 0;
-    nError    = 0;
+    nError    = ERRCODE_NONE;
     nForLvl   = 0;
     nOps      = 0;
     refExprStk = new SbxArray;
@@ -792,7 +792,7 @@ bool SbiRuntime::Step()
         {
             SbError err = nError;
             ClearExprStack();
-            nError = 0;
+            nError = ERRCODE_NONE;
             pInst->nErr = err;
             pInst->nErl = nLine;
             pErrCode    = pCode;
@@ -2408,7 +2408,7 @@ void SbiRuntime::StepINPUT()
     char ch = 0;
     SbError err;
     // Skip whitespace
-    while( ( err = pIosys->GetError() ) == 0 )
+    while( ( err = pIosys->GetError() ) == ERRCODE_NONE )
     {
         ch = pIosys->Read();
         if( ch != ' ' && ch != '\t' && ch != '\n' )
@@ -2424,7 +2424,7 @@ void SbiRuntime::StepINPUT()
         {
             ch = pIosys->Read();
         }
-        while( ( err = pIosys->GetError() ) == 0 )
+        while( ( err = pIosys->GetError() ) == ERRCODE_NONE )
         {
             if( ch == sep )
             {
@@ -2444,7 +2444,7 @@ void SbiRuntime::StepINPUT()
         // skip whitespace
         if( ch == ' ' || ch == '\t' )
         {
-            while( ( err = pIosys->GetError() ) == 0 )
+            while( ( err = pIosys->GetError() ) == ERRCODE_NONE )
             {
                 if( ch != ' ' && ch != '\t' && ch != '\n' )
                 {
@@ -2588,18 +2588,18 @@ void SbiRuntime::StepSTDERROR()
 {
     pError = nullptr; bError = true;
     pInst->aErrorMsg.clear();
-    pInst->nErr = 0;
+    pInst->nErr = ERRCODE_NONE;
     pInst->nErl = 0;
-    nError = 0;
+    nError = ERRCODE_NONE;
     SbxErrObject::getUnoErrObject()->Clear();
 }
 
 void SbiRuntime::StepNOERROR()
 {
     pInst->aErrorMsg.clear();
-    pInst->nErr = 0;
+    pInst->nErr = ERRCODE_NONE;
     pInst->nErl = 0;
-    nError = 0;
+    nError = ERRCODE_NONE;
     SbxErrObject::getUnoErrObject()->Clear();
     bError = false;
 }
@@ -3081,9 +3081,9 @@ void SbiRuntime::StepERRHDL( sal_uInt32 nOp1 )
     pError = pCode;
     pCode = p;
     pInst->aErrorMsg.clear();
-    pInst->nErr = 0;
+    pInst->nErr = ERRCODE_NONE;
     pInst->nErl = 0;
-    nError = 0;
+    nError = ERRCODE_NONE;
     SbxErrObject::getUnoErrObject()->Clear();
 }
 
@@ -3111,9 +3111,9 @@ void SbiRuntime::StepRESUME( sal_uInt32 nOp1 )
     if( nOp1 > 1 )
         StepJUMP( nOp1 );
     pInst->aErrorMsg.clear();
-    pInst->nErr = 0;
+    pInst->nErr = ERRCODE_NONE;
     pInst->nErl = 0;
-    nError = 0;
+    nError = ERRCODE_NONE;
     bInError = false;
 }
 
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 4be3c5269964..269aca763ae1 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -317,7 +317,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
             {
                 SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( 
aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ );
 
-                bool bOk = pIStm && ( pIStm->GetError() == 0);
+                bool bOk = pIStm && ( pIStm->GetError() == ERRCODE_NONE);
 
                 delete pIStm;
 
diff --git a/cui/source/options/doclinkdialog.cxx 
b/cui/source/options/doclinkdialog.cxx
index 4cd538b28ee7..eacfc0319f80 100644
--- a/cui/source/options/doclinkdialog.cxx
+++ b/cui/source/options/doclinkdialog.cxx
@@ -178,7 +178,7 @@ namespace svx
             aFileDlg.SetDisplayDirectory( aTransformer.get( 
OFileNotation::N_URL ) );
         }
 
-        if (0 != aFileDlg.Execute())
+        if (ERRCODE_NONE != aFileDlg.Execute())
             return;
 
         if (m_pName->GetText().isEmpty())
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 3fbf0d3357c6..3151ddc8b076 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -796,7 +796,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, Button*, 
void)
                         bDifferent = false;
 
                 if( bDifferent ) {
-                    nError = 0;
+                    nError = ERRCODE_NONE;
                     break;
                 }
 
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx 
b/dbaccess/source/filter/xml/xmlfilter.cxx
index d84704722eee..5b2e76546b03 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -133,7 +133,7 @@ sal_Int32 ReadThroughComponent(
     }
 
     // success!
-    return 0;
+    return ERRCODE_NONE;
 }
 
 
@@ -165,12 +165,12 @@ sal_Int32 ReadThroughComponent(
 
                 // do we even have an alternative name?
                 if ( nullptr == pCompatibilityStreamName )
-                    return 0;
+                    return ERRCODE_NONE;
 
                 // if so, does the stream exist?
                 sStreamName = 
OUString::createFromAscii(pCompatibilityStreamName);
                 if ( !xStorage->hasByName( sStreamName ) || 
!xStorage->isStreamElement( sStreamName ) )
-                    return 0;
+                    return ERRCODE_NONE;
             }
 
             // get input stream
@@ -340,7 +340,7 @@ bool ODBFilter::implImport( const Sequence< PropertyValue 
>& rDescriptor )
                                     ,this
                                     );
 
-        if ( nRet == 0 )
+        if ( nRet == ERRCODE_NONE )
             nRet = ReadThroughComponent( xStorage
                                     ,xModel
                                     ,"content.xml"
@@ -349,7 +349,7 @@ bool ODBFilter::implImport( const Sequence< PropertyValue 
>& rDescriptor )
                                     ,this
                                     );
 
-        bRet = nRet == 0;
+        bRet = nRet == ERRCODE_NONE;
 
         if ( bRet )
         {
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx 
b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 090f0cb8e287..6be976f1b402 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -706,7 +706,7 @@ namespace dbaui
             _aFileOpen.SetDisplayDirectory(sOldPath);
         else
             _aFileOpen.SetDisplayDirectory( SvtPathOptions().GetWorkPath() );
-        if (0 == _aFileOpen.Execute())
+        if (ERRCODE_NONE == _aFileOpen.Execute())
         {
             setURLNoPrefix(_aFileOpen.GetPath());
             SetRoadmapStateValue(checkTestConnection());
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index c90634daf52f..a8c9110e0b39 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -119,7 +119,7 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 
_nWhich )
         sal_uInt64 const nOldPos = rStrm.Tell();
         // Ignore Errorcode when reading Bitmap,
         // see comment in SvxBulletItem::Store()
-        bool bOldError = rStrm.GetError() != 0;
+        bool bOldError = rStrm.GetError() != ERRCODE_NONE;
         ReadDIB(aBmp, rStrm, true);
 
         if ( !bOldError && rStrm.GetError() )
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx 
b/extensions/source/dbpilots/commonpagesdbp.cxx
index dd6cdb007dda..af958da2dc3d 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -215,7 +215,7 @@ namespace dbp
             
aFileDlg.AddFilter(pFilter->GetUIName(),pFilter->GetDefaultExtension());
         }
 
-        if (0 == aFileDlg.Execute())
+        if (ERRCODE_NONE == aFileDlg.Execute())
         {
             OUString sDataSourceName = aFileDlg.GetPath();
             ::svt::OFileNotation aFileNotation(sDataSourceName);
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx 
b/extensions/source/propctrlr/formcomponenthandler.cxx
index c9dd53ef38a8..4537548b8a36 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2772,7 +2772,7 @@ namespace pcr
         }
 
         _rClearBeforeDialog.clear();
-        bool bSuccess = ( 0 == aFileDlg.Execute() );
+        bool bSuccess = ( ERRCODE_NONE == aFileDlg.Execute() );
         if ( bSuccess )
         {
             if ( bHandleNonLink && xController.is() )
@@ -2812,7 +2812,7 @@ namespace pcr
             aFileDlg.SetDisplayDirectory( sURL );
 
         _rClearBeforeDialog.clear();
-        bool bSuccess = ( 0 == aFileDlg.Execute() );
+        bool bSuccess = ( ERRCODE_NONE == aFileDlg.Execute() );
         if ( bSuccess )
             _out_rNewValue <<= aFileDlg.GetPath();
         return bSuccess;
@@ -2875,7 +2875,7 @@ namespace pcr
         }
 
         _rClearBeforeDialog.clear();
-        bool bSuccess = ( 0 == aFileDlg.Execute() );
+        bool bSuccess = ( ERRCODE_NONE == aFileDlg.Execute() );
         if ( bSuccess )
             _out_rNewValue <<= aFileDlg.GetPath();
         return bSuccess;
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx 
b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 052ab9b877fc..369de5eca38a 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -2343,7 +2343,7 @@ void OS2METReader::ReadFont(sal_uInt16 nFieldSize)
     nPos=pOS2MET->Tell();
     nMaxPos=nPos+(sal_uLong)nFieldSize;
     pOS2MET->SeekRel(2); nPos+=2;
-    while (nPos<nMaxPos && pOS2MET->GetError()==0) {
+    while (nPos<nMaxPos && pOS2MET->GetError()==ERRCODE_NONE) {
         pOS2MET->ReadUChar( nByte );
         sal_uInt16 nLen = ((sal_uInt16)nByte) & 0x00ff;
         if (nLen == 0)
@@ -2431,7 +2431,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, 
sal_uInt16 nFieldSize)
             nPos=pOS2MET->Tell();
             nMaxPos=nPos+(sal_uLong)nFieldSize;
             pOS2MET->SeekRel(3); nPos+=3;
-            while (nPos<nMaxPos && pOS2MET->GetError()==0) {
+            while (nPos<nMaxPos && pOS2MET->GetError()==ERRCODE_NONE) {
                 pOS2MET->ReadUChar( nbyte ); nElemLen=((sal_uInt16)nbyte) & 
0x00ff;
                 if (nElemLen>11) {
                     pOS2MET->SeekRel(4);
@@ -2486,7 +2486,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, 
sal_uInt16 nFieldSize)
         case EndImgObjMagic: {
             // read temporary Windows BMP file:
             if (pBitmapList==nullptr || pBitmapList->pBMP==nullptr ||
-                pBitmapList->pBMP->GetError()!=0) {
+                pBitmapList->pBMP->GetError()!=ERRCODE_NONE) {
                 pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
                 ErrorCode=5;
                 return;
@@ -2495,7 +2495,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, 
sal_uInt16 nFieldSize)
 
             ReadDIB(pBitmapList->aBitmap, *(pBitmapList->pBMP), false);
 
-            if (pBitmapList->pBMP->GetError()!=0) {
+            if (pBitmapList->pBMP->GetError()!=ERRCODE_NONE) {
                 pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
                 ErrorCode=6;
             }
@@ -2518,7 +2518,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, 
sal_uInt16 nFieldSize)
 
             nPos=pOS2MET->Tell();
             nMaxPos=nPos+(sal_uLong)nFieldSize;
-            while (nPos<nMaxPos && pOS2MET->GetError()==0) {
+            while (nPos<nMaxPos && pOS2MET->GetError()==ERRCODE_NONE) {
                 pOS2MET->ReadUChar( nbyte ); 
nDataID=((sal_uInt16)nbyte)&0x00ff;
                 if (nDataID==0x00fe) {
                     pOS2MET->ReadUChar( nbyte );
@@ -2570,7 +2570,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, 
sal_uInt16 nFieldSize)
             else pOS2MET->SeekRel(-1); // no header, go back one byte
 
             // loop through Order:
-            while (pOS2MET->Tell()<nMaxPos && pOS2MET->GetError()==0) {
+            while (pOS2MET->Tell()<nMaxPos && 
pOS2MET->GetError()==ERRCODE_NONE) {
                 pOS2MET->ReadUChar( nbyte ); nOrderID=((sal_uInt16)nbyte) & 
0x00ff;
                 if (nOrderID==0x00fe) {
                     pOS2MET->ReadUChar( nbyte );
@@ -2614,7 +2614,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, 
sal_uInt16 nFieldSize)
             sal_uInt8 nbyte;
 
             nMaxPos=pOS2MET->Tell()+(sal_uLong)nFieldSize;
-            while (pOS2MET->Tell()<nMaxPos && pOS2MET->GetError()==0) {
+            while (pOS2MET->Tell()<nMaxPos && 
pOS2MET->GetError()==ERRCODE_NONE) {
                 pOS2MET->ReadUChar( nbyte ); nDscID =((sal_uInt16)nbyte) & 
0x00ff;
                 pOS2MET->ReadUChar( nbyte ); nDscLen=((sal_uInt16)nbyte) & 
0x00ff;
                 nPos=pOS2MET->Tell();
diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index 87b9cd539e73..f4dca1e4c2e7 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3809,7 +3809,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, 
SfxItemSet& rSet, cons
                     if (nSkip <= aHd.nRecLen)
                     {
                         rSt.SeekRel(nSkip);
-                        if (0 == rSt.GetError())
+                        if (ERRCODE_NONE == rSt.GetError())
                             bGrfRead = GetBLIPDirect( rSt, aGraf, &aVisArea );
                     }
                 }
@@ -4849,7 +4849,7 @@ tools::Rectangle SvxMSDffManager::GetGlobalChildAnchor( 
const DffRecordHeader& r
         return aChildAnchor;
 
     bool bIsClientRectRead = false;
-    while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < rHd.GetRecEndFilePos() ) 
)
+    while ( ( rSt.GetError() == ERRCODE_NONE ) && ( rSt.Tell() < 
rHd.GetRecEndFilePos() ) )
     {
         DffRecordHeader aShapeHd;
         if (!ReadDffRecordHeader(rSt, aShapeHd))
@@ -5851,7 +5851,7 @@ void SvxMSDffManager::GetCtrlData(sal_uInt32 nOffsDggL)
             nPos += DFF_COMMON_RECORD_HEADER_SIZE + nLength;
             ++nDrawingContainerId;
         }
-        while( ( rStCtrl.GetError() == 0 ) && ( nPos < nMaxStrPos ) && bOk );
+        while( ( rStCtrl.GetError() == ERRCODE_NONE ) && ( nPos < nMaxStrPos ) 
&& bOk );
     }
 }
 
@@ -5908,7 +5908,7 @@ void SvxMSDffManager::GetDrawingGroupContainerData( 
SvStream& rSt, sal_uLong nLe
                 rSt.ReadUInt32( nBLIPLen );
                 rSt.SeekRel( nSkipBLIPPos );
                 rSt.ReadUInt32( nBLIPPos );
-                bOk = rSt.GetError() == 0;
+                bOk = rSt.GetError() == ERRCODE_NONE;
 
                 nLength -= nSkipBLIPLen+ 4 + nSkipBLIPPos + 4;
             }
diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 14e035a1076a..ea909435fbc0 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -750,7 +750,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, 
DffObjData& rObjData, voi
             sal_Int16 nHeaderFooterInstance = -1;
             DffRecordHeader aClientDataHd;
             auto nEndRecPos = SanitizeEndPos(rSt, 
maShapeRecords.Current()->GetRecEndFilePos());
-            while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < nEndRecPos ) )
+            while ( ( rSt.GetError() == ERRCODE_NONE ) && ( rSt.Tell() < 
nEndRecPos ) )
             {
                 ReadDffRecordHeader( rSt, aClientDataHd );
                 switch ( aClientDataHd.nRecType )
@@ -1344,7 +1344,7 @@ SdrPowerPointImport::SdrPowerPointImport( 
PowerPointImportParam& rParam, const O
                 bOk = false;
         }
     }
-    if ( rStCtrl.GetError() != 0 )
+    if ( rStCtrl.GetError() != ERRCODE_NONE )
         bOk = false;
 
     if ( bOk )
@@ -1415,7 +1415,7 @@ SdrPowerPointImport::SdrPowerPointImport( 
PowerPointImportParam& rParam, const O
             }
         }
     }
-    if ( rStCtrl.GetError() != 0 )
+    if ( rStCtrl.GetError() != ERRCODE_NONE )
         bOk = false;
     if ( bOk )
     {   // check Document PersistEntry
@@ -1639,7 +1639,7 @@ SdrPowerPointImport::SdrPowerPointImport( 
PowerPointImportParam& rParam, const O
             }
         }
     }
-    if ( ( rStCtrl.GetError() != 0 ) || ( pDefaultSheet == nullptr ) )
+    if ( ( rStCtrl.GetError() != ERRCODE_NONE ) || ( pDefaultSheet == nullptr 
) )
         bOk = false;
     pPPTStyleSheet = pDefaultSheet;
     rStCtrl.Seek( 0 );
@@ -1793,7 +1793,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( sal_uInt32 
nOLEId,
         DffRecordHeader aPlaceHd;
 
         auto nEndRecPos = SanitizeEndPos(rStCtrl, 
const_cast<SdrPowerPointImport*>(this)->maShapeRecords.Current()->GetRecEndFilePos());
-        while ( ( rStCtrl.GetError() == 0 )
+        while ( ( rStCtrl.GetError() == ERRCODE_NONE )
             && ( rStCtrl.Tell() < nEndRecPos ) )
         {
             ReadDffRecordHeader( rStCtrl, aPlaceHd );
@@ -2667,7 +2667,7 @@ void ImportComment10( SvxMSDffManager& rMan, SvStream& 
rStCtrl, SdrPage* pPage,
 
 
     auto nEndRecPos = DffPropSet::SanitizeEndPos(rStCtrl, 
rComment10Hd.GetRecEndFilePos());
-    while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < nEndRecPos ) )
+    while ( ( rStCtrl.GetError() == ERRCODE_NONE ) && ( rStCtrl.Tell() < 
nEndRecPos ) )
     {
         DffRecordHeader aCommentHd;
         ReadDffRecordHeader( rStCtrl, aCommentHd );
@@ -2744,7 +2744,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, 
const PptSlidePersistEntry*
         rSlidePersist.pHeaderFooterEntry = new HeaderFooterEntry( 
pMasterPersist );
         ProcessData aProcessData( rSlidePersist, SdPageCapsule(pRet) );
         auto nEndRecPos = SanitizeEndPos(rStCtrl, aPageHd.GetRecEndFilePos());
-        while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < nEndRecPos ) 
)
+        while ( ( rStCtrl.GetError() == ERRCODE_NONE ) && ( rStCtrl.Tell() < 
nEndRecPos ) )
         {
             DffRecordHeader aHd;
             ReadDffRecordHeader( rStCtrl, aHd );
@@ -2762,7 +2762,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, 
const PptSlidePersistEntry*
                     if ( SeekToContentOfProgTag( 10, rStCtrl, aHd, 
aContentDataHd ) )
                     {
                         DffRecordHeader aComment10Hd;
-                        while( ( rStCtrl.GetError() == 0 ) && SeekToRec( 
rStCtrl, PPT_PST_Comment10, aContentDataHd.GetRecEndFilePos(), &aComment10Hd ) )
+                        while( ( rStCtrl.GetError() == ERRCODE_NONE ) && 
SeekToRec( rStCtrl, PPT_PST_Comment10, aContentDataHd.GetRecEndFilePos(), 
&aComment10Hd ) )
                         {
                             ImportComment10( *this, rStCtrl, pRet, 
aComment10Hd );
                             if (!aComment10Hd.SeekToEndOfRecord(rStCtrl))
@@ -2781,7 +2781,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, 
const PptSlidePersistEntry*
 
                         // importing the background object before importing 
the page
                         auto nPPEndRecPos = SanitizeEndPos(rStCtrl, 
aPPDrawHd.GetRecEndFilePos());
-                        while ( ( rStCtrl.GetError() == 0 ) && ( 
rStCtrl.Tell() < nPPEndRecPos ) )
+                        while ( ( rStCtrl.GetError() == ERRCODE_NONE ) && ( 
rStCtrl.Tell() < nPPEndRecPos ) )
                         {
                             DffRecordHeader aEscherObjListHd;
                             ReadDffRecordHeader( rStCtrl, aEscherObjListHd );
@@ -2851,7 +2851,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, 
const PptSlidePersistEntry*
                         // now importing page
                         rStCtrl.Seek( nPPDrawOfs );
                         auto nHdEndRecPos = SanitizeEndPos(rStCtrl, 
aPPDrawHd.GetRecEndFilePos());
-                        while ( ( rStCtrl.GetError() == 0 ) && ( 
rStCtrl.Tell() < nHdEndRecPos ) )
+                        while ( ( rStCtrl.GetError() == ERRCODE_NONE ) && ( 
rStCtrl.Tell() < nHdEndRecPos ) )
                         {
                             DffRecordHeader aEscherObjListHd;
                             ReadDffRecordHeader( rStCtrl, aEscherObjListHd );
@@ -2864,7 +2864,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, 
const PptSlidePersistEntry*
                                     {
                                         aShapeHd.SeekToEndOfRecord( rStCtrl );
                                         auto nListEndRecPos = 
SanitizeEndPos(rStCtrl, aEscherObjListHd.GetRecEndFilePos());
-                                        while ( ( rStCtrl.GetError() == 0 ) && 
( rStCtrl.Tell() < nListEndRecPos ) )
+                                        while ( ( rStCtrl.GetError() == 
ERRCODE_NONE ) && ( rStCtrl.Tell() < nListEndRecPos ) )
                                         {
                                             ReadDffRecordHeader( rStCtrl, 
aShapeHd );
                                             if ( ( aShapeHd.nRecType == 
DFF_msofbtSpContainer ) || ( aShapeHd.nRecType == DFF_msofbtSpgrContainer ) )
@@ -3129,7 +3129,7 @@ void SdrEscherImport::ImportHeaderFooterContainer( 
DffRecordHeader& rHd, HeaderF
 {
     rHd.SeekToContent( rStCtrl );
     auto nEndRecPos = SanitizeEndPos(rStCtrl, rHd.GetRecEndFilePos());
-    while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < nEndRecPos ) )
+    while ( ( rStCtrl.GetError() == ERRCODE_NONE ) && ( rStCtrl.Tell() < 
nEndRecPos ) )
     {
         DffRecordHeader aHd;
         ReadDffRecordHeader( rStCtrl, aHd );
@@ -3231,7 +3231,7 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& 
rMan, SvStream& rSt, const
     if ( pListHd && SdrPowerPointImport::SeekToContentOfProgTag( 9, rSt, 
*pListHd, aContentDataHd ) )
     {
         auto nEndRecPos = DffPropSet::SanitizeEndPos(rSt, 
aContentDataHd.GetRecEndFilePos());
-        while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < nEndRecPos ) )
+        while ( ( rSt.GetError() == ERRCODE_NONE ) && ( rSt.Tell() < 
nEndRecPos ) )
         {
             ReadDffRecordHeader( rSt, aHd );
             switch ( aHd.nRecType )
@@ -3239,7 +3239,7 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& 
rMan, SvStream& rSt, const
                 case PPT_PST_ExtendedBuGraContainer :
                 {
                     auto nHdEndRecPos = DffPropSet::SanitizeEndPos(rSt, 
aHd.GetRecEndFilePos());
-                    while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < 
nHdEndRecPos ) )
+                    while ( ( rSt.GetError() == ERRCODE_NONE ) && ( rSt.Tell() 
< nHdEndRecPos ) )
                     {
                         sal_uInt16 nType;
                         DffRecordHeader aBuGraAtomHd;
@@ -3314,7 +3314,7 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& 
rMan, SvStream& rSt, const
     if ( pHd && SdrPowerPointImport::SeekToContentOfProgTag( 9, rSt, *pHd, 
aContentDataHd ) )
     {   // get the extended paragraph styles on mainmaster ( graphical 
bullets, num ruling ... )
         auto nEndRecPos = DffPropSet::SanitizeEndPos(rSt, 
aContentDataHd.GetRecEndFilePos());
-        while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < nEndRecPos ) )
+        while ( ( rSt.GetError() == ERRCODE_NONE ) && ( rSt.Tell() < 
nEndRecPos ) )
         {
             ReadDffRecordHeader( rSt, aHd );
             switch ( aHd.nRecType )
@@ -3328,7 +3328,7 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& 
rMan, SvStream& rSt, const
                         if ( i <= 5 )
                         {
                             auto nHdEndRecPos = 
DffPropSet::SanitizeEndPos(rSt, aHd.GetRecEndFilePos());
-                            while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < 
nHdEndRecPos ) && ( i < nDepth ) )
+                            while ( ( rSt.GetError() == ERRCODE_NONE ) && ( 
rSt.Tell() < nHdEndRecPos ) && ( i < nDepth ) )
                             {
                                 bStyles = true;
                                 ReadPPTExtParaLevel( rSt, aExtParaSheet[ 
(TSS_Type)aHd.nRecInstance ].aExtParaLevel[ i++ ] );
@@ -4105,7 +4105,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& 
rSlideHd, SvStream& rIn, Sd
                 bool bFirst = true;
                 bFoundTxMasterStyleAtom04 = true;
                 auto nTxEndRecPos = DffPropSet::SanitizeEndPos(rIn, 
aTxMasterStyleHd.GetRecEndFilePos());
-                while (rIn.GetError() == 0 && rIn.Tell() < nTxEndRecPos && 
nLev < nLevelAnz && nLev < nMaxPPTLevels)
+                while (rIn.GetError() == ERRCODE_NONE && rIn.Tell() < 
nTxEndRecPos && nLev < nLevelAnz && nLev < nMaxPPTLevels)
                 {
                     if ( nLev )
                     {
@@ -4210,7 +4210,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& 
rSlideHd, SvStream& rIn, Sd
             bool    bFirst = true;
 
             auto nTxEndRecPos = DffPropSet::SanitizeEndPos(rIn, 
aTxMasterStyleHd.GetRecEndFilePos());
-            while ( rIn.GetError() == 0 && rIn.Tell() < nTxEndRecPos && nLev < 
nLevelAnz )
+            while ( rIn.GetError() == ERRCODE_NONE && rIn.Tell() < 
nTxEndRecPos && nLev < nLevelAnz )
             {
                 if ( nLev && ( nInstance < TSS_Type::Subtitle ) )
                 {
@@ -4235,7 +4235,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& 
rSlideHd, SvStream& rIn, Sd
 #ifdef DBG_UTIL
             if (!(rManager.rImportParam.nImportFlags & 
PPT_IMPORTFLAGS_NO_TEXT_ASSERT))
             {
-                if ( rIn.GetError() == 0 )
+                if ( rIn.GetError() == ERRCODE_NONE )
                 {
                     OStringBuffer aMsg;
                     if ( rIn.Tell() > aTxMasterStyleHd.GetRecEndFilePos() )
@@ -4302,7 +4302,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& 
rSlideHd, SvStream& rIn, Sd
                     sal_uInt16 nLev = 0;
                     bool bFirst = true;
                     auto nTxEndRecPos = DffPropSet::SanitizeEndPos(rIn, 
aTxMasterStyleHd2.GetRecEndFilePos());
-                    while ( rIn.GetError() == 0 && rIn.Tell() < nTxEndRecPos 
&& nLev < nLevelAnz )
+                    while ( rIn.GetError() == ERRCODE_NONE && rIn.Tell() < 
nTxEndRecPos && nLev < nLevelAnz )
                     {
                         if ( nLev )
                         {
@@ -5201,7 +5201,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, const 
DffRecordHeader& rTextHe
         rIn.Seek( rExtParaHd.nFilePos + 8 );
 
         auto nEndRecPos = DffPropSet::SanitizeEndPos(rIn, 
rExtParaHd.GetRecEndFilePos());
-        while( ( rIn.GetError() == 0 ) && ( rIn.Tell() < nEndRecPos ) )
+        while( ( rIn.GetError() == ERRCODE_NONE ) && ( rIn.Tell() < nEndRecPos 
) )
         {
             aStyleTextProp9.resize( aStyleTextProp9.size() + 1 );
             aStyleTextProp9.back().Read( rIn );
diff --git a/forms/source/component/clickableimage.cxx 
b/forms/source/component/clickableimage.cxx
index 34532966f624..3590d2e3c747 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -679,7 +679,7 @@ namespace frm
             m_bDownloading = false;
             return;
         }
-        if (m_pMedium->GetErrorCode()==0)
+        if (m_pMedium->GetErrorCode()==ERRCODE_NONE)
         {
             SvStream* pStream = m_pMedium->GetInStream();
 
diff --git a/forms/source/richtext/richtextvclcontrol.cxx 
b/forms/source/richtext/richtextvclcontrol.cxx
index a4abd539646f..61827518793b 100644
--- a/forms/source/richtext/richtextvclcontrol.cxx
+++ b/forms/source/richtext/richtextvclcontrol.cxx
@@ -244,7 +244,7 @@ namespace frm
                             OUString::createFromAscii( 
aExportFormat.pExtension ) );
                     }
                     ErrCode nResult = aFP.Execute();
-                    if ( nResult == 0 )
+                    if ( nResult == ERRCODE_NONE )
                     {
                         OUString sFileName = aFP.GetPath();
                         SvStream* pStream = 
::utl::UcbStreamHelper::CreateStream(
diff --git a/framework/source/fwe/classes/addonsoptions.cxx 
b/framework/source/fwe/classes/addonsoptions.cxx
index d1fdd111e595..3e9bf8a23a07 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -1273,7 +1273,7 @@ Image AddonsOptions_Impl::ReadImageFromURL(const 
OUString& aImageURL)
     Image aImage;
 
     SvStream* pStream = UcbStreamHelper::CreateStream( aImageURL, 
StreamMode::STD_READ );
-    if ( pStream && ( pStream->GetErrorCode() == 0 ))
+    if ( pStream && ( pStream->GetErrorCode() == ERRCODE_NONE ))
     {
         // Use graphic class to also support more graphic formats (bmp,png,...)
         Graphic aGraphic;
diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx 
b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
index dc0fe07af16a..fcc1e38654b3 100644
--- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
@@ -123,7 +123,7 @@ void ImageButtonToolbarController::executeControlCommand( 
const css::frame::Cont
 bool ImageButtonToolbarController::ReadImageFromURL( bool bBigImage, const 
OUString& aImageURL, Image& aImage )
 {
     std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream( 
aImageURL, StreamMode::STD_READ ));
-    if ( pStream && ( pStream->GetErrorCode() == 0 ))
+    if ( pStream && ( pStream->GetErrorCode() == ERRCODE_NONE ))
     {
         // Use graphic class to also support more graphic formats (bmp,png,...)
         Graphic aGraphic;
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 0bc3766807fa..4b7765dc09d0 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -397,7 +397,7 @@ public:
     bool eof() const { return m_isEof; }
 
     /// stream is broken
-    bool bad() const { return GetError() != 0; }
+    bool bad() const { return GetError() != ERRCODE_NONE; }
 
     /** Get state
 
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index 49c8565d3ff3..c25dc9686d8f 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -324,7 +324,7 @@ sal_uInt32 ConvDicXMLExport::exportDoc( enum 
::xmloff::token::XMLTokenEnum /*eCl
     GetDocHandler()->endDocument();
 
     bSuccess = true;
-    return 0;
+    return ERRCODE_NONE;
 }
 
 
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 3940631fd176..889af745e706 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -374,7 +374,7 @@ bool ScAutoFormatDataField::Load( SvStream& rStream, const 
ScAfVersions& rVersio
     aStacked.SetValue( aOrientation.IsStacked() );
     aRotateAngle.SetValue( aOrientation.GetRotation( aRotateAngle.GetValue() ) 
);
 
-    return (rStream.GetError() == 0);
+    return (rStream.GetError() == ERRCODE_NONE);
 }
 
 bool ScAutoFormatDataField::Save( SvStream& rStream, sal_uInt16 fileVersion )
@@ -426,7 +426,7 @@ bool ScAutoFormatDataField::Save( SvStream& rStream, 
sal_uInt16 fileVersion )
     // --- from 680/dr25 on: store strings as UTF-8
     aNumFormat.Save( rStream, RTL_TEXTENCODING_UTF8 );
 
-    return (rStream.GetError() == 0);
+    return (rStream.GetError() == ERRCODE_NONE);
 }
 
 ScAutoFormatData::ScAutoFormatData()
@@ -753,7 +753,7 @@ bool ScAutoFormatData::Load( SvStream& rStream, const 
ScAfVersions& rVersions )
 {
     sal_uInt16  nVer = 0;
     rStream.ReadUInt16( nVer );
-    bool bRet = 0 == rStream.GetError();
+    bool bRet = ERRCODE_NONE == rStream.GetError();
     if( bRet && (nVer == AUTOFORMAT_DATA_ID_X ||
             (AUTOFORMAT_DATA_ID_504 <= nVer && nVer <= AUTOFORMAT_DATA_ID)) )
     {
@@ -790,7 +790,7 @@ bool ScAutoFormatData::Load( SvStream& rStream, const 
ScAfVersions& rVersions )
         if (nVer >= AUTOFORMAT_DATA_ID_31005)
             rStream >> m_swFields;
 
-        bRet = 0 == rStream.GetError();
+        bRet = ERRCODE_NONE == rStream.GetError();
         for( sal_uInt16 i = 0; bRet && i < 16; ++i )
             bRet = GetField( i ).Load( rStream, rVersions, nVer );
     }
@@ -817,7 +817,7 @@ bool ScAutoFormatData::Save(SvStream& rStream, sal_uInt16 
fileVersion)
     if (fileVersion >= SOFFICE_FILEFORMAT_50)
         WriteAutoFormatSwBlob( rStream, m_swFields );
 
-    bool bRet = 0 == rStream.GetError();
+    bool bRet = ERRCODE_NONE == rStream.GetError();
     for (sal_uInt16 i = 0; bRet && (i < 16); i++)
         bRet = GetField( i ).Save( rStream, fileVersion );
 
@@ -1007,14 +1007,14 @@ void ScAutoFormat::Load()
 
     SfxMedium aMedium( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), 
StreamMode::READ );
     SvStream* pStream = aMedium.GetInStream();
-    bool bRet = (pStream && pStream->GetError() == 0);
+    bool bRet = (pStream && pStream->GetError() == ERRCODE_NONE);
     if (bRet)
     {
         SvStream& rStream = *pStream;
         // Attention: A common header has to be read
         sal_uInt16 nVal = 0;
         rStream.ReadUInt16( nVal );
-        bRet = 0 == rStream.GetError();
+        bRet = ERRCODE_NONE == rStream.GetError();
 
         if (bRet)
         {
@@ -1042,7 +1042,7 @@ void ScAutoFormat::Load()
                 ScAutoFormatData* pData;
                 sal_uInt16 nAnz = 0;
                 rStream.ReadUInt16( nAnz );
-                bRet = (rStream.GetError() == 0);
+                bRet = (rStream.GetError() == ERRCODE_NONE);
                 for (sal_uInt16 i=0; bRet && (i < nAnz); i++)
                 {
                     pData = new ScAutoFormatData();
@@ -1065,7 +1065,7 @@ bool ScAutoFormat::Save()
 
     SfxMedium aMedium( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), 
StreamMode::WRITE );
     SvStream* pStream = aMedium.GetOutStream();
-    bool bRet = (pStream && pStream->GetError() == 0);
+    bool bRet = (pStream && pStream->GetError() == ERRCODE_NONE);
     if (bRet)
     {
         const sal_uInt16 fileVersion = SOFFICE_FILEFORMAT_50;
@@ -1080,10 +1080,10 @@ bool ScAutoFormat::Save()
                     osl_getThreadTextEncoding() ) );
         m_aVersions.Write(rStream, fileVersion);
 
-        bRet &= (rStream.GetError() == 0);
+        bRet &= (rStream.GetError() == ERRCODE_NONE);
 
         rStream.WriteUInt16( m_Data.size() - 1 );
-        bRet &= (rStream.GetError() == 0);
+        bRet &= (rStream.GetError() == ERRCODE_NONE);
         MapType::iterator it = m_Data.begin(), itEnd = m_Data.end();
         if (it != itEnd)
         {
diff --git a/sc/source/filter/html/htmlexp.cxx 
b/sc/source/filter/html/htmlexp.cxx
index 4f1b1038acfe..ed957bbf2db0 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -1305,7 +1305,7 @@ void ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm,
         aMedium.Close();
         aMedium.Commit();
 
-        bRet = 0 == aMedium.GetError();
+        bRet = ERRCODE_NONE == aMedium.GetError();
 
         if( bRet )
         {
diff --git a/sc/source/filter/starcalc/scflt.cxx 
b/sc/source/filter/starcalc/scflt.cxx
index 7993aa325e77..e2ba310fc3e1 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -411,7 +411,7 @@ Sc10FontCollection::Sc10FontCollection(SvStream& rStream)
     {
         sal_uInt16 nAnz(0);
         rStream.ReadUInt16( nAnz );
-        for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++)
+        for (sal_uInt16 i=0; (i < nAnz) && (nError == ERRCODE_NONE); i++)
         {
             nError = insert_new<Sc10FontData>( this, rStream);
         }
@@ -452,7 +452,7 @@ Sc10NameCollection::Sc10NameCollection(SvStream& rStream) :
     {
         sal_uInt16 nAnz;
         rStream.ReadUInt16( nAnz );
-        for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++)
+        for (sal_uInt16 i=0; (i < nAnz) && (nError == ERRCODE_NONE); i++)
         {
             nError = insert_new<Sc10NameData>( this, rStream);
         }
@@ -502,7 +502,7 @@ Sc10PatternCollection::Sc10PatternCollection(SvStream& 
rStream)
     {
         sal_uInt16 nAnz;
         rStream.ReadUInt16( nAnz );
-        for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++)
+        for (sal_uInt16 i=0; (i < nAnz) && (nError == ERRCODE_NONE); i++)
         {
             nError = insert_new<Sc10PatternData>( this, rStream);
         }
@@ -562,7 +562,7 @@ Sc10DataBaseCollection::Sc10DataBaseCollection(SvStream& 
rStream)
         lcl_ReadFixedString( rStream, ActName, sizeof(ActName));
         sal_uInt16 nAnz;
         rStream.ReadUInt16( nAnz );
-        for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++)
+        for (sal_uInt16 i=0; (i < nAnz) && (nError == ERRCODE_NONE); i++)
         {
             nError = insert_new<Sc10DataBaseData>( this, rStream);
         }
@@ -992,7 +992,7 @@ void Sc10Import::LoadFileHeader()
     lcl_ReadFileHeader(rStream, FileHeader);
 
     nError = rStream.GetError();
-    if ( nError == 0 )
+    if ( nError == ERRCODE_NONE )
     {
         sal_Char Sc10CopyRight[32];
         strcpy(Sc10CopyRight, "Blaise-Tabelle");
@@ -1385,7 +1385,7 @@ void Sc10Import::LoadTables()
 
     sal_Int16 nTabCount;
     rStream.ReadInt16( nTabCount );
-    for (sal_Int16 Tab = 0; (Tab < nTabCount) && (nError == 0); Tab++)
+    for (sal_Int16 Tab = 0; (Tab < nTabCount) && (nError == ERRCODE_NONE); 
Tab++)
     {
         Sc10PageFormat   PageFormat;
         sal_Int16            DataBaseIndex;
@@ -1460,7 +1460,7 @@ void Sc10Import::LoadTables()
         rStream.ReadUChar( Visible );
 
         nError = rStream.GetError();
-        if (nError != 0) return;
+        if (nError != ERRCODE_NONE) return;
 
         if (TabNo == 0)
             pDoc->RenameTab(static_cast<SCTAB> (TabNo), SC10TOSTRING( TabName 
));
@@ -1582,14 +1582,14 @@ void Sc10Import::LoadTables()
             nError = errUnknownID;
             return;
         }
-        for (SCCOL Col = 0; (Col <= SC10MAXCOL) && (nError == 0); Col++)
+        for (SCCOL Col = 0; (Col <= SC10MAXCOL) && (nError == ERRCODE_NONE); 
Col++)
         {
             rStream.ReadUInt16( Count );
             nError = rStream.GetError();
-            if ((Count != 0) && (nError == 0))
+            if ((Count != 0) && (nError == ERRCODE_NONE))
                 LoadCol(Col, static_cast<SCTAB> (TabNo));
         }
-        OSL_ENSURE( nError == 0, "Stream" );
+        OSL_ENSURE( nError == ERRCODE_NONE, "Stream" );
     }
     pPrgrsBar->Progress();
 
@@ -1606,12 +1606,12 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
     rStream.ReadUInt16( CellCount );
     SCROW nScCount = static_cast< SCROW >( CellCount );
     if (nScCount > MAXROW) nError = errUnknownFormat;
-    for (sal_uInt16 i = 0; (i < CellCount) && (nError == 0); i++)
+    for (sal_uInt16 i = 0; (i < CellCount) && (nError == ERRCODE_NONE); i++)
     {
         rStream.ReadUChar( CellType );
         rStream.ReadUInt16( Row );
         nError = rStream.GetError();
-        if (nError == 0)
+        if (nError == ERRCODE_NONE)
         {
             switch (CellType)
             {
@@ -1696,16 +1696,16 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
     Sc10ColAttr aFlag;
     Sc10ColAttr aPattern;
 
-    if (nError == 0) LoadAttr(aFont);
-    if (nError == 0) LoadAttr(aAttr);
-    if (nError == 0) LoadAttr(aJustify);
-    if (nError == 0) LoadAttr(aFrame);
-    if (nError == 0) LoadAttr(aRaster);
-    if (nError == 0) LoadAttr(aValue);
-    if (nError == 0) LoadAttr(aColor);
-    if (nError == 0) LoadAttr(aFrameColor);
-    if (nError == 0) LoadAttr(aFlag);
-    if (nError == 0) LoadAttr(aPattern);
+    if (nError == ERRCODE_NONE) LoadAttr(aFont);
+    if (nError == ERRCODE_NONE) LoadAttr(aAttr);
+    if (nError == ERRCODE_NONE) LoadAttr(aJustify);
+    if (nError == ERRCODE_NONE) LoadAttr(aFrame);
+    if (nError == ERRCODE_NONE) LoadAttr(aRaster);
+    if (nError == ERRCODE_NONE) LoadAttr(aValue);
+    if (nError == ERRCODE_NONE) LoadAttr(aColor);
+    if (nError == ERRCODE_NONE) LoadAttr(aFrameColor);
+    if (nError == ERRCODE_NONE) LoadAttr(aFlag);
+    if (nError == ERRCODE_NONE) LoadAttr(aPattern);
 
     if (nError)
         return;
@@ -2309,12 +2309,12 @@ void Sc10Import::LoadObjects()
         sal_Char Reserved[32];
         rStream.ReadBytes(Reserved, sizeof(Reserved));
         nError = rStream.GetError();
-        if ((nAnz > 0) && (nError == 0))
+        if ((nAnz > 0) && (nError == ERRCODE_NONE))
         {
             sal_uInt8 ObjectType;
             Sc10GraphHeader GraphHeader;
             bool IsOleObject = false; // TODO: this is only a band-aid
-            for (sal_uInt16 i = 0; (i < nAnz) && (nError == 0) && 
!rStream.IsEof() && !IsOleObject; i++)
+            for (sal_uInt16 i = 0; (i < nAnz) && (nError == ERRCODE_NONE) && 
!rStream.IsEof() && !IsOleObject; i++)
             {
                 rStream.ReadUChar( ObjectType );
                 lcl_ReadGraphHeader(rStream, GraphHeader);
diff --git a/sc/source/ui/docshell/tablink.cxx 
b/sc/source/ui/docshell/tablink.cxx
index b3b00683960e..d6f850b12541 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -266,7 +266,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const 
OUString& rNewFilter,
             /*  #i71497# check if external document is loaded successfully,
                 otherwise we may find the empty default sheet "Sheet1" in
                 rSrcDoc, even if the document does not exist. */
-            if( pMed->GetError() == 0 )
+            if( pMed->GetError() == ERRCODE_NONE )
             {
                 // no sheet name -> use first sheet
                 if ( !aTabName.isEmpty() && !bAutoTab )
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 22697b75a581..141569cfd487 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -1516,7 +1516,7 @@ void SdPublishingDlg::Load()
     {
         SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( 
aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ );
 
-        bool bOk = pIStm && ( pIStm->GetError() == 0);
+        bool bOk = pIStm && ( pIStm->GetError() == ERRCODE_NONE);
 
         delete pIStm;
 
@@ -1584,7 +1584,7 @@ bool SdPublishingDlg::Save()
     aMedium.Close();
     aMedium.Commit();
 
-    return( aMedium.GetError() == 0 );
+    return( aMedium.GetError() == ERRCODE_NONE );
 }
 
 std::vector<OString> SdPublishingDlg::getAllPageUIXMLDescriptions() const
diff --git a/sd/source/filter/ppt/pptatom.cxx b/sd/source/filter/ppt/pptatom.cxx
index 786ba6d1ad78..1a6bd6957305 100644
--- a/sd/source/filter/ppt/pptatom.cxx
+++ b/sd/source/filter/ppt/pptatom.cxx
@@ -42,13 +42,13 @@ Atom::Atom( const DffRecordHeader& rRecordHeader, SvStream& 
rStream )
             sal_uInt64 const nStreamSize = mrStream.Tell();
             mrStream.Seek( nStreamPos );
 
-            while( (mrStream.GetError() == 0 )
+            while( (mrStream.GetError() == ERRCODE_NONE )
                 && ( mrStream.Tell() < nStreamSize )
                 && ( mrStream.Tell() < maRecordHeader.GetRecEndFilePos() ) )
             {
                 ReadDffRecordHeader( mrStream, aChildHeader );
 
-                if( mrStream.GetError() == 0 )
+                if( mrStream.GetError() == ERRCODE_NONE )
                 {
                     Atom* pAtom = new Atom( aChildHeader, mrStream );
 
@@ -82,7 +82,7 @@ Atom* Atom::import( const DffRecordHeader& rRootRecordHeader, 
SvStream& rStCtrl
 {
     Atom* pRootAtom = new Atom( rRootRecordHeader, rStCtrl );
 
-    if( rStCtrl.GetError() == 0 )
+    if( rStCtrl.GetError() == ERRCODE_NONE )
     {
         return pRootAtom;
     }
diff --git a/sd/source/filter/ppt/pptatom.hxx b/sd/source/filter/ppt/pptatom.hxx
index c03882ed6994..72b1238ac583 100644
--- a/sd/source/filter/ppt/pptatom.hxx
+++ b/sd/source/filter/ppt/pptatom.hxx
@@ -103,7 +103,7 @@ inline bool Atom::isContainer() const
 inline bool Atom::seekToContent() const
 {
     maRecordHeader.SeekToContent( mrStream );
-    return mrStream.GetError() == 0;
+    return mrStream.GetError() == ERRCODE_NONE;
 }
 
 inline sal_uInt16 Atom::getType() const
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index c2613ebc41a4..f458679c39bc 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -776,7 +776,7 @@ bool ImplSdPPTImport::Import()
                 if ( SeekToAktPage( &aPageHd ) )
                 {
                     auto nEndRecPos = SanitizeEndPos(rStCtrl, 
aPageHd.GetRecEndFilePos());
-                    while( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < 
nEndRecPos ) )
+                    while( ( rStCtrl.GetError() == ERRCODE_NONE ) && ( 
rStCtrl.Tell() < nEndRecPos ) )
                     {
                         DffRecordHeader aHd;
                         ReadDffRecordHeader( rStCtrl, aHd );
@@ -798,7 +798,7 @@ bool ImplSdPPTImport::Import()
                                         {
                                             sal_uInt32 nObjCount = 0;
                                             auto nListEndRecPos = 
SanitizeEndPos(rStCtrl, aEscherObjListHd.GetRecEndFilePos());
-                                            while( ( rStCtrl.GetError() == 0 ) 
&& ( rStCtrl.Tell() < nListEndRecPos ) )
+                                            while( ( rStCtrl.GetError() == 
ERRCODE_NONE ) && ( rStCtrl.Tell() < nListEndRecPos ) )
                                             {
                                                 DffRecordHeader aHd2;
                                                 ReadDffRecordHeader( rStCtrl, 
aHd2 );
@@ -832,7 +832,7 @@ bool ImplSdPPTImport::Import()
                                 if ( SeekToContentOfProgTag( 10, rStCtrl, 
aPageHd, aProgTagHd ) )
                                 {
                                     auto nTagEndRecPos = 
SanitizeEndPos(rStCtrl, aProgTagHd.GetRecEndFilePos());
-                                    while ( ( rStCtrl.GetError() == 0 ) && ( 
rStCtrl.Tell() < nTagEndRecPos ) )
+                                    while ( ( rStCtrl.GetError() == 
ERRCODE_NONE ) && ( rStCtrl.Tell() < nTagEndRecPos ) )
                                     {
                                         DffRecordHeader aProgTagContentHd;
                                         ReadDffRecordHeader( rStCtrl, 
aProgTagContentHd );
@@ -942,7 +942,7 @@ bool ImplSdPPTImport::Import()
 
                     aPageHd.SeekToContent( rStCtrl );
                     auto nEndRecPos = SanitizeEndPos(rStCtrl, 
aPageHd.GetRecEndFilePos());
-                    while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < 
nEndRecPos ) )
+                    while ( ( rStCtrl.GetError() == ERRCODE_NONE ) && ( 
rStCtrl.Tell() < nEndRecPos ) )
                     {
                         DffRecordHeader aHd;
                         ReadDffRecordHeader( rStCtrl, aHd );
@@ -954,7 +954,7 @@ bool ImplSdPPTImport::Import()
                                 if ( SeekToContentOfProgTag( 10, rStCtrl, 
aPageHd, aProgTagHd ) )
                                 {
                                     auto nHdEndRecPos = 
SanitizeEndPos(rStCtrl, aProgTagHd.GetRecEndFilePos());
-                                    while ( ( rStCtrl.GetError() == 0 ) && ( 
rStCtrl.Tell() < nHdEndRecPos ) )
+                                    while ( ( rStCtrl.GetError() == 
ERRCODE_NONE ) && ( rStCtrl.Tell() < nHdEndRecPos ) )
                                     {
                                         DffRecordHeader aProgTagContentHd;
                                         ReadDffRecordHeader( rStCtrl, 
aProgTagContentHd );
@@ -1536,7 +1536,7 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, 
const bool bNewAnimations
             bool bSSSlideInfoAtom = false;
             while ( true )
             {
-                while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < 
nPageRecEnd ) )
+                while ( ( rStCtrl.GetError() == ERRCODE_NONE ) && ( 
rStCtrl.Tell() < nPageRecEnd ) )
                 {
                     DffRecordHeader aHd;
                     ReadDffRecordHeader( rStCtrl, aHd );
@@ -2717,7 +2717,7 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, 
DffObjData& rObjData, voi
                     if (!aHd.SeekToEndOfRecord(rSt))
                         break;
                 }
-                while( ( rSt.GetError() == 0 ) && ( rSt.Tell() < 
nClientDataLen ) );
+                while( ( rSt.GetError() == ERRCODE_NONE ) && ( rSt.Tell() < 
nClientDataLen ) );
 
                 if ( bInhabitanceChecked || bAnimationInfoFound )
                     break;
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 22157511eb53..d8add42bad15 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -499,7 +499,7 @@ bool SdNavigatorWin::InsertFile(const OUString& rFileName)
     {
         // show dragged-in document
         std::shared_ptr<const SfxFilter> pFilter;
-        ErrCode nErr = 0;
+        ErrCode nErr = ERRCODE_NONE;
 
         if (aFileName != maDropFileName)
         {
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index a36b4fee9d2a..dca3a8df523c 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -726,7 +726,7 @@ ErrCode DrawViewShell::DoVerb(long nVerb)
         }
     }
 
-    return 0;
+    return ERRCODE_NONE;
 }
 
 /**
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index 4ed63c6f5387..7d311f64a3f0 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -716,7 +716,7 @@ void ViewShell::WriteFrameViewData()
 
 bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
 {
-    ErrCode aErrCode = 0;
+    ErrCode aErrCode = ERRCODE_NONE;
 
     SfxErrorContext aEC(ERRCTX_SO_DOVERB, GetActiveWindow(), RID_SO_ERRCTX);
     bool bAbort = false;
@@ -814,7 +814,7 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
         }
     }
 
-    if( aErrCode == 0 )
+    if( aErrCode == ERRCODE_NONE )
     {
         ::sd::View* pView = GetView();
 
@@ -872,12 +872,12 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long 
nVerb)
 
     GetDocSh()->SetWaitCursor( false );
 
-    if (aErrCode != 0 && !bAbort)
+    if (aErrCode != ERRCODE_NONE && !bAbort)
     {
         ErrorHandler::HandleError(* new StringErrorInfo(aErrCode, OUString() ) 
);
     }
 
-    return aErrCode == 0;
+    return aErrCode == ERRCODE_NONE;
 }
 
 /**
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index 6499f58430ad..a066fd8c615c 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -232,7 +232,7 @@ void SfxHTMLParser::StartFileDownload(const OUString& rURL)
 
 bool SfxHTMLParser::FinishFileDownload( OUString& rStr )
 {
-    bool bOK = pDLMedium && pDLMedium->GetErrorCode()==0;
+    bool bOK = pDLMedium && pDLMedium->GetErrorCode() == ERRCODE_NONE;
     if( bOK )
     {
         SvStream* pStream = pDLMedium->GetInStream();
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index 8d443844e9f1..190a2e75e847 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -65,7 +65,7 @@ SvMemoryStream* GraphicHelper::getFormatStrFromGDI_Impl( 
const GDIMetaFile* pGDI
     {
         SvMemoryStream* pStream = new SvMemoryStream( 65535, 65535 );
         Graphic aGraph( *pGDIMeta );
-        if ( GraphicConverter::Export( *pStream, aGraph, nFormat ) == 0 )
+        if ( GraphicConverter::Export( *pStream, aGraph, nFormat ) == 
ERRCODE_NONE )
             pResult = pStream;
         else
             delete pStream;
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index c7080f3a66f7..f1754effcf67 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -467,7 +467,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
                             return;
                         }
                         else
-                            nErr = 0;
+                            nErr = ERRCODE_NONE;
                     }
 
                     ErrorHandler::HandleError( nErr );
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index bfe31956e8f6..14675908d142 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -639,7 +639,7 @@ UCBStorageStream_Impl::UCBStorageStream_Impl( const 
OUString& rName, StreamMode
     , m_pContent( nullptr )
     , m_pStream( nullptr )
     , m_nRepresentMode( RepresentMode::NONE )
-    , m_nError( 0 )
+    , m_nError( ERRCODE_NONE )
     , m_nMode( nMode )
     , m_bSourceRead( !( nMode & StreamMode::TRUNC ) )
     , m_bModified( false )
@@ -1009,7 +1009,7 @@ void UCBStorageStream_Impl::SetError( ErrCode nErr )
 
 void  UCBStorageStream_Impl::ResetError()
 {
-    m_nError = 0;
+    m_nError = ERRCODE_NONE;
     SvStream::ResetError();
     if ( m_pAntiImpl )
         m_pAntiImpl->ResetError();
@@ -1470,7 +1470,7 @@ UCBStorage_Impl::UCBStorage_Impl( const 
::ucbhelper::Content& rContent, const OU
     , m_pTempFile( nullptr )
     , m_pSource( nullptr )
     //, m_pStream( NULL )
-    , m_nError( 0 )
+    , m_nError( ERRCODE_NONE )
     , m_nMode( nMode )
     , m_bCommited( false )
     , m_bDirect( bDirect )
@@ -1502,7 +1502,7 @@ UCBStorage_Impl::UCBStorage_Impl( const OUString& rName, 
StreamMode nMode, UCBSt
     , m_pTempFile( nullptr )
     , m_pSource( nullptr )
     //, m_pStream( NULL )
-    , m_nError( 0 )
+    , m_nError( ERRCODE_NONE )
     , m_nMode( nMode )
     , m_bCommited( false )
     , m_bDirect( bDirect )
@@ -1553,7 +1553,7 @@ UCBStorage_Impl::UCBStorage_Impl( SvStream& rStream, 
UCBStorage* pStorage, bool
     , m_pContent( nullptr )
     , m_pTempFile( new ::utl::TempFile )
     , m_pSource( &rStream )
-    , m_nError( 0 )
+    , m_nError( ERRCODE_NONE )
     , m_bCommited( false )
     , m_bDirect( bDirect )
     , m_bIsRoot( true )
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 0f43b42072dc..060fa6692de7 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -749,7 +749,7 @@ bool SmDocShell::Load( SfxMedium& rMedium )
             Reference<css::frame::XModel> xModel(GetModel());
             SmXMLImportWrapper aEquation(xModel);
             auto nError = aEquation.Import(rMedium);
-            bRet = 0 == nError;
+            bRet = ERRCODE_NONE == nError;
             SetError(nError);
         }
     }
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index ab7c0ac8a9e0..60d7114b94d0 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -463,7 +463,7 @@ sal_uInt32 SmXMLExport::exportDoc(enum XMLTokenEnum eClass)
     }
 
     bSuccess=true;
-    return 0;
+    return ERRCODE_NONE;
 }
 
 void SmXMLExport::ExportContent_()
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index f426f42a76fe..4e7ac3e87c7b 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -301,7 +301,7 @@ sal_uInt32 SmXMLImportWrapper::ReadThroughComponent(
                 sal::static_int_cast< sal_uIntPtr >(
                 xFilterTunnel->getSomething( SmXMLImport::getUnoTunnelId() )));
         if ( pFilter && pFilter->GetSuccess() )
-            nError = 0;
+            nError = ERRCODE_NONE;
     }
     catch( xml::sax::SAXParseException& r )
     {
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index c1dfacf8570f..b68d72e7d866 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1340,7 +1340,7 @@ void SmViewShell::Insert( SfxMedium& rMedium )
             // is this a fabulous math package ?
             Reference<css::frame::XModel> xModel(pDoc->GetModel());
             SmXMLImportWrapper aEquation(xModel);    //!! modifies the result 
of pDoc->GetText() !!
-            bRet = 0 == aEquation.Import(rMedium);
+            bRet = ERRCODE_NONE == aEquation.Import(rMedium);
         }
     }
 
@@ -1377,7 +1377,7 @@ void SmViewShell::InsertFrom(SfxMedium &rMedium)
         {
             Reference<css::frame::XModel> xModel(pDoc->GetModel());
             SmXMLImportWrapper aEquation(xModel);    //!! modifies the result 
of pDoc->GetText() !!
-            bSuccess = 0 == aEquation.Import(rMedium);
+            bSuccess = ERRCODE_NONE == aEquation.Import(rMedium);
         }
     }
 
diff --git a/svtools/source/urlobj/inetimg.cxx 
b/svtools/source/urlobj/inetimg.cxx
index 0abae28c90dd..3ea57fbd45ce 100644
--- a/svtools/source/urlobj/inetimg.cxx
+++ b/svtools/source/urlobj/inetimg.cxx
@@ -124,7 +124,7 @@ bool INetImage::Read( SvStream& rIStm, SotClipboardFormatId 
nFormat )
             else if( !aTargetURL.isEmpty() )
                 aTargetURL.clear();
 
-            bRet = 0 == rIStm.GetError();
+            bRet = ERRCODE_NONE == rIStm.GetError();
         }
         break;
     default: break;
diff --git a/svx/source/core/graphichelper.cxx 
b/svx/source/core/graphichelper.cxx
index f307083f5245..86b1025e18f7 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -172,11 +172,11 @@ OUString GraphicHelper::ExportGraphic( const Graphic& 
rGraphic, const OUString&
                     if( aOut.GetOutStream() && 
!aOut.GetOutStream()->GetError())
                     {
                         aOut.GetOutStream()->WriteStream( *aIn.GetInStream() );
-                        if ( 0 == aIn.GetError() )
+                        if ( ERRCODE_NONE == aIn.GetError() )
                         {
                             aOut.Close();
                             aOut.Commit();
-                            if ( 0 == aOut.GetError() )
+                            if ( ERRCODE_NONE == aOut.GetError() )
                                 return sPath;
                         }
                     }
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index e6114ffc2776..a51aa1b641ae 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -115,7 +115,7 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const 
OUString& rGraphicId )
             if( aGfxLink.GetDataSize() && aGfxLink.GetData() )
             {
                 pStm->WriteBytes(aGfxLink.GetData(), aGfxLink.GetDataSize());
-                bRet = ( pStm->GetError() == 0 );
+                bRet = ( pStm->GetError() == ERRCODE_NONE );
             }
             else
             {
@@ -129,14 +129,14 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const 
OUString& rGraphicId )
                     else
                         aFormat = "png";
 
-                    bRet = ( rFilter.ExportGraphic( aGraphic, "", *pStm, 
rFilter.GetExportFormatNumberForShortName( aFormat ) ) == 0 );
+                    bRet = ( rFilter.ExportGraphic( aGraphic, "", *pStm, 
rFilter.GetExportFormatNumberForShortName( aFormat ) ) == ERRCODE_NONE );
                 }
                 else if( aGraphic.GetType() == GraphicType::GdiMetafile )
                 {
                     pStm->SetVersion( SOFFICE_FILEFORMAT_8 );
                     pStm->SetCompressMode( SvStreamCompressFlags::ZBITMAP );
                     const_cast<GDIMetaFile&>( aGraphic.GetGDIMetaFile() 
).Write( *pStm );
-                    bRet = ( pStm->GetError() == 0 );
+                    bRet = ( pStm->GetError() == ERRCODE_NONE );
                 }
             }
 
@@ -564,7 +564,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& 
rPictureStorageName,
                     // higher PDF version, while aGfxLink still contains the
                     // original data provided by the user.
                     pStream->WriteBytes(rPdfData.getConstArray(), 
rPdfData.getLength());
-                    bRet = (pStream->GetError() == 0);
+                    bRet = (pStream->GetError() == ERRCODE_NONE);
                 }
                 else
                     pStream->WriteBytes(aGfxLink.GetData(), 
aGfxLink.GetDataSize());
@@ -582,7 +582,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& 
rPictureStorageName,
                         aFormat = "png";
 
                     bRet = ( rFilter.ExportGraphic( aGraphic, "", *pStream,
-                                                     
rFilter.GetExportFormatNumberForShortName( aFormat ) ) == 0 );
+                                                     
rFilter.GetExportFormatNumberForShortName( aFormat ) ) == ERRCODE_NONE );
                 }
                 else if( aGraphic.GetType() == GraphicType::GdiMetafile )
                 {
@@ -607,7 +607,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& 
rPictureStorageName,
                     else
                         rMtf.Write( *pStream );
 
-                    bRet = ( pStream->GetError() == 0 );
+                    bRet = ( pStream->GetError() == ERRCODE_NONE );
                 }
             }
             uno::Reference < embed::XTransactedObject > xStorage(
diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx
index 8b4ee3a007fd..8b197546f10d 100644
--- a/sw/source/core/doc/docbasic.cxx
+++ b/sw/source/core/doc/docbasic.cxx
@@ -74,7 +74,7 @@ static Sequence<Any> *lcl_docbasic_convertArgs( SbxArray& 
rArgs )
 
 bool SwDoc::ExecMacro( const SvxMacro& rMacro, OUString* pRet, SbxArray* pArgs 
)
 {
-    ErrCode eErr = 0;
+    ErrCode eErr = ERRCODE_NONE;
     switch( rMacro.GetScriptType() )
     {
     case STARBASIC:
@@ -126,7 +126,7 @@ bool SwDoc::ExecMacro( const SvxMacro& rMacro, OUString* 
pRet, SbxArray* pArgs )
         }
     }
 
-    return 0 == eErr;
+    return ERRCODE_NONE == eErr;
 }
 
 sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& 
rCallEvent,
@@ -210,7 +210,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const 
SwCallMouseEvent& rCallEve
             const SvxMacro& rMacro = *pTable->Get( nEvent );
             if( STARBASIC == rMacro.GetScriptType() )
             {
-                nRet += 0 == mpDocShell->CallBasic( rMacro.GetMacName(),
+                nRet += ERRCODE_NONE == mpDocShell->CallBasic( 
rMacro.GetMacName(),
                                     rMacro.GetLibName(), nullptr ) ? 1 : 0;
             }
             else if( EXTENDED_STYPE == rMacro.GetScriptType() )
@@ -223,7 +223,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const 
SwCallMouseEvent& rCallEve
 
                 SAL_INFO("sw", "SwDoc::CallEvent URL is " << 
rMacro.GetMacName() );
 
-                nRet += 0 == mpDocShell->CallXScript(
+                nRet += ERRCODE_NONE == mpDocShell->CallXScript(
                     rMacro.GetMacName(), *pUnoArgs,aRet, aOutArgsIndex, 
aOutArgs) ? 1 : 0;
             }
             // JavaScript calls are ignored
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 3787418e9e78..215b29c730e9 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -496,7 +496,7 @@ bool SwBoxAutoFormat::Load( SvStream& rStream, const 
SwAfVersions& rVersions, sa
     m_aStacked.SetValue( aOrientation.IsStacked() );
     m_aRotateAngle.SetValue( aOrientation.GetRotation( 
m_aRotateAngle.GetValue() ) );
 
-    return 0 == rStream.GetError();
+    return ERRCODE_NONE == rStream.GetError();
 }
 
 bool SwBoxAutoFormat::Save( SvStream& rStream, sal_uInt16 fileVersion ) const
@@ -549,7 +549,7 @@ bool SwBoxAutoFormat::Save( SvStream& rStream, sal_uInt16 
fileVersion ) const
         RTL_TEXTENCODING_UTF8);
     rStream.WriteUInt16( (sal_uInt16)m_eSysLanguage ).WriteUInt16( 
(sal_uInt16)m_eNumFormatLanguage );
 
-    return 0 == rStream.GetError();
+    return ERRCODE_NONE == rStream.GetError();
 }
 
 bool SwBoxAutoFormat::SaveVersionNo( SvStream& rStream, sal_uInt16 fileVersion 
) const
@@ -588,7 +588,7 @@ bool SwBoxAutoFormat::SaveVersionNo( SvStream& rStream, 
sal_uInt16 fileVersion )
 
     rStream.WriteUInt16( 0 );       // NumberFormat
 
-    return 0 == rStream.GetError();
+    return ERRCODE_NONE == rStream.GetError();
 }
 
 SwTableAutoFormat::SwTableAutoFormat( const OUString& rName )
@@ -966,7 +966,7 @@ bool SwTableAutoFormat::Load( SvStream& rStream, const 
SwAfVersions& rVersions )
 {
     sal_uInt16  nVal = 0;
     rStream.ReadUInt16( nVal );
-    bool bRet = 0 == rStream.GetError();
+    bool bRet = ERRCODE_NONE == rStream.GetError();
 
     if( bRet && (nVal == AUTOFORMAT_DATA_ID_X ||
             (AUTOFORMAT_DATA_ID_504 <= nVal && nVal <= AUTOFORMAT_DATA_ID)) )
@@ -1008,7 +1008,7 @@ bool SwTableAutoFormat::Load( SvStream& rStream, const 
SwAfVersions& rVersions )
             READ(m_aShadow, SvxShadowItem, AUTOFORMAT_FILE_VERSION);
         }
 
-        bRet = 0 == rStream.GetError();
+        bRet = ERRCODE_NONE== rStream.GetError();
 
         for( sal_uInt8 i = 0; bRet && i < 16; ++i )
         {
@@ -1052,7 +1052,7 @@ bool SwTableAutoFormat::Save( SvStream& rStream, 
sal_uInt16 fileVersion ) const
         m_aShadow.Store(rStream, m_aShadow.GetVersion(fileVersion));
     }
 
-    bool bRet = 0 == rStream.GetError();
+    bool bRet = ERRCODE_NONE == rStream.GetError();
 
     for( int i = 0; bRet && i < 16; ++i )
     {
@@ -1314,13 +1314,13 @@ bool SwTableAutoFormatTable::Save() const
 
 bool SwTableAutoFormatTable::Load( SvStream& rStream )
 {
-    bool bRet = 0 == rStream.GetError();
+    bool bRet = ERRCODE_NONE == rStream.GetError();
     if (bRet)
     {
         // Attention: We need to read a general Header here
         sal_uInt16 nVal = 0;
         rStream.ReadUInt16( nVal );
-        bRet = 0 == rStream.GetError();
+        bRet = ERRCODE_NONE == rStream.GetError();
 
         if( bRet )
         {
@@ -1354,7 +1354,7 @@ bool SwTableAutoFormatTable::Load( SvStream& rStream )
                 sal_uInt16 nCount = 0;
                 rStream.ReadUInt16( nCount );
 
-                bRet = 0 == rStream.GetError();
+                bRet = ERRCODE_NONE== rStream.GetError();
                 if (bRet)
                 {
                     const size_t nMinRecordSize = sizeof(sal_uInt16);
@@ -1392,7 +1392,7 @@ bool SwTableAutoFormatTable::Load( SvStream& rStream )
 
 bool SwTableAutoFormatTable::Save( SvStream& rStream ) const
 {
-    bool bRet = 0 == rStream.GetError();
+    bool bRet = ERRCODE_NONE == rStream.GetError();
     if (bRet)
     {
         rStream.SetVersion(AUTOFORMAT_FILE_VERSION);
@@ -1403,7 +1403,7 @@ bool SwTableAutoFormatTable::Save( SvStream& rStream ) 
const
                .WriteUChar( 2 ) // Character count of the Header including 
this value
                .WriteUChar( GetStoreCharSet( ::osl_getThreadTextEncoding() ) );
 
-        bRet = 0 == rStream.GetError();
+        bRet = ERRCODE_NONE == rStream.GetError();
         if (!bRet)
             return false;
 
@@ -1412,7 +1412,7 @@ bool SwTableAutoFormatTable::Save( SvStream& rStream ) 
const
                 rStream, AUTOFORMAT_FILE_VERSION);
 
         rStream.WriteUInt16( m_pImpl->m_AutoFormats.size() - 1 );
-        bRet = 0 == rStream.GetError();
+        bRet = ERRCODE_NONE == rStream.GetError();
 
         for (auto const & rFormat: m_pImpl->m_AutoFormats)
         {
diff --git a/sw/source/core/swg/SwXMLBlockExport.cxx 
b/sw/source/core/swg/SwXMLBlockExport.cxx
index 1cb361d2ed6d..6e62df74ff55 100644
--- a/sw/source/core/swg/SwXMLBlockExport.cxx
+++ b/sw/source/core/swg/SwXMLBlockExport.cxx
@@ -73,7 +73,7 @@ sal_uInt32 SwXMLBlockListExport::exportDoc(enum XMLTokenEnum )
         }
     }
     GetDocHandler()->endDocument();
-    return 0;
+    return ERRCODE_NONE;
 }
 
 SwXMLTextBlockExport::SwXMLTextBlockExport(
diff --git a/sw/source/filter/ascii/parasc.cxx 
b/sw/source/filter/ascii/parasc.cxx
index a82ca4344848..0fbf8800c1b7 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -491,7 +491,7 @@ sal_uLong SwASCIIParser::ReadChars()
         rtl_destroyTextToUnicodeContext( hConverter, hContext );
         rtl_destroyTextToUnicodeConverter( hConverter );
     }
-    return 0;
+    return ERRCODE_NONE;
 }
 
 void SwASCIIParser::InsertText( const OUString& rStr )
diff --git a/sw/source/filter/ascii/wrtasc.cxx 
b/sw/source/filter/ascii/wrtasc.cxx
index 3399572a9184..00ed3e928fbd 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -189,7 +189,7 @@ sal_uLong SwASCWriter::WriteStream()
     if( bShowProgress )
         ::EndProgress( pDoc->GetDocShell() );
 
-    return 0;
+    return ERRCODE_NONE;
 }
 
 void GetASCWriter( const OUString& rFltNm, const OUString& /*rBaseURL*/, 
WriterRef& xRet )
diff --git a/sw/source/filter/html/wrthtml.cxx 
b/sw/source/filter/html/wrthtml.cxx
index 040fdd5b86e4..4ba96bb823dd 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -321,7 +321,7 @@ sal_uLong SwHTMLWriter::WriteStream()
 
     m_nFootNote = m_nEndNote = 0;
 
-    m_nWarn = 0;
+    m_nWarn = ERRCODE_NONE;
     GetNumInfo().Clear();
     m_pNextNumRuleInfo = nullptr;
 
diff --git a/sw/source/filter/writer/writer.cxx 
b/sw/source/filter/writer/writer.cxx
index ea80865358bd..c46132263491 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -340,7 +340,7 @@ bool Writer::CopyLocalFileToINet( OUString& rFileNm )
     aSrcFile.Close();
     aDstFile.Commit();
 
-    bRet = 0 == aDstFile.GetError();
+    bRet = ERRCODE_NONE == aDstFile.GetError();
 
     if( bRet )
     {
diff --git a/sw/source/filter/ww8/ww8graf2.cxx 
b/sw/source/filter/ww8/ww8graf2.cxx
index 4b42da49d882..5aa5d6fe0085 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -241,7 +241,7 @@ extern void WW8PicShadowToReal(  WW8_PIC_SHADOW*  pPicS,  
WW8_PIC*  pPic );
 
 bool SwWW8ImplReader::GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc)
 {
-    return 0 == GraphicFilter::GetGraphicFilter().ImportGraphic(rGraphic, 
OUString(), rSrc);
+    return ERRCODE_NONE == 
GraphicFilter::GetGraphicFilter().ImportGraphic(rGraphic, OUString(), rSrc);
 }
 
 bool SwWW8ImplReader::ReadGrafFile(OUString& rFileName, Graphic*& rpGraphic,
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index c94db550f043..48809b436ced 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -523,7 +523,7 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, 
std::unique_ptr<SfxItemSet
     rSt.ReadInt32( aLVL.nStartAt );
     rSt.ReadUChar( aLVL.nNFC );
     rSt.ReadUChar( aBits1 );
-    if( 0 != rSt.GetError() ) return false;
+    if( ERRCODE_NONE != rSt.GetError() ) return false;
     aLVL.nAlign = (aBits1 & 0x03);
     if( aBits1 & 0x10 ) aLVL.bV6Prev    = sal_uInt8(true);
     if( aBits1 & 0x20 ) aLVL.bV6PrSp    = sal_uInt8(true);
@@ -532,7 +532,7 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, 
std::unique_ptr<SfxItemSet
     for(sal_uInt8 nLevelB = 0; nLevelB < nMaxLevel; ++nLevelB)
     {
         rSt.ReadUChar( aLVL.aOfsNumsXCH[ nLevelB ] );
-        if( 0 != rSt.GetError() )
+        if( ERRCODE_NONE != rSt.GetError() )
         {
             bLVLOkB = false;
             break;
@@ -549,7 +549,7 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, 
std::unique_ptr<SfxItemSet
     rSt.ReadUChar( aLVL.nLenGrpprlChpx );
     rSt.ReadUChar( aLVL.nLenGrpprlPapx );
     rSt.SeekRel( 2 );
-    if( 0 != rSt.GetError()) return false;
+    if( ERRCODE_NONE != rSt.GetError()) return false;
 
     // 2. read PAPx if needed and search for indent values
 
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index c3154ffb064e..64f7aceb3e5a 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -5485,7 +5485,7 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, 
sal_uInt32 nOffset)
     rSt.ReadUInt16( m_wIdent );
     rSt.ReadUInt16( m_nFib );
     rSt.ReadUInt16( m_nProduct );
-    if( 0 != rSt.GetError() )
+    if( ERRCODE_NONE != rSt.GetError() )
     {
         sal_Int16 nFibMin;
         sal_Int16 nFibMax;
@@ -5782,7 +5782,7 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, 
sal_uInt32 nOffset)
         rSt.ReadUInt32( m_lcbSttbttmbd );
     }
 
-    if( 0 == rSt.GetError() )
+    if( ERRCODE_NONE == rSt.GetError() )
     {
         // set bit flag
         m_fDot        =   aBits1 & 0x01       ;
@@ -5837,7 +5837,7 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, 
sal_uInt32 nOffset)
             rSt.ReadInt32( m_lcbPlcftxbxBkd );
             rSt.ReadInt32( m_fcPlcfHdrtxbxBkd );
             rSt.ReadInt32( m_lcbPlcfHdrtxbxBkd );
-            if( 0 != rSt.GetError() )
+            if( ERRCODE_NONE != rSt.GetError() )
             {
                 m_nFibError = ERR_SWG_READ_ERROR;
             }
@@ -5876,7 +5876,7 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, 
sal_uInt32 nOffset)
                 rSt.ReadUInt32(m_lcbFactoidData);
             }
 
-            if( 0 != rSt.GetError() )
+            if( ERRCODE_NONE != rSt.GetError() )
                 m_nFibError = ERR_SWG_READ_ERROR;
 
             rSt.Seek( 0x5bc );          // Actual nFib introduced in Word 2003
@@ -6628,7 +6628,7 @@ WW8_STD* WW8Style::Read1STDFixed(sal_uInt16& rSkip)
         while( false ); // trick: the block above will passed through exactly 
one time
                     //   and can be left early with a "break"
 
-        if( (0 != rSt.GetError()) || !nRead )
+        if( (ERRCODE_NONE != rSt.GetError()) || !nRead )
             DELETEZ( pStd );        // report error with NULL
 
         rSkip = cbStd - cbSTDBaseInFile;
diff --git a/sw/source/uibase/config/uinums.cxx 
b/sw/source/uibase/config/uinums.cxx
index 5b126a19e692..3b78f4d064ae 100644
--- a/sw/source/uibase/config/uinums.cxx
+++ b/sw/source/uibase/config/uinums.cxx
@@ -61,7 +61,7 @@ void SwChapterNumRules::Save()
 
     SfxMedium aMedium( aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), 
StreamMode::WRITE );
     SvStream* pStream = aMedium.GetOutStream();
-    bool bRet = (pStream && pStream->GetError() == 0);
+    bool bRet = (pStream && pStream->GetError() == ERRCODE_NONE);
     if (bRet)
     {
         sw::ExportStoredChapterNumberingRules(*this, 
*pStream,CHAPTER_FILENAME);
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index cc45bd357a20..393a1df9bdc5 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -875,7 +875,7 @@ static void lcl_SaveDebugDoc( SfxObjectShell 
*xTargetDocShell,
         StreamMode::STD_READWRITE );
     bool bAnyError = !xTargetDocShell->DoSaveAs( *pDstMed );
     // xObjectShell->DoSaveCompleted crashes the mail merge unit tests, so 
skip it
-    bAnyError |= (0 != xTargetDocShell->GetError());
+    bAnyError |= (ERRCODE_NONE != xTargetDocShell->GetError());
     if( bAnyError )
         SAL_WARN( "sw.mailmerge", "Error saving: " << aTempFile.GetURL() );
     else
@@ -918,7 +918,7 @@ static bool lcl_SaveDoc(
     // Actually this should be a bool... so in case of email and individual
     // files, where this is set, we skip the recently used handling
     bAnyError |= !xObjectShell->DoSaveCompleted( pDstMed, !decodedURL );
-    bAnyError |= (0 != xObjectShell->GetError());
+    bAnyError |= (ERRCODE_NONE != xObjectShell->GetError());
     if( bAnyError )
     {
         // error message ??
diff --git a/sw/source/uibase/uiview/srcview.cxx 
b/sw/source/uibase/uiview/srcview.cxx
index a6223728856b..afbf0cf24e29 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -780,7 +780,7 @@ void SwSrcView::Load(SwDocShell* pDocShell)
     if(bHtml && !bDocModified && pDocShell->HasName())
     {
         SvStream* pStream = pMedium->GetInStream();
-        if(pStream && 0 == pStream->GetError() )
+        if(pStream && ERRCODE_NONE == pStream->GetError() )
         {
             rtl_TextEncoding eHeaderEnc =
                 SfxHTMLParser::GetEncodingByHttpHeader(
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index 1bdd9098431e..ae63084d28ff 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -286,7 +286,7 @@ void SwXAutoTextGroup::renameByName(const OUString& 
aElementName,
                     (nOldIdx == USHRT_MAX || nOldIdx == nIdx ))
         {
             pGlosGroup->Rename( nIdx, &aNewShort, &aNewName );
-            if(pGlosGroup->GetError() != 0)
+            if(pGlosGroup->GetError() != ERRCODE_NONE)
                 throw io::IOException();
         }
     }
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 383222ead9b5..3d3d2dd89048 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -478,7 +478,7 @@ bool InternalResMgr::Create()
     bool bDone = false;
 
     pStm = new SvFileStream( aFileName, StreamMode::READ | 
StreamMode::SHARE_DENYWRITE | StreamMode::NOCREATE );
-    if( pStm->GetError() == 0 )
+    if( pStm->GetError() == ERRCODE_NONE )
     {
         sal_Int32   lContLen = 0;
 
diff --git a/uui/source/iahndl-errorhandler.cxx 
b/uui/source/iahndl-errorhandler.cxx
index c69fc57d435d..31893d8ad028 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -247,7 +247,7 @@ UUIInteractionHelper::handleErrorHandlerRequest(
 
         //TODO! remove this backwards compatibility?
         OUString aContext(m_aContextParam);
-        if (aContext.isEmpty() && nErrorCode != 0)
+        if (aContext.isEmpty() && nErrorCode != ERRCODE_NONE)
         {
             SolarMutexGuard aGuard;
             ErrorContext * pContext = ErrorContext::GetContext();
diff --git a/vcl/qa/cppunit/graphicfilter/filters-test.cxx 
b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
index 78477d4846e4..0b28c706fd84 100644
--- a/vcl/qa/cppunit/graphicfilter/filters-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
@@ -57,7 +57,7 @@ bool VclFiltersTest::load(const OUString &,
 {
     SvFileStream aFileStream(rURL, StreamMode::READ);
     Graphic aGraphic;
-    return mGraphicFilter.ImportGraphic(aGraphic, rURL, aFileStream) == 0;
+    return mGraphicFilter.ImportGraphic(aGraphic, rURL, aFileStream) == 
ERRCODE_NONE;
 }
 
 void VclFiltersTest::testScaling()
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index cc50317037bc..78d2e1dbb656 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -2449,7 +2449,7 @@ bool TextEngine::Read( SvStream& rInput, const 
TextSelection* pSel )
     SetUpdateMode( bUpdate );
     FormatAndUpdate( GetActiveView() );
 
-    return rInput.GetError() == 0;
+    return rInput.GetError() == ERRCODE_NONE;
 }
 
 bool TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, bool 
bHTML )
@@ -2535,7 +2535,7 @@ bool TextEngine::Write( SvStream& rOutput, const 
TextSelection* pSel, bool bHTML
         rOutput.WriteLine( "</HTML>" );
     }
 
-    return rOutput.GetError() == 0;
+    return rOutput.GetError() == ERRCODE_NONE;
 }
 
 void TextEngine::RemoveAttribs( sal_uInt32 nPara )
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index a4792ca4b1a6..723b9b273bf1 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -313,7 +313,7 @@ bool ImplReadDIBPalette(SvStream& rIStm, BitmapPalette& 
rPal, bool bQuad)
         rPal[i] = aPalColor;
     }
 
-    return( rIStm.GetError() == 0UL );
+    return rIStm.GetError() == ERRCODE_NONE;
 }
 
 namespace
@@ -760,7 +760,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, 
BitmapWriteAccess& r
         }
     }
 
-    return( rIStm.GetError() == 0UL );
+    return rIStm.GetError() == ERRCODE_NONE;
 }
 
 bool ImplReadDIBBody(SvStream& rIStm, Bitmap& rBmp, AlphaMask* pBmpAlpha, 
sal_uLong nOffset, bool bIsMask, bool bMSOFormat)
@@ -1038,7 +1038,7 @@ bool ImplReadDIBFileHeader( SvStream& rIStm, sal_uLong& 
rOffset )
             rIStm.SeekRel( 8 );        // we are on bfSize member of 
BITMAPFILEHEADER, forward to bfOffBits
             rIStm.ReadUInt32( nTmp32 );            // read bfOffBits
             rOffset = nTmp32 - 14UL;    // adapt offset by 
sizeof(BITMAPFILEHEADER)
-            bRet = ( rIStm.GetError() == 0UL );
+            bRet = rIStm.GetError() == ERRCODE_NONE;
         }
 
         if ( rOffset >= nStreamLength )
@@ -1075,7 +1075,7 @@ bool ImplWriteDIBPalette( SvStream& rOStm, 
BitmapReadAccess& rAcc )
 
     rOStm.WriteBytes( pEntries.get(), nPalSize );
 
-    return( rOStm.GetError() == 0UL );
+    return rOStm.GetError() == ERRCODE_NONE;
 }
 
 bool ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, bool bRLE4 )
@@ -1188,7 +1188,7 @@ bool ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& 
rAcc, bool bRLE4 )
     rOStm.WriteUChar( 0 );
     rOStm.WriteUChar( 1 );
 
-    return( rOStm.GetError() == 0UL );
+    return rOStm.GetError() == ERRCODE_NONE;
 }
 
 bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess& rAcc, 
BitmapReadAccess* pAccAlpha, sal_uLong nCompression, sal_uInt32& rImageSize)
@@ -1581,7 +1581,7 @@ bool ImplWriteDIBFileHeader(SvStream& rOStm, 
BitmapReadAccess& rAcc, bool bUseDI
     rOStm.WriteUInt16( 0 );
     rOStm.WriteUInt32( nOffset );
 
-    return( rOStm.GetError() == 0UL );
+    return rOStm.GetError() == ERRCODE_NONE;
 }
 
 bool ImplReadDIB(
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index b31dbf4828ba..caed1663c776 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1027,7 +1027,7 @@ bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm )
         if( meType == GraphicType::Bitmap || meType == 
GraphicType::GdiMetafile )
         {
             ReadImpGraphic( rIStm, *this );
-            bRet = ( rIStm.GetError() == 0UL );
+            bRet = rIStm.GetError() == ERRCODE_NONE;
         }
         else if( sal::static_int_cast<sal_uLong>(meType) >= SYS_WINMETAFILE
                  && sal::static_int_cast<sal_uLong>(meType) <= SYS_MACMETAFILE 
)
@@ -1050,7 +1050,7 @@ bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm )
             if( nType && GraphicConverter::Import( rIStm, aSysGraphic, 
nCvtType ) == ERRCODE_NONE )
             {
                 *this = ImpGraphic( aSysGraphic.GetGDIMetaFile() );
-                bRet = ( rIStm.GetError() == 0UL );
+                bRet = rIStm.GetError() == ERRCODE_NONE;
             }
             else
                 meType = GraphicType::Default;
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index e88691a34b50..09f7ff9b6d88 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -482,7 +482,7 @@ void Printer::ImplInitData()
     mbDevOutput         = false;
     meOutDevType        = OUTDEV_PRINTER;
     mbDefPrinter        = false;
-    mnError             = 0;
+    mnError             = ERRCODE_NONE;
     mnCurPage           = 0;
     mnCurPrintPage      = 0;
     mnPageQueueSize     = 0;
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index de8609f38b71..1adca043062c 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -722,7 +722,7 @@ bool Printer::StartJob( const OUString& i_rJobName, 
std::shared_ptr<vcl::Printer
 
             if( bError )
             {
-                mnError = mpPrinter ? 
ImplSalPrinterErrorCodeToVCL(mpPrinter->GetErrorCode()) : 0;
+                mnError = mpPrinter ? 
ImplSalPrinterErrorCodeToVCL(mpPrinter->GetErrorCode()) : ERRCODE_NONE;
                 if ( !mnError )
                     mnError = PRINTER_GENERALERROR;
                 i_xController->setJobState( mnError == PRINTER_ABORT
diff --git a/vcl/workben/icontest.cxx b/vcl/workben/icontest.cxx
index a321d5392dc6..216ab9e4b890 100644
--- a/vcl/workben/icontest.cxx
+++ b/vcl/workben/icontest.cxx
@@ -94,7 +94,7 @@ void MyWorkWindow::LoadGraphic( const OUString& sImageFile )
 {
     SvFileStream aFileStream( sImageFile, StreamMode::READ );
     GraphicFilter aGraphicFilter(false);
-    if (aGraphicFilter.ImportGraphic(maGraphic, sImageFile, aFileStream) != 0)
+    if (aGraphicFilter.ImportGraphic(maGraphic, sImageFile, aFileStream) != 
ERRCODE_NONE)
     {
         SAL_WARN("vcl.icontest", "Could not import image '" << sImageFile << 
"'");
         return;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to