From 2161d04688be77112c281a1ada5263b963677c43 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 22 Nov 2017 09:47:52 +0000 Subject: drop duplicate method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Idadd0a64e41cd02f5167b275081c3576a6224b12 Reviewed-on: https://gerrit.libreoffice.org/45075 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- vcl/source/filter/graphicfilter2.cxx | 10 +++++----- vcl/source/filter/igif/gifread.cxx | 8 ++++---- vcl/source/filter/ipdf/pdfdocument.cxx | 30 +++++++++++++++--------------- vcl/source/gdi/gdimtf.cxx | 2 +- vcl/source/gdi/impgraph.cxx | 2 +- vcl/source/gdi/pngread.cxx | 4 ++-- vcl/source/gdi/regionband.cxx | 2 +- vcl/unx/generic/print/common_gfx.cxx | 2 +- vcl/unx/generic/printer/jobdata.cxx | 2 +- vcl/unx/generic/printer/ppdparser.cxx | 8 ++++---- 10 files changed, 35 insertions(+), 35 deletions(-) (limited to 'vcl') diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx index aa4925d81a81..2f846029bb9b 100644 --- a/vcl/source/filter/graphicfilter2.cxx +++ b/vcl/source/filter/graphicfilter2.cxx @@ -221,14 +221,14 @@ sal_uInt8 ImpDetectJPG_GetNextMarker( SvStream& rStm ) do { rStm.ReadUChar( nByte ); - if ( rStm.IsEof() || rStm.GetError() ) // as 0 is not allowed as marker, + if ( rStm.eof() || rStm.GetError() ) // as 0 is not allowed as marker, return 0; // we can use it as errorcode } while ( nByte != 0xff ); do { rStm.ReadUChar( nByte ); - if ( rStm.IsEof() || rStm.GetError() ) + if ( rStm.eof() || rStm.GetError() ) return 0; } while( nByte == 0xff ); @@ -263,7 +263,7 @@ bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, bool bExtendedInfo ) bool bScanFailure = false; bool bScanFinished = false; - while( !bScanFailure && !bScanFinished && !rStm.IsEof() && !rStm.GetError() ) + while( !bScanFailure && !bScanFinished && !rStm.eof() && !rStm.GetError() ) { sal_uInt8 nMarker = ImpDetectJPG_GetNextMarker( rStm ); switch( nMarker ) @@ -555,7 +555,7 @@ bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, bool bExtendedInfo ) rStm.ReadUInt32( nLen32 ); rStm.ReadUInt32( nTemp32 ); while( ( nTemp32 != 0x70485973 ) && ( nTemp32 != 0x49444154 ) - && !rStm.IsEof() && !rStm.GetError() ) + && !rStm.eof() && !rStm.GetError() ) { rStm.SeekRel( 4 + nLen32 ); rStm.ReadUInt32( nLen32 ); @@ -563,7 +563,7 @@ bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, bool bExtendedInfo ) } if ( nTemp32 == 0x70485973 - && !rStm.IsEof() && !rStm.GetError() ) + && !rStm.eof() && !rStm.GetError() ) { sal_uLong nXRes; sal_uLong nYRes; diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index bcdfa1d252e8..9695f09d8784 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -413,7 +413,7 @@ bool GIFReader::ReadExtension() if ( bOverreadDataBlocks ) { bRet = true; - while( cSize && bStatus && !rIStm.IsEof() ) + while( cSize && bStatus && !rIStm.eof() ) { sal_uInt16 nCount = (sal_uInt16) cSize + 1; const sal_uInt64 nMaxPossible = rIStm.remainingSize(); @@ -491,7 +491,7 @@ sal_uLong GIFReader::ReadNextBlock() rIStm.ReadUChar( cBlockSize ); - if ( rIStm.IsEof() ) + if ( rIStm.eof() ) nRet = 4; else if ( NO_PENDING( rIStm ) ) { @@ -717,7 +717,7 @@ bool GIFReader::ProcessGIF() rIStm.ReadUChar( cByte ); - if( rIStm.IsEof() ) + if( rIStm.eof() ) eActAction = END_READING; else if( NO_PENDING( rIStm ) ) { @@ -775,7 +775,7 @@ bool GIFReader::ProcessGIF() rIStm.ReadUChar( cDataSize ); - if( rIStm.IsEof() ) + if( rIStm.eof() ) eActAction = ABORT_READING; else if( cDataSize > 12 ) bStatus = false; diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx b/vcl/source/filter/ipdf/pdfdocument.cxx index 7689597699a4..56e90cf7adf3 100644 --- a/vcl/source/filter/ipdf/pdfdocument.cxx +++ b/vcl/source/filter/ipdf/pdfdocument.cxx @@ -874,7 +874,7 @@ bool PDFDocument::Tokenize(SvStream& rStream, TokenizeMode eMode, std::vector< s { char ch; rStream.ReadChar(ch); - if (rStream.IsEof()) + if (rStream.eof()) break; switch (ch) @@ -1286,13 +1286,13 @@ OString PDFDocument::ReadKeyword(SvStream& rStream) OStringBuffer aBuf; char ch; rStream.ReadChar(ch); - if (rStream.IsEof()) + if (rStream.eof()) return OString(); while (rtl::isAsciiAlpha(static_cast(ch))) { aBuf.append(ch); rStream.ReadChar(ch); - if (rStream.IsEof()) + if (rStream.eof()) return aBuf.toString(); } rStream.SeekRel(-1); @@ -1334,7 +1334,7 @@ size_t PDFDocument::FindStartXRef(SvStream& rStream) } rStream.SeekRel(itLastValid - aBuf.begin() + aPrefix.getLength()); - if (rStream.IsEof()) + if (rStream.eof()) { SAL_WARN("vcl.filter", "PDFDocument::FindStartXRef: unexpected end of stream after startxref"); return 0; @@ -1702,7 +1702,7 @@ void PDFDocument::SkipWhitespace(SvStream& rStream) while (true) { rStream.ReadChar(ch); - if (rStream.IsEof()) + if (rStream.eof()) break; if (!rtl::isAsciiWhiteSpace(static_cast(ch))) @@ -1720,7 +1720,7 @@ void PDFDocument::SkipLineBreaks(SvStream& rStream) while (true) { rStream.ReadChar(ch); - if (rStream.IsEof()) + if (rStream.eof()) break; if (ch != '\n' && ch != '\r') @@ -1899,7 +1899,7 @@ bool PDFCommentElement::Read(SvStream& rStream) rStream.ReadChar(ch); while (true) { - if (ch == '\n' || ch == '\r' || rStream.IsEof()) + if (ch == '\n' || ch == '\r' || rStream.eof()) { m_aComment = aBuf.makeStringAndClear(); @@ -1924,7 +1924,7 @@ bool PDFNumberElement::Read(SvStream& rStream) m_nOffset = rStream.Tell(); char ch; rStream.ReadChar(ch); - if (rStream.IsEof()) + if (rStream.eof()) { return false; } @@ -1934,7 +1934,7 @@ bool PDFNumberElement::Read(SvStream& rStream) rStream.SeekRel(-1); return false; } - while (!rStream.IsEof()) + while (!rStream.eof()) { if (!rtl::isAsciiDigit(static_cast(ch)) && ch != '-' && ch != '.') @@ -1988,7 +1988,7 @@ bool PDFHexStringElement::Read(SvStream& rStream) rStream.ReadChar(ch); OStringBuffer aBuf; - while (!rStream.IsEof()) + while (!rStream.eof()) { if (ch == '>') { @@ -2022,7 +2022,7 @@ bool PDFLiteralStringElement::Read(SvStream& rStream) rStream.ReadChar(ch); OStringBuffer aBuf; - while (!rStream.IsEof()) + while (!rStream.eof()) { if (ch == ')' && nPrevCh != '\\') { @@ -2797,7 +2797,7 @@ bool PDFDictionaryElement::Read(SvStream& rStream) return false; } - if (rStream.IsEof()) + if (rStream.eof()) { SAL_WARN("vcl.filter", "PDFDictionaryElement::Read: unexpected end of file"); return false; @@ -2835,7 +2835,7 @@ bool PDFEndDictionaryElement::Read(SvStream& rStream) return false; } - if (rStream.IsEof()) + if (rStream.eof()) { SAL_WARN("vcl.filter", "PDFEndDictionaryElement::Read: unexpected end of file"); return false; @@ -2866,7 +2866,7 @@ bool PDFNameElement::Read(SvStream& rStream) } m_nLocation = rStream.Tell(); - if (rStream.IsEof()) + if (rStream.eof()) { SAL_WARN("vcl.filter", "PDFNameElement::Read: unexpected end of file"); return false; @@ -2875,7 +2875,7 @@ bool PDFNameElement::Read(SvStream& rStream) // Read till the first white-space. OStringBuffer aBuf; rStream.ReadChar(ch); - while (!rStream.IsEof()) + while (!rStream.eof()) { if (rtl::isAsciiWhiteSpace(static_cast(ch)) || ch == '/' || ch == '[' || ch == ']' || ch == '<' || ch == '>' || ch == '(') diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index ca9df62fdc36..a9c24b8c4843 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2703,7 +2703,7 @@ SvStream& ReadGDIMetaFile( SvStream& rIStm, GDIMetaFile& rGDIMetaFile ) ImplMetaReadData aReadData; aReadData.meActualCharSet = rIStm.GetStreamCharSet(); - for( sal_uInt32 nAction = 0; ( nAction < nCount ) && !rIStm.IsEof(); nAction++ ) + for( sal_uInt32 nAction = 0; ( nAction < nCount ) && !rIStm.eof(); nAction++ ) { MetaAction* pAction = MetaAction::ReadMetaAction( rIStm, &aReadData ); if( pAction ) diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 485a38b378e7..5ee08a2f21c7 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1444,7 +1444,7 @@ void ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic ) // reading which will create VDevs and other stuff, just to // read nothing. CAUTION: Eof is only true AFTER reading another // byte, a speciality of SvMemoryStream (!) - if (rIStm.GetError() || rIStm.IsEof()) + if (rIStm.GetError() || rIStm.eof()) return; if (NATIVE_FORMAT_50 == nTmp) diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index 619a12aaa0cd..ff34bd129eb6 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -263,7 +263,7 @@ bool PNGReaderImpl::ReadNextChunk() // get the next chunk from the stream // unless we are at the end of the PNG stream - if( mrPNGStream.IsEof() || (mrPNGStream.GetError() != ERRCODE_NONE) ) + if( mrPNGStream.eof() || (mrPNGStream.GetError() != ERRCODE_NONE) ) return false; if( !maChunkSeq.empty() && (maChunkSeq.back().nType == PNGCHUNK_IEND) ) return false; @@ -289,7 +289,7 @@ bool PNGReaderImpl::ReadNextChunk() sal_uInt32 nCRC32 = rtl_crc32( 0, &nChunkType, 4 ); // read the chunk data and check the CRC - if( mnChunkLen && !mrPNGStream.IsEof() ) + if( mnChunkLen && !mrPNGStream.eof() ) { rChunkData.aData.resize( mnChunkLen ); diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx index 2e54cd89194e..e14029548202 100644 --- a/vcl/source/gdi/regionband.cxx +++ b/vcl/source/gdi/regionband.cxx @@ -255,7 +255,7 @@ void RegionBand::load(SvStream& rIStrm) } } - if( rIStrm.IsEof() ) + if( rIStrm.eof() ) { OSL_ENSURE(false, "premature end of region stream" ); implReset(); diff --git a/vcl/unx/generic/print/common_gfx.cxx b/vcl/unx/generic/print/common_gfx.cxx index 2dcea675dcf1..40894081cbd1 100644 --- a/vcl/unx/generic/print/common_gfx.cxx +++ b/vcl/unx/generic/print/common_gfx.cxx @@ -1067,7 +1067,7 @@ PrinterGfx::DrawEPS( const tools::Rectangle& rBoundingBox, void* pPtr, sal_uInt3 OString aDocTitle; double fLeft = 0, fRight = 0, fTop = 0, fBottom = 0; bool bEndComments = false; - while( ! aStream.IsEof() + while( ! aStream.eof() && ( ( fLeft == 0 && fRight == 0 && fTop == 0 && fBottom == 0 ) || ( aDocTitle.isEmpty() && !bEndComments ) ) ) diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx index 3091063c9a98..b5a6b113f9d6 100644 --- a/vcl/unx/generic/printer/jobdata.cxx +++ b/vcl/unx/generic/printer/jobdata.cxx @@ -211,7 +211,7 @@ bool JobData::constructFromStreamBuffer( const void* pData, sal_uInt32 bytes, Jo const char pslevelEquals[] = "pslevel="; const char pdfdeviceEquals[] = "pdfdevice="; - while( ! aStream.IsEof() ) + while( ! aStream.eof() ) { aStream.ReadLine( aLine ); if (aLine.startsWith("JobData")) diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index a2d8f45c8c42..b81359c8fea5 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -269,7 +269,7 @@ public: ~PPDDecompressStream(); bool IsOpen() const; - bool IsEof() const; + bool eof() const; OString ReadLine(); void Open( const OUString& i_rFile ); void Close(); @@ -345,9 +345,9 @@ bool PPDDecompressStream::IsOpen() const return (mpMemStream || (mpFileStream && mpFileStream->IsOpen())); } -bool PPDDecompressStream::IsEof() const +bool PPDDecompressStream::eof() const { - return ( mpMemStream ? mpMemStream->IsEof() : ( mpFileStream == nullptr || mpFileStream->IsEof() ) ); + return ( mpMemStream ? mpMemStream->eof() : ( mpFileStream == nullptr || mpFileStream->eof() ) ); } OString PPDDecompressStream::ReadLine() @@ -726,7 +726,7 @@ PPDParser::PPDParser( const OUString& rFile ) : if( aStream.IsOpen() ) { bool bLanguageEncoding = false; - while( ! aStream.IsEof() ) + while( ! aStream.eof() ) { OString aCurLine = aStream.ReadLine(); if( aCurLine.startsWith("*") ) -- cgit