diff options
author | Jelle van der Waa <jelle@vdwaa.nl> | 2013-06-18 12:05:03 +0200 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-06-18 17:33:46 +0000 |
commit | 84f1f1d149b6ba95aca8adb7e34b001e102f07fe (patch) | |
tree | cdf2ba0af70fc3ddb0536415d4bd8d5e51bbee22 | |
parent | caab53cf21bc38ead3927941795b3c8a1432589a (diff) |
fdo#43460 include,registry,svtools,svx,unodevtools: use isEmpty()
Change-Id: I6e35b91092239275694eec3666b076f7ff7e54f6
Reviewed-on: https://gerrit.libreoffice.org/4335
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
-rw-r--r-- | include/rtl/ustrbuf.hxx | 2 | ||||
-rw-r--r-- | registry/source/keyimpl.cxx | 2 | ||||
-rw-r--r-- | svtools/source/svhtml/parhtml.cxx | 12 | ||||
-rw-r--r-- | svtools/source/svrtf/parrtf.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/formcontroller.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdmodel.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdtrans.cxx | 2 | ||||
-rw-r--r-- | unodevtools/source/skeletonmaker/cppcompskeleton.cxx | 4 | ||||
-rw-r--r-- | unodevtools/source/skeletonmaker/javacompskeleton.cxx | 2 |
9 files changed, 19 insertions, 19 deletions
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx index b648714aad97..ec40448b60d4 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 05993dd6ff87..36d6cae7157a 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 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; diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 9a0ee3ed3da0..7145abb1e60f 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 2e702cce873a..886064ca105b 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 91e3f77a2f18..60710edb5229 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 435ee4d6d586..98166eec193c 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 b617eea614b4..86ba7051033a 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("|"); } |