diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-14 13:34:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-14 15:42:31 +0200 |
commit | a6aa57ff591fdf3d834a7e0b1e9e2ebad1d87c5c (patch) | |
tree | 3de1d4767963fd78bcf6f8a90a4e2467e3a2acc5 /sd | |
parent | 546c35519125a769755330c961c7b8fc61e24d89 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/html/pubdlg.cxx | 4 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptatom.cxx | 6 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptatom.hxx | 2 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 14 | ||||
-rw-r--r-- | sd/source/ui/dlg/navigatr.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviews1.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/viewshe2.cxx | 8 |
7 files changed, 19 insertions, 19 deletions
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; } /** |