diff options
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/ios2met/ios2met.cxx | 14 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 8 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 42 |
3 files changed, 32 insertions, 32 deletions
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 ); |