From 84f1f1d149b6ba95aca8adb7e34b001e102f07fe Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Tue, 18 Jun 2013 12:05:03 +0200 Subject: fdo#43460 include,registry,svtools,svx,unodevtools: use isEmpty() Change-Id: I6e35b91092239275694eec3666b076f7ff7e54f6 Reviewed-on: https://gerrit.libreoffice.org/4335 Reviewed-by: Noel Power Tested-by: Noel Power --- svtools/source/svhtml/parhtml.cxx | 12 ++++++------ svtools/source/svrtf/parrtf.cxx | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'svtools') diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index a95ec7958b74..2430d729fcf3 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -648,7 +648,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak ) { // Restart with '&', the remainder is returned as // text token. - if( aToken.Len() || sTmpBuffer.getLength() ) + if( aToken.Len() || !sTmpBuffer.isEmpty() ) { // _GetNextChar() returns the previous text and // during the next execution a new character is read. @@ -808,7 +808,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak ) rInput.IsEof() ) || !IsParserWorking() ) { - if( sTmpBuffer.getLength() ) + if( !sTmpBuffer.isEmpty() ) aToken += String(sTmpBuffer.makeStringAndClear()); return HTML_TEXTTOKEN; } @@ -824,7 +824,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak ) nNextCh = GetNextChar(); } - if( sTmpBuffer.getLength() ) + if( !sTmpBuffer.isEmpty() ) aToken += String(sTmpBuffer.makeStringAndClear()); return HTML_TEXTTOKEN; @@ -1016,7 +1016,7 @@ int HTMLParser::_GetNextRawToken() if( rInput.IsEof() ) { bContinue = false; - if( aToken.Len() || sTmpBuffer.getLength() ) + if( aToken.Len() || !sTmpBuffer.isEmpty() ) { bEndTokenFound = true; } @@ -1036,7 +1036,7 @@ int HTMLParser::_GetNextRawToken() break; } - if( (!bContinue && sTmpBuffer.getLength() > 0L) || + if( (!bContinue && !sTmpBuffer.isEmpty()) || MAX_LEN == sTmpBuffer.getLength() ) aToken += String(sTmpBuffer.makeStringAndClear()); @@ -1119,7 +1119,7 @@ int HTMLParser::_GetNextToken() } while( '>' != nNextCh && '/' != nNextCh && !HTML_ISSPACE( nNextCh ) && IsParserWorking() && !rInput.IsEof() ); - if( sTmpBuffer.getLength() ) + if( !sTmpBuffer.isEmpty() ) aToken += String(sTmpBuffer.makeStringAndClear()); // Skip blanks diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx index f064a56e525b..0ca1c79bb57a 100644 --- a/svtools/source/svrtf/parrtf.cxx +++ b/svtools/source/svrtf/parrtf.cxx @@ -338,7 +338,7 @@ void SvRTFParser::ScanText( const sal_Unicode cBreak ) wchar_t __next=GetNextChar(); if (__next>0xFF) // fix for #i43933# and #i35653# { - if (aByteString.getLength()) + if (!aByteString.isEmpty()) aStrBuffer.Append(String(OStringToOUString(aByteString.makeStringAndClear(), GetSrcEncoding()))); aStrBuffer.Append((sal_Unicode)__next); @@ -373,7 +373,7 @@ void SvRTFParser::ScanText( const sal_Unicode cBreak ) bNextCh = false; - if (aByteString.getLength()) + if (!aByteString.isEmpty()) aStrBuffer.Append(String(OStringToOUString(aByteString.makeStringAndClear(), GetSrcEncoding()))); } break; -- cgit