include/rtl/ustrbuf.hxx | 2 +- registry/source/keyimpl.cxx | 2 +- svtools/source/svhtml/parhtml.cxx | 12 ++++++------ svtools/source/svrtf/parrtf.cxx | 4 ++-- svx/source/form/formcontroller.cxx | 4 ++-- svx/source/svdraw/svdmodel.cxx | 6 +++--- svx/source/svdraw/svdtrans.cxx | 2 +- unodevtools/source/skeletonmaker/cppcompskeleton.cxx | 4 ++-- unodevtools/source/skeletonmaker/javacompskeleton.cxx | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-)
New commits: commit 84f1f1d149b6ba95aca8adb7e34b001e102f07fe Author: Jelle van der Waa <je...@vdwaa.nl> Date: Tue Jun 18 12:05:03 2013 +0200 fdo#43460 include,registry,svtools,svx,unodevtools: use isEmpty() Change-Id: I6e35b91092239275694eec3666b076f7ff7e54f6 Reviewed-on: https://gerrit.libreoffice.org/4335 Reviewed-by: Noel Power <noel.po...@suse.com> Tested-by: Noel Power <noel.po...@suse.com> diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx index b648714..ec40448 100644 --- a/include/rtl/ustrbuf.hxx +++ b/include/rtl/ustrbuf.hxx @@ -421,7 +421,7 @@ public: */ OUStringBuffer & append(const OUStringBuffer &str) { - if(str.getLength() > 0) + if(!str.isEmpty()) { append( str.getStr(), str.getLength() ); } diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx index 05993dd..36d6cae 100644 --- a/registry/source/keyimpl.cxx +++ b/registry/source/keyimpl.cxx @@ -1043,7 +1043,7 @@ OStoreDirectory ORegKey::getStoreDir() OUString ORegKey::getFullPath(OUString const & path) const { OSL_ASSERT(!m_name.isEmpty() && !path.isEmpty()); OUStringBuffer b(m_name); - if (b.getLength() > 0 && b[b.getLength() - 1] == '/') { + if (!b.isEmpty() && b[b.getLength() - 1] == '/') { if (path[0] == '/') { b.append(path.getStr() + 1, path.getLength() - 1); } else { diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index a95ec79..2430d72 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 f064a56..0ca1c79 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; diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 9a0ee3e..7145abb 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -870,9 +870,9 @@ void FormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons aRowFilter.append( sCriteria ); } } - if ( aRowFilter.getLength() > 0 ) + if ( !aRowFilter.isEmpty() ) { - if ( aFilter.getLength() ) + if ( !aFilter.isEmpty() ) aFilter.appendAscii( " OR " ); aFilter.appendAscii( "( " ); diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 2e702cc..886064c 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -1315,11 +1315,11 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I if(!rLoc.isNumTrailingZeros()) { // Remove all trailing zeros. - while (aBuf.getLength() && aBuf[aBuf.getLength()-1] == sal_Unicode('0')) + while (!aBuf.isEmpty() && aBuf[aBuf.getLength()-1] == sal_Unicode('0')) aBuf.remove(aBuf.getLength()-1, 1); // Remove decimal if it's the last character. - if (aBuf.getLength() && aBuf[aBuf.getLength()-1] == cDec) + if (!aBuf.isEmpty() && aBuf[aBuf.getLength()-1] == cDec) aBuf.remove(aBuf.getLength()-1, 1); } @@ -1340,7 +1340,7 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I } } - if (!aBuf.getLength()) + if (aBuf.isEmpty()) aBuf.append(sal_Unicode('0')); if(bNegative) diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx index 91e3f77..60710ed 100644 --- a/svx/source/svdraw/svdtrans.cxx +++ b/svx/source/svdraw/svdtrans.cxx @@ -925,7 +925,7 @@ void SdrFormatter::TakeStr(long nVal, OUString& rStr) const } } - if(!aStr.getLength()) + if(aStr.isEmpty()) aStr.insert(aStr.getLength(), aNullCode); if(bNeg && (aStr.getLength() > 1 || aStr[0] != aNullCode[0])) diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx index 435ee4d..98166ee 100644 --- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx +++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx @@ -808,14 +808,14 @@ OString generateClassDefinition(std::ostream& o, } if (propinterfaces.find("com/sun/star/beans/XFastPropertySet") != propinterfaces.end()) { - if (buffer.getLength() > 0) + if (!buffer.isEmpty()) buffer.append(" | IMPLEMENTS_FAST_PROPERTY_SET"); else buffer.append("IMPLEMENTS_FAST_PROPERTY_SET"); } if (propinterfaces.find("com/sun/star/beans/XPropertyAccess") != propinterfaces.end()) { - if (buffer.getLength() > 0) + if (!buffer.isEmpty()) buffer.append(" | IMPLEMENTS_PROPERTY_ACCESS"); else buffer.append("IMPLEMENTS_PROPERTY_ACCESS"); diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx index b617eea..86ba705 100644 --- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx +++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx @@ -206,7 +206,7 @@ bool checkAttribute( for (sal_uInt16 i = 0; i < 9; i++) { if (attribute & attributes[i]) { - if (attributeValue.getLength() > 0) { + if (!attributeValue.isEmpty()) { cast |= true; attributeValue.append("|"); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits