diff options
author | Jelle van der Waa <jelle@vdwaa.nl> | 2013-06-16 13:51:32 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-06-16 15:56:43 +0000 |
commit | 040710161c507f6e4d0120cfb61d9d82bc6a0527 (patch) | |
tree | d857681a00bbf74ea914c9915a98f09d72f7c8c6 | |
parent | 4c3d2dcdadbcb8f2ffc2caab07d50a286341df96 (diff) |
fdo#43460 use isEmpty()
Change-Id: Ie33025fbd10f47efd6b97304b76b21166d4ee70e
Reviewed-on: https://gerrit.libreoffice.org/4307
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | vcl/generic/app/gensys.cxx | 8 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/field.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/field2.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/longcurr.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 12 | ||||
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 4 |
7 files changed, 16 insertions, 16 deletions
diff --git a/vcl/generic/app/gensys.cxx b/vcl/generic/app/gensys.cxx index c65f0e537e70..d07f6bea12cc 100644 --- a/vcl/generic/app/gensys.cxx +++ b/vcl/generic/app/gensys.cxx @@ -159,7 +159,7 @@ const char* SalGenericSystem::getFrameResName() * then use argv[0] stripped by directories */ static OStringBuffer aResName; - if( !aResName.getLength() ) + if( aResName.isEmpty() ) { int nArgs = osl_getCommandArgCount(); for( int n = 0; n < nArgs-1; n++ ) @@ -173,13 +173,13 @@ const char* SalGenericSystem::getFrameResName() break; } } - if( !aResName.getLength() ) + if( aResName.isEmpty() ) { const char* pEnv = getenv( "RESOURCE_NAME" ); if( pEnv && *pEnv ) aResName.append( pEnv ); } - if( !aResName.getLength() ) + if( aResName.isEmpty() ) aResName.append( OUStringToOString( utl::ConfigManager::getProductName().toAsciiLowerCase(), osl_getThreadTextEncoding())); } @@ -189,7 +189,7 @@ const char* SalGenericSystem::getFrameResName() const char* SalGenericSystem::getFrameClassName() { static OStringBuffer aClassName; - if( !aClassName.getLength() ) + if( aClassName.isEmpty() ) { OUString aIni, aProduct; rtl::Bootstrap::get( "BRAND_BASE_DIR", aIni ); diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 10b25dc94c6c..20c41a91be6a 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -2407,7 +2407,7 @@ void Edit::StateChanged( StateChangedType nType ) mnAlign = EDIT_ALIGN_RIGHT; else if ( nStyle & WB_CENTER ) mnAlign = EDIT_ALIGN_CENTER; - if ( maText.getLength() && ( mnAlign != nOldAlign ) ) + if ( !maText.isEmpty() && ( mnAlign != nOldAlign ) ) { ImplAlign(); Invalidate(); diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 38b800317ebe..b491ba53e3d7 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -1111,7 +1111,7 @@ static OUString ImplMetricGetUnitText(const OUString& rStr) aStr.insert(0, c); else { - if (aStr.getLength()) + if (!aStr.isEmpty()) break; } } diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index da08f7dfc383..1efc6294df1d 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -2212,7 +2212,7 @@ static bool ImplIsValidTimePortion( sal_Bool _bSkipInvalidCharacters, const OUSt { if ( !_bSkipInvalidCharacters ) { - if ( ( _rStr.getLength() > 2 ) || ( _rStr.getLength() < 1 ) || !ImplIsOnlyDigits( _rStr ) ) + if ( ( _rStr.getLength() > 2 ) || _rStr.isEmpty() || !ImplIsOnlyDigits( _rStr ) ) return false; } return true; diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx index 6f070afeccc8..9881521dd5bc 100644 --- a/vcl/source/control/longcurr.cxx +++ b/vcl/source/control/longcurr.cxx @@ -204,7 +204,7 @@ static bool ImplNumericGetValue( const XubString& rStr, BigInt& rValue, aStr2.remove(i, 1); } - if (!aStr1.Len() && !aStr2.getLength()) + if (!aStr1.Len() && aStr2.isEmpty()) return false; if ( !aStr1.Len() ) diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 7eedb3aeaf3a..e043ca67b6c9 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -2750,7 +2750,7 @@ OString PDFWriterImpl::emitStructureAttributes( PDFStructureElement& i_rEle ) } std::vector< sal_Int32 > aAttribObjects; - if( aLayout.getLength() ) + if( !aLayout.isEmpty() ) { aAttribObjects.push_back( createObject() ); updateObject( aAttribObjects.back() ); @@ -2762,7 +2762,7 @@ OString PDFWriterImpl::emitStructureAttributes( PDFStructureElement& i_rEle ) writeBuffer( aObj.getStr(), aObj.getLength() ); writeBuffer( aLayout.getStr(), aLayout.getLength() ); } - if( aList.getLength() ) + if( !aList.isEmpty() ) { aAttribObjects.push_back( createObject() ); updateObject( aAttribObjects.back() ); @@ -2774,7 +2774,7 @@ OString PDFWriterImpl::emitStructureAttributes( PDFStructureElement& i_rEle ) writeBuffer( aObj.getStr(), aObj.getLength() ); writeBuffer( aList.getStr(), aList.getLength() ); } - if( aTable.getLength() ) + if( !aTable.isEmpty() ) { aAttribObjects.push_back( createObject() ); updateObject( aAttribObjects.back() ); @@ -5556,7 +5556,7 @@ bool PDFWriterImpl::emitWidgetAnnotations() aLine.append( rWidget.m_nFlags ); aLine.append( "\n" ); } - if( aValue.getLength() ) + if( !aValue.isEmpty() ) { OString aVal = aValue.makeStringAndClear(); aLine.append( "/V " ); @@ -6856,7 +6856,7 @@ bool PDFWriterImpl::emitTrailer() } aLine.append( "> ]\n" ); } - if( aDocChecksum.getLength() ) + if( !aDocChecksum.isEmpty() ) { aLine.append( "/DocChecksum /" ); aLine.append( aDocChecksum.makeStringAndClear() ); @@ -10685,7 +10685,7 @@ void PDFWriterImpl::updateGraphicsState() // everything is up to date now m_aCurrentPDFState = m_aGraphicsStack.front(); - if( aLine.getLength() ) + if( !aLine.isEmpty() ) writeBuffer( aLine.getStr(), aLine.getLength() ); } diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index 6b464e9d1cf9..9a2f3234026e 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -176,7 +176,7 @@ namespace psp aKey.append( sal_Unicode( ':' ) ); aKey.append( i_rValue ); } - if( aKey.getLength() && !i_rTranslation.isEmpty() ) + if( !aKey.isEmpty() && !i_rTranslation.isEmpty() ) { OUString aK( aKey.makeStringAndClear() ); com::sun::star::lang::Locale aLoc; @@ -208,7 +208,7 @@ namespace psp aKey.append( sal_Unicode( ':' ) ); aKey.append( i_rValue ); } - if( aKey.getLength() ) + if( !aKey.isEmpty() ) { OUString aK( aKey.makeStringAndClear() ); key_translation_map::const_iterator it = m_aTranslations.find( aK ); |