summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-14 13:34:55 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-05-12 13:43:14 -0400
commit53552eede9fb3d6a974d8f08393c167a45af92b8 (patch)
tree7ce326881d6bc5d987cf8e938dfbafefd0035841
parent3cc82ae6ccd315555f4f159c3103b80eae051704 (diff)
use ERRCODE_NONE instead of 0
peeling off a small chunk of my ErrCode strong_int conversion Reviewed-on: https://gerrit.libreoffice.org/38777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit a6aa57ff591fdf3d834a7e0b1e9e2ebad1d87c5c) Change-Id: Idc89e8496083beed7608cba705cd981139eb7111
-rw-r--r--basic/source/basmgr/basmgr.cxx2
-rw-r--r--basic/source/classes/sbintern.cxx2
-rw-r--r--basic/source/classes/sbxmod.cxx2
-rw-r--r--basic/source/comp/scanner.cxx2
-rw-r--r--basic/source/runtime/ddectrl.cxx6
-rw-r--r--basic/source/runtime/methods.cxx2
-rw-r--r--basic/source/runtime/methods1.cxx8
-rw-r--r--basic/source/runtime/runtime.cxx26
-rw-r--r--cui/source/dialogs/hldocntp.cxx2
-rw-r--r--cui/source/options/doclinkdialog.cxx2
-rw-r--r--cui/source/tabpages/tpbitmap.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx10
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx2
-rw-r--r--editeng/source/items/bulitem.cxx2
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.cxx2
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx6
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx14
-rw-r--r--filter/source/msfilter/msdffimp.cxx8
-rw-r--r--filter/source/msfilter/svdfppt.cxx42
-rw-r--r--forms/source/component/clickableimage.cxx2
-rw-r--r--forms/source/richtext/richtextvclcontrol.cxx2
-rw-r--r--framework/source/fwe/classes/addonsoptions.cxx2
-rw-r--r--framework/source/uielement/imagebuttontoolbarcontroller.cxx2
-rw-r--r--include/tools/stream.hxx2
-rw-r--r--linguistic/source/convdicxml.cxx2
-rw-r--r--sc/source/core/tool/autoform.cxx22
-rw-r--r--sc/source/filter/html/htmlexp.cxx2
-rw-r--r--sc/source/filter/starcalc/scflt.cxx48
-rw-r--r--sc/source/ui/docshell/tablink.cxx2
-rw-r--r--sd/source/filter/html/pubdlg.cxx4
-rw-r--r--sd/source/filter/ppt/pptatom.cxx6
-rw-r--r--sd/source/filter/ppt/pptatom.hxx2
-rw-r--r--sd/source/filter/ppt/pptin.cxx14
-rw-r--r--sd/source/ui/dlg/navigatr.cxx2
-rw-r--r--sd/source/ui/view/drviews1.cxx2
-rw-r--r--sd/source/ui/view/viewshe2.cxx8
-rw-r--r--sfx2/source/bastyp/sfxhtml.cxx2
-rw-r--r--sfx2/source/doc/graphhelp.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx2
-rw-r--r--sot/source/sdstor/ucbstorage.cxx10
-rw-r--r--starmath/source/document.cxx2
-rw-r--r--starmath/source/mathmlexport.cxx2
-rw-r--r--starmath/source/mathmlimport.cxx2
-rw-r--r--starmath/source/view.cxx4
-rw-r--r--svtools/source/urlobj/inetimg.cxx2
-rw-r--r--svx/source/core/graphichelper.cxx4
-rw-r--r--svx/source/xml/xmlgrhlp.cxx12
-rw-r--r--sw/source/core/doc/docbasic.cxx8
-rw-r--r--sw/source/core/doc/tblafmt.cxx24
-rw-r--r--sw/source/core/swg/SwXMLBlockExport.cxx2
-rw-r--r--sw/source/filter/ascii/parasc.cxx2
-rw-r--r--sw/source/filter/ascii/wrtasc.cxx2
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/writer/writer.cxx2
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx6
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx10
-rw-r--r--sw/source/uibase/config/uinums.cxx2
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx4
-rw-r--r--sw/source/uibase/uiview/srcview.cxx2
-rw-r--r--sw/source/uibase/uno/unoatxt.cxx2
-rw-r--r--tools/source/rc/resmgr.cxx2
-rw-r--r--uui/source/iahndl-errorhandler.cxx2
-rw-r--r--vcl/qa/cppunit/graphicfilter/filters-test.cxx2
-rw-r--r--vcl/source/edit/texteng.cxx4
-rw-r--r--vcl/source/gdi/dibtools.cxx12
-rw-r--r--vcl/source/gdi/impgraph.cxx4
-rw-r--r--vcl/source/gdi/print.cxx2
-rw-r--r--vcl/source/gdi/print3.cxx2
-rw-r--r--vcl/workben/icontest.cxx2
70 files changed, 206 insertions, 206 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index f7ee7b1e6af0..fedac3a1e412 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1556,7 +1556,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 5ffda81153f0..a515ac27c1af 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1066,7 +1066,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 e3a622b81f45..b1053076fcb9 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -359,7 +359,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 f8882d062efe..06a3d30f75a5 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 8aaf0f16a2e8..84aeee7c643a 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 34ead7fe4b43..3a89b852a5c8 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;
}
@@ -2288,7 +2288,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;
@@ -2303,7 +2303,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 030a75f39986..e869bccaf841 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;
@@ -2413,7 +2413,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' )
@@ -2429,7 +2429,7 @@ void SbiRuntime::StepINPUT()
{
ch = pIosys->Read();
}
- while( ( err = pIosys->GetError() ) == 0 )
+ while( ( err = pIosys->GetError() ) == ERRCODE_NONE )
{
if( ch == sep )
{
@@ -2449,7 +2449,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' )
{
@@ -2593,18 +2593,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;
}
@@ -3086,9 +3086,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();
}
@@ -3116,9 +3116,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 b4bac2b0574e..89ca8739b519 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -315,7 +315,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 34b961a6e56d..84e7ab283a5d 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 5f56ad4a487c..b8c462232106 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -795,7 +795,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 134ad6492982..7148a3136e9b 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -131,7 +131,7 @@ sal_Int32 ReadThroughComponent(
}
// success!
- return 0;
+ return ERRCODE_NONE;
}
@@ -163,12 +163,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
@@ -342,7 +342,7 @@ bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
,this
);
- if ( nRet == 0 )
+ if ( nRet == ERRCODE_NONE )
nRet = ReadThroughComponent( xStorage
,xModel
,"content.xml"
@@ -351,7 +351,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 788106b61a05..7240243a4d38 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -717,7 +717,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 1283f3287532..00743ffa703a 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 99382137faee..23f5d277391b 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -214,7 +214,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 af21b23b78d8..cb40778d30ed 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2785,7 +2785,7 @@ namespace pcr
}
_rClearBeforeDialog.clear();
- bool bSuccess = ( 0 == aFileDlg.Execute() );
+ bool bSuccess = ( ERRCODE_NONE == aFileDlg.Execute() );
if ( bSuccess )
{
if ( bHandleNonLink && xController.is() )
@@ -2825,7 +2825,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;
@@ -2888,7 +2888,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 19c37f3c4ea5..b169baddb09f 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -2303,7 +2303,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)
@@ -2391,7 +2391,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);
@@ -2446,7 +2446,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;
@@ -2455,7 +2455,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;
}
@@ -2478,7 +2478,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 );
@@ -2529,7 +2529,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 );
@@ -2573,7 +2573,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 ef35059fcbfa..505843aecf8f 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3806,7 +3806,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 );
}
}
@@ -4877,7 +4877,7 @@ Rectangle SvxMSDffManager::GetGlobalChildAnchor( const DffRecordHeader& rHd, SvS
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))
@@ -5889,7 +5889,7 @@ void SvxMSDffManager::GetCtrlData( sal_uInt32 nOffsDgg_ )
nPos += DFF_COMMON_RECORD_HEADER_SIZE + nLength;
++nDrawingContainerId;
}
- while( ( rStCtrl.GetError() == 0 ) && ( nPos < nMaxStrPos ) && bOk );
+ while( ( rStCtrl.GetError() == ERRCODE_NONE ) && ( nPos < nMaxStrPos ) && bOk );
}
}
@@ -5946,7 +5946,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 0b152746fa17..578af2e9aff4 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -752,7 +752,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 )
@@ -1349,7 +1349,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const O
bOk = false;
}
}
- if ( rStCtrl.GetError() != 0 )
+ if ( rStCtrl.GetError() != ERRCODE_NONE )
bOk = false;
if ( bOk )
@@ -1420,7 +1420,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const O
}
}
}
- if ( rStCtrl.GetError() != 0 )
+ if ( rStCtrl.GetError() != ERRCODE_NONE )
bOk = false;
if ( bOk )
{ // check Document PersistEntry
@@ -1644,7 +1644,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 );
@@ -1798,7 +1798,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long 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 );
@@ -2666,7 +2666,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 );
@@ -2743,7 +2743,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 );
@@ -2761,7 +2761,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))
@@ -2780,7 +2780,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 );
@@ -2850,7 +2850,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 );
@@ -2863,7 +2863,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 ) )
@@ -3109,7 +3109,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 );
@@ -3211,7 +3211,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 )
@@ -3219,7 +3219,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;
@@ -3294,7 +3294,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 )
@@ -3308,7 +3308,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++ ] );
@@ -4084,7 +4084,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 )
{
@@ -4189,7 +4189,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 ) )
{
@@ -4214,7 +4214,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() )
@@ -4281,7 +4281,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 )
{
@@ -5197,7 +5197,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 54f0963b79a4..73e714282b40 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -684,7 +684,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 5ea1f430ef49..0824b4e256fe 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 fc11b4e4c803..5141cb519387 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -1274,7 +1274,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 39db8a0712ba..2e7e523e2229 100644
--- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
@@ -126,7 +126,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 d353cb7bf930..046a70736435 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -399,7 +399,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 3f364e1a32d2..efe5f75c11ed 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -325,7 +325,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 e0578bc7971b..514f6fbffce2 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -375,7 +375,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 )
@@ -427,7 +427,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()
@@ -754,7 +754,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)) )
{
@@ -791,7 +791,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 );
}
@@ -818,7 +818,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 );
@@ -1026,14 +1026,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)
{
@@ -1061,7 +1061,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();
@@ -1084,7 +1084,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;
@@ -1099,10 +1099,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 c376672332bf..7fc3eb548830 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -1317,7 +1317,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 2a82b828c184..a19ae407f838 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);
}
@@ -997,7 +997,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");
@@ -1390,7 +1390,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;
@@ -1465,7 +1465,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 ), false);
@@ -1585,14 +1585,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();
@@ -1609,12 +1609,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)
{
@@ -1699,16 +1699,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;
@@ -2312,12 +2312,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 5c2ff38af891..d35a7dfd5d8f 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -263,7 +263,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 00878d6d8bf9..f6bc2a91f2c0 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -1515,7 +1515,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;
@@ -1583,7 +1583,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 c23e662442b1..5e7df2010e6e 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 81d0e8044faa..3bfddb08dd90 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -774,7 +774,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 );
@@ -796,7 +796,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 );
@@ -830,7 +830,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 );
@@ -940,7 +940,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 );
@@ -952,7 +952,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 );
@@ -1534,7 +1534,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 );
@@ -2706,7 +2706,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 8ebd503cfd53..c6b58ae1f46a 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -498,7 +498,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 76129051be5a..98bd5ecb99cc 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -730,7 +730,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 82b529e869d3..78b3f10dc2c0 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -706,7 +706,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;
@@ -804,7 +804,7 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
}
}
- if( aErrCode == 0 )
+ if( aErrCode == ERRCODE_NONE )
{
::sd::View* pView = GetView();
@@ -862,12 +862,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 54024936ddeb..762f2167eeeb 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -236,7 +236,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 c2a7fe298335..95b1173fc2c8 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -64,7 +64,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 f5a610a9a2f0..92767fc21f22 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -548,7 +548,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
GetDispatcher()->Execute( SID_OPENDOC, SfxCallMode::ASYNCHRON, aSet );
return;
}
- nErr = 0;
+ nErr = ERRCODE_NONE;
}
// Keep the read-only UI
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 11179f31d118..941b0ec194dc 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -640,7 +640,7 @@ UCBStorageStream_Impl::UCBStorageStream_Impl( const OUString& rName, StreamMode
, m_pContent( nullptr )
, m_pStream( nullptr )
, m_nRepresentMode( nonset )
- , m_nError( 0 )
+ , m_nError( ERRCODE_NONE )
, m_nMode( nMode )
, m_bSourceRead( !( nMode & StreamMode::TRUNC ) )
, m_bModified( false )
@@ -1020,7 +1020,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();
@@ -1481,7 +1481,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 )
@@ -1513,7 +1513,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 )
@@ -1564,7 +1564,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 142bc78f9f28..e79dca27aa32 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -755,7 +755,7 @@ bool SmDocShell::Load( SfxMedium& rMedium )
Reference<css::frame::XModel> xModel(GetModel());
SmXMLImportWrapper aEquation(xModel);
sal_uLong nError = aEquation.Import(rMedium);
- bRet = 0 == nError;
+ bRet = ERRCODE_NONE == nError;
SetError( nError, OSL_LOG_PREFIX );
}
}
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 41cc8a120a74..f07d69f18224 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -464,7 +464,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 dc0d03212fa0..1c28bb6e35b2 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -287,7 +287,7 @@ sal_uLong 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 aa9027b00c6b..3a1db07ef57c 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1348,7 +1348,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);
}
}
@@ -1385,7 +1385,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 36efa809fb4b..ab1083a1758a 100644
--- a/svtools/source/urlobj/inetimg.cxx
+++ b/svtools/source/urlobj/inetimg.cxx
@@ -125,7 +125,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 6cc42187a631..39d3c56ecc82 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -234,11 +234,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 50e95b923d08..9f86fd8f3b01 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -114,7 +114,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
{
@@ -128,14 +128,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 );
}
}
@@ -568,7 +568,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());
@@ -586,7 +586,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 )
{
@@ -611,7 +611,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 80c894bdc20f..7b8809c9d2c1 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:
@@ -127,7 +127,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,
@@ -207,7 +207,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() )
@@ -221,7 +221,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEve
OSL_TRACE( "SwDoc::CallEvent URL is %s", OUStringToOString(
rMacro.GetMacName(), RTL_TEXTENCODING_UTF8).getStr() );
- 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 4ca88ca80b1d..6fe9557caf34 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -495,7 +495,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
@@ -548,7 +548,7 @@ bool SwBoxAutoFormat::Save( SvStream& rStream, sal_uInt16 fileVersion ) const
RTL_TEXTENCODING_UTF8);
rStream.WriteUInt16( m_eSysLanguage ).WriteUInt16( m_eNumFormatLanguage );
- return 0 == rStream.GetError();
+ return ERRCODE_NONE == rStream.GetError();
}
bool SwBoxAutoFormat::SaveVersionNo( SvStream& rStream, sal_uInt16 fileVersion ) const
@@ -587,7 +587,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 )
@@ -965,7 +965,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)) )
@@ -1007,7 +1007,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 )
{
@@ -1051,7 +1051,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 )
{
@@ -1309,13 +1309,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 )
{
@@ -1349,7 +1349,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);
@@ -1387,7 +1387,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);
@@ -1398,7 +1398,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;
@@ -1407,7 +1407,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 (sal_uInt16 i = 1; bRet && i < m_pImpl->m_AutoFormats.size(); ++i)
{
diff --git a/sw/source/core/swg/SwXMLBlockExport.cxx b/sw/source/core/swg/SwXMLBlockExport.cxx
index 0a20e999790a..28ec716cfc2d 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 bd9af08c3cb7..e8194759671d 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -495,7 +495,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 09627bdf8985..ce41be8dc8b3 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -330,7 +330,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 d0cb168dc060..4092305115c9 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -344,7 +344,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 dead560dfb6f..96370c53e20b 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 5f334ad3361e..21d1ecc36afd 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -540,7 +540,7 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, SfxItemSet*& rpItemSet,
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);
@@ -550,7 +550,7 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, SfxItemSet*& rpItemSet,
for(nLevelB = 0; nLevelB < nMaxLevel; ++nLevelB)
{
rSt.ReadUChar( aLVL.aOfsNumsXCH[ nLevelB ] );
- if( 0 != rSt.GetError() )
+ if( ERRCODE_NONE != rSt.GetError() )
{
bLVLOkB = false;
break;
@@ -567,7 +567,7 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, SfxItemSet*& rpItemSet,
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. ggfs. PAPx einlesen und nach Einzug-Werten suchen
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index a6db457c61e0..105eb6e0d106 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -5499,7 +5499,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;
@@ -5792,7 +5792,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 ;
@@ -5847,7 +5847,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;
}
@@ -5886,7 +5886,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
@@ -6626,7 +6626,7 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd )
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 9d2772a32998..0bc5ad379175 100644
--- a/sw/source/uibase/config/uinums.cxx
+++ b/sw/source/uibase/config/uinums.cxx
@@ -60,7 +60,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 a404a206be21..cfa146c9d10d 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -880,7 +880,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
@@ -924,7 +924,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 4903d09d0446..439c8937ffa1 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -783,7 +783,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 dbb2cb51550f..049a780bda81 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -290,7 +290,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 31c4765f0304..22333883ef45 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 167db086a965..5388ff4897de 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -250,7 +250,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 b478bde6427a..ff9ec4e62e50 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 6844c9bf5f9b..e693b377bdd0 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -2450,7 +2450,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 )
@@ -2536,7 +2536,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 d22c61276813..916da88ca23b 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 e9dca4415f5f..e26fdbf58569 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1025,7 +1025,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 )
@@ -1048,7 +1048,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 6e1753805810..7e56c056f2c4 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -494,7 +494,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 05c11e4a3467..219598c9e9a3 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -721,7 +721,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 ae2973b7feef..d87ef406ca3d 100644
--- a/vcl/workben/icontest.cxx
+++ b/vcl/workben/icontest.cxx
@@ -96,7 +96,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;