[PATCH] fdo#43460 use isEmpty()
Jelle van der Waa (via Code Review)
gerrit at gerrit.libreoffice.org
Sun Jun 16 04:53:55 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/4307
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/07/4307/1
fdo#43460 use isEmpty()
Change-Id: Ie33025fbd10f47efd6b97304b76b21166d4ee70e
---
M vcl/generic/app/gensys.cxx
M vcl/source/control/edit.cxx
M vcl/source/control/field.cxx
M vcl/source/control/field2.cxx
M vcl/source/control/longcurr.cxx
M vcl/source/gdi/pdfwriter_impl.cxx
M vcl/unx/generic/printer/ppdparser.cxx
7 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/vcl/generic/app/gensys.cxx b/vcl/generic/app/gensys.cxx
index c65f0e5..d07f6be 100644
--- a/vcl/generic/app/gensys.cxx
+++ b/vcl/generic/app/gensys.cxx
@@ -159,7 +159,7 @@
* 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 @@
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::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 10b25dc..9fff024 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2407,7 +2407,7 @@
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 38b8003..b491ba5 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1111,7 +1111,7 @@
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 da08f7d..1efc629 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -2212,7 +2212,7 @@
{
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 6f070af..9881521 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -204,7 +204,7 @@
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 ed69f76..d827406 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2750,7 +2750,7 @@
}
std::vector< sal_Int32 > aAttribObjects;
- if( aLayout.getLength() )
+ if( !aLayout.isEmpty() )
{
aAttribObjects.push_back( createObject() );
updateObject( aAttribObjects.back() );
@@ -2762,7 +2762,7 @@
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 @@
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 @@
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 @@
}
aLine.append( "> ]\n" );
}
- if( aDocChecksum.getLength() )
+ if( !aDocChecksum.isEmpty() )
{
aLine.append( "/DocChecksum /" );
aLine.append( aDocChecksum.makeStringAndClear() );
@@ -10687,7 +10687,7 @@
// 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 6b464e9..9a2f323 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -176,7 +176,7 @@
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 @@
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 );
--
To view, visit https://gerrit.libreoffice.org/4307
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie33025fbd10f47efd6b97304b76b21166d4ee70e
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Jelle van der Waa <jelle at vdwaa.nl>
More information about the LibreOffice
mailing list