-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Please find attached a partial fix for Easy Hack FDO43460
Part IX
Module
connectivity
(this one is quite big)
- --
Olivier Hallot
Founder, Board of Directors Member - The Document Foundation
LibreOffice translation leader for Brazilian Portuguese
+55-21-8822-8812
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJO6Ur1AAoJEJp3R7nH3vLxvAoH+QF6yPfk3q3Q93M3c0g2PsJB
aYHavzslLuAKqBrRCEEwk6R355z2VPz2ap7ScnpWBBuEqjBJc83LrT3hChoAIQYW
soWU1Dzltam5zZ0byPslJt0At0kKqD0FpgZluBf1XOWGWhbJtiBIpyx+4Z2gCH/n
JhVIu+b5Jwv9RuNjDzABZJLikmt6rFrpkMOnniEodK2VLAaunk1HIaZ1AhGu1oyk
10P0spcz0ubHFHQ5JcmksyVIzsBfR9D9lfMWen1ngwzfL0gKrDLZGOJkltuB3O9f
zL+TIsMUMBbFdXrXjPO6tdMWns38ZYThrtC/W3kg+xQ47vJ6TeOeHlAFA/kUL20=
=4xeY
-----END PGP SIGNATURE-----
From 45e9ea7a3690bbeae170800b8263cfbdca405e4e Mon Sep 17 00:00:00 2001
From: Olivier Hallot <olivier.hallot@alta.org.br>
Date: Wed, 14 Dec 2011 23:13:36 -0200
Subject: [PATCH] Fix for fdo43460 Part IX getLength() to isEmpty()
Part IX
Module
connectivity
---
connectivity/source/commontools/CommonTools.cxx | 4 +-
.../source/commontools/ConnectionWrapper.cxx | 6 +-
connectivity/source/commontools/DateConversion.cxx | 2 +-
connectivity/source/commontools/DriversConfig.cxx | 10 ++--
connectivity/source/commontools/TIndexes.cxx | 4 +-
connectivity/source/commontools/TKey.cxx | 2 +-
connectivity/source/commontools/TKeys.cxx | 2 +-
connectivity/source/commontools/TTableHelper.cxx | 14 ++--
connectivity/source/commontools/dbcharset.cxx | 2 +-
connectivity/source/commontools/dbconversion.cxx | 2 +-
connectivity/source/commontools/dbtools.cxx | 26 ++++----
connectivity/source/commontools/dbtools2.cxx | 24 ++++----
connectivity/source/commontools/filtermanager.cxx | 4 +-
connectivity/source/commontools/parameters.cxx | 4 +-
connectivity/source/commontools/predicateinput.cxx | 10 ++--
connectivity/source/commontools/sqlerror.cxx | 4 +-
.../source/commontools/statementcomposer.cxx | 6 +-
connectivity/source/drivers/calc/CConnection.cxx | 2 +-
connectivity/source/drivers/calc/CTable.cxx | 2 +-
connectivity/source/drivers/dbase/DTable.cxx | 2 +-
connectivity/source/drivers/dbase/dindexnode.cxx | 6 +-
connectivity/source/drivers/file/FConnection.cxx | 4 +-
.../source/drivers/file/FDatabaseMetaData.cxx | 2 +-
.../source/drivers/file/FPreparedStatement.cxx | 2 +-
connectivity/source/drivers/flat/ETable.cxx | 2 +-
connectivity/source/drivers/hsqldb/HDriver.cxx | 10 ++--
connectivity/source/drivers/hsqldb/HTable.cxx | 6 +-
connectivity/source/drivers/hsqldb/HTables.cxx | 2 +-
connectivity/source/drivers/hsqldb/HTools.cxx | 4 +-
connectivity/source/drivers/hsqldb/HUser.cxx | 18 +++---
connectivity/source/drivers/hsqldb/HUsers.cxx | 2 +-
.../source/drivers/jdbc/DatabaseMetaData.cxx | 18 +++---
connectivity/source/drivers/jdbc/JConnection.cxx | 8 +-
connectivity/source/drivers/jdbc/JStatement.cxx | 2 +-
connectivity/source/drivers/jdbc/Object.cxx | 4 +-
.../source/drivers/jdbc/PreparedStatement.cxx | 2 +-
connectivity/source/drivers/mozab/MColumnAlias.cxx | 2 +-
connectivity/source/drivers/mozab/MConnection.cxx | 18 +++---
connectivity/source/drivers/mozab/MDriver.cxx | 2 +-
.../source/drivers/mozab/MPreparedStatement.cxx | 2 +-
.../drivers/mozab/bootstrap/MMozillaBootstrap.cxx | 2 +-
.../source/drivers/mozab/bootstrap/MNSFolders.cxx | 2 +-
.../drivers/mozab/bootstrap/MNSINIParser.cxx | 4 +-
.../drivers/mozab/bootstrap/MNSProfileDiscover.cxx | 10 ++--
.../drivers/mozab/bootstrap/MNSProfileManager.cxx | 2 +-
.../mozab/mozillasrc/MDatabaseMetaDataHelper.cxx | 10 ++--
.../source/drivers/mozab/mozillasrc/MQuery.cxx | 2 +-
connectivity/source/drivers/mysql/YDriver.cxx | 2 +-
connectivity/source/drivers/mysql/YTable.cxx | 8 +-
connectivity/source/drivers/mysql/YTables.cxx | 4 +-
connectivity/source/drivers/mysql/YUser.cxx | 18 +++---
connectivity/source/drivers/mysql/YUsers.cxx | 2 +-
.../source/drivers/odbcbase/ODatabaseMetaData.cxx | 2 +-
.../odbcbase/ODatabaseMetaDataResultSet.cxx | 68 ++++++++++----------
.../source/drivers/odbcbase/OStatement.cxx | 2 +-
connectivity/source/parse/PColumn.cxx | 4 +-
connectivity/source/parse/sqliterator.cxx | 42 ++++++------
connectivity/source/parse/sqlnode.cxx | 16 ++--
connectivity/source/sdbcx/VCollection.cxx | 4 +-
connectivity/source/sdbcx/VTable.cxx | 4 +-
60 files changed, 228 insertions(+), 228 deletions(-)
diff --git a/connectivity/source/commontools/CommonTools.cxx
b/connectivity/source/commontools/CommonTools.cxx
index 366962e..63a31e1 100644
--- a/connectivity/source/commontools/CommonTools.cxx
+++ b/connectivity/source/commontools/CommonTools.cxx
@@ -321,7 +321,7 @@ sal_Bool isValidSQLName(const ::rtl::OUString& rName,const ::rtl::OUString& _rSp
if(!isCharOk(*pStr,_rSpecials))
return sal_False;
- if ( rName.getLength()
+ if ( !rName.isEmpty()
&& ( (rName.toChar() == '_')
|| ( (rName.toChar() >= '0')
&& (rName.toChar() <= '9')
@@ -362,7 +362,7 @@ sal_Bool isValidSQLName(const ::rtl::OUString& rName,const ::rtl::OUString& _rSp
::rtl::OUString quoteName(const ::rtl::OUString& _rQuote, const ::rtl::OUString& _rName)
{
::rtl::OUString sName = _rName;
- if(_rQuote.getLength() && _rQuote.toChar() != ' ')
+ if( !_rQuote.isEmpty() && _rQuote.toChar() != ' ')
sName = _rQuote + _rName + _rQuote;
return sName;
}
diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx
b/connectivity/source/commontools/ConnectionWrapper.cxx
index 91fb718..d9a61f6 100644
--- a/connectivity/source/commontools/ConnectionWrapper.cxx
+++ b/connectivity/source/commontools/ConnectionWrapper.cxx
@@ -214,9 +214,9 @@ void OConnectionWrapper::createUniqueId( const ::rtl::OUString& _rURL
// first we create the digest we want to have
rtlDigest aDigest = rtl_digest_create( rtl_Digest_AlgorithmSHA1 );
rtl_digest_update(aDigest,_rURL.getStr(),_rURL.getLength()*sizeof(sal_Unicode));
- if ( _rUserName.getLength() )
+ if ( !_rUserName.isEmpty() )
rtl_digest_update(aDigest,_rUserName.getStr(),_rUserName.getLength()*sizeof(sal_Unicode));
- if ( _rPassword.getLength() )
+ if ( !_rPassword.isEmpty() )
rtl_digest_update(aDigest,_rPassword.getStr(),_rPassword.getLength()*sizeof(sal_Unicode));
// now we need to sort the properties
PropertyValue* pBegin = _rInfo.getArray();
@@ -248,7 +248,7 @@ void OConnectionWrapper::createUniqueId( const ::rtl::OUString& _rURL
}
}
}
- if ( sValue.getLength() > 0 )
+ if ( !sValue.isEmpty() )
{
// we don't have to convert this into UTF8 because we don't store on a file system
rtl_digest_update(aDigest,sValue.getStr(),sValue.getLength()*sizeof(sal_Unicode));
diff --git a/connectivity/source/commontools/DateConversion.cxx
b/connectivity/source/commontools/DateConversion.cxx
index e4172aa6..90b5f07 100644
--- a/connectivity/source/commontools/DateConversion.cxx
+++ b/connectivity/source/commontools/DateConversion.cxx
@@ -251,7 +251,7 @@ void DBTypeConversion::setValue(const Reference<XColumnUpdate>& xVariant,
sal_Int16 nFieldType,
sal_Int16 nKeyType)
throw(::com::sun::star::lang::IllegalArgumentException)
{
- if (rString.getLength())
+ if (!rString.isEmpty())
{
// Does the String need to be formatted?
sal_Int16 nTypeClass = nKeyType & ~NumberFormat::DEFINED;
diff --git a/connectivity/source/commontools/DriversConfig.cxx
b/connectivity/source/commontools/DriversConfig.cxx
index cc19bce..29d1de1 100644
--- a/connectivity/source/commontools/DriversConfig.cxx
+++ b/connectivity/source/commontools/DriversConfig.cxx
@@ -80,18 +80,18 @@ namespace
static const ::rtl::OUString s_sMetaData(RTL_CONSTASCII_USTRINGPARAM("MetaData"));
::rtl::OUString sParentURLPattern;
aURLPatternNode.getNodeValue(s_sParentURLPattern) >>= sParentURLPattern;
- if ( sParentURLPattern.getLength() )
+ if ( !sParentURLPattern.isEmpty() )
lcl_readURLPatternNode(_aInstalled,sParentURLPattern,_rInstalledDriver);
::rtl::OUString sDriverFactory;
aURLPatternNode.getNodeValue(s_sDriver) >>= sDriverFactory;
- if ( sDriverFactory.getLength() )
+ if ( !sDriverFactory.isEmpty() )
_rInstalledDriver.sDriverFactory = sDriverFactory;
::rtl::OUString sDriverTypeDisplayName;
aURLPatternNode.getNodeValue(s_sDriverTypeDisplayName) >>= sDriverTypeDisplayName;
- OSL_ENSURE(sDriverTypeDisplayName.getLength(),"No valid DriverTypeDisplayName
property!");
- if ( sDriverTypeDisplayName.getLength() )
+ OSL_ENSURE(!sDriverTypeDisplayName.isEmpty(),"No valid DriverTypeDisplayName
property!");
+ if ( !sDriverTypeDisplayName.isEmpty() )
_rInstalledDriver.sDriverTypeDisplayName = sDriverTypeDisplayName;
lcl_fillValues(aURLPatternNode,s_sProperties,_rInstalledDriver.aProperties);
@@ -124,7 +124,7 @@ void DriversConfigImpl::Load(const uno::Reference< lang::XMultiServiceFactory >&
{
TInstalledDriver aInstalledDriver;
lcl_readURLPatternNode(m_aInstalled,*pPatternIter,aInstalledDriver);
- if ( aInstalledDriver.sDriverFactory.getLength() )
+ if ( !aInstalledDriver.sDriverFactory.isEmpty() )
m_aDrivers.insert(TInstalledDrivers::value_type(*pPatternIter,aInstalledDriver));
}
} // if ( m_aInstalled.isValid() )
diff --git a/connectivity/source/commontools/TIndexes.cxx
b/connectivity/source/commontools/TIndexes.cxx
index 26904c5..246cad2 100644
--- a/connectivity/source/commontools/TIndexes.cxx
+++ b/connectivity/source/commontools/TIndexes.cxx
@@ -89,7 +89,7 @@ sdbcx::ObjectType OIndexesHelper::createObject(const ::rtl::OUString& _rName)
while( xResult->next() )
{
sal_Bool bUnique = !xRow->getBoolean(4);
- if((!aQualifier.getLength() || xRow->getString(5) == aQualifier ) &&
xRow->getString(6) == aName)
+ if((aQualifier.isEmpty() || xRow->getString(5) == aQualifier ) && xRow->getString(6)
== aName)
{
sal_Int32 nClustered = xRow->getShort(7);
sal_Bool bPrimarKeyIndex = sal_False;
@@ -160,7 +160,7 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const ::rtl::OUString& _rForName
::rtl::OUString aComposedName;
aComposedName =
dbtools::composeTableName(m_pTable->getMetaData(),aCatalog,aSchema,aTable,sal_True,::dbtools::eInIndexDefinitions);
- if ( _rForName.getLength() )
+ if (!_rForName.isEmpty() )
{
aSql.append( ::dbtools::quoteName( aQuote, _rForName ) );
aSql.appendAscii(" ON ");
diff --git a/connectivity/source/commontools/TKey.cxx b/connectivity/source/commontools/TKey.cxx
index f02438d..606a8bf 100644
--- a/connectivity/source/commontools/TKey.cxx
+++ b/connectivity/source/commontools/TKey.cxx
@@ -74,7 +74,7 @@ void OTableKeyHelper::refreshColumns()
m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>=
aSchema;
m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable;
- if ( m_Name.getLength() ) // foreign key
+ if ( !m_Name.isEmpty() ) // foreign key
{
Reference< XResultSet > xResult =
m_pTable->getMetaData()->getImportedKeys(m_pTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_CATALOGNAME)),
diff --git a/connectivity/source/commontools/TKeys.cxx b/connectivity/source/commontools/TKeys.cxx
index 75f7170..7e6734c 100644
--- a/connectivity/source/commontools/TKeys.cxx
+++ b/connectivity/source/commontools/TKeys.cxx
@@ -64,7 +64,7 @@ sdbcx::ObjectType OKeysHelper::createObject(const ::rtl::OUString& _rName)
{
sdbcx::ObjectType xRet = NULL;
- if(_rName.getLength())
+ if(!_rName.isEmpty())
{
OTableKeyHelper* pRet = new
OTableKeyHelper(m_pTable,_rName,m_pTable->getKeyProperties(_rName));
xRet = pRet;
diff --git a/connectivity/source/commontools/TTableHelper.cxx
b/connectivity/source/commontools/TTableHelper.cxx
index 03b9c88..0890dd9 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -272,7 +272,7 @@ void OTableHelper::refreshColumns()
if(!isNew())
{
Any aCatalog;
- if ( m_CatalogName.getLength() )
+ if ( !m_CatalogName.isEmpty() )
aCatalog <<= m_CatalogName;
::utl::SharedUNOComponent< XResultSet > xResult( getMetaData()->getColumns(
@@ -330,7 +330,7 @@ const ColumnDesc* OTableHelper::getColumnDescription(const ::rtl::OUString& _sNa
void OTableHelper::refreshPrimaryKeys(TStringVector& _rNames)
{
Any aCatalog;
- if ( m_CatalogName.getLength() )
+ if ( !m_CatalogName.isEmpty() )
aCatalog <<= m_CatalogName;
Reference< XResultSet > xResult = getMetaData()->getPrimaryKeys(aCatalog,m_SchemaName,m_Name);
@@ -359,7 +359,7 @@ void OTableHelper::refreshPrimaryKeys(TStringVector& _rNames)
void OTableHelper::refreshForeignKeys(TStringVector& _rNames)
{
Any aCatalog;
- if ( m_CatalogName.getLength() )
+ if ( !m_CatalogName.isEmpty() )
aCatalog <<= m_CatalogName;
Reference< XResultSet > xResult = getMetaData()->getImportedKeys(aCatalog,m_SchemaName,m_Name);
Reference< XRow > xRow(xResult,UNO_QUERY);
@@ -387,7 +387,7 @@ void OTableHelper::refreshForeignKeys(TStringVector& _rNames)
}
- if ( sFkName.getLength() && !xRow->wasNull() )
+ if ( !sFkName.isEmpty() && !xRow->wasNull() )
{
if ( sOldFKName != sFkName )
{
@@ -446,7 +446,7 @@ void OTableHelper::refreshIndexes()
{
// fill indexes
Any aCatalog;
- if ( m_CatalogName.getLength() )
+ if ( !m_CatalogName.isEmpty() )
aCatalog <<= m_CatalogName;
Reference< XResultSet > xResult =
getMetaData()->getIndexInfo(aCatalog,m_SchemaName,m_Name,sal_False,sal_False);
@@ -459,10 +459,10 @@ void OTableHelper::refreshIndexes()
while( xResult->next() )
{
aName = xRow->getString(5);
- if(aName.getLength())
+ if(!aName.isEmpty())
aName += sCatalogSep;
aName += xRow->getString(6);
- if ( aName.getLength() )
+ if ( !aName.isEmpty() )
{
// don't insert the name if the last one we inserted was the same
if (sPreviousRoundName != aName)
diff --git a/connectivity/source/commontools/dbcharset.cxx
b/connectivity/source/commontools/dbcharset.cxx
index a88031c..87b78c4 100644
--- a/connectivity/source/commontools/dbcharset.cxx
+++ b/connectivity/source/commontools/dbcharset.cxx
@@ -113,7 +113,7 @@ namespace dbtools
ensureConstructed( );
rtl_TextEncoding eEncoding = RTL_TEXTENCODING_DONTKNOW;
- if ( _rIanaName.getLength() )
+ if ( !_rIanaName.isEmpty() )
{
// byte string conversion
::rtl::OString sMimeByteString( _rIanaName.getStr(), _rIanaName.getLength(),
RTL_TEXTENCODING_ASCII_US );
diff --git a/connectivity/source/commontools/dbconversion.cxx
b/connectivity/source/commontools/dbconversion.cxx
index f3c2320..7c6f10d 100644
--- a/connectivity/source/commontools/dbconversion.cxx
+++ b/connectivity/source/commontools/dbconversion.cxx
@@ -469,7 +469,7 @@ namespace dbtools
nSecond = (sal_uInt16)_sSQLString.getToken(0,sTimeSep,nIndex).toInt32();
nIndex = 0;
::rtl::OUString sNano(_sSQLString.getToken(1,'.',nIndex));
- if ( sNano.getLength() )
+ if ( !sNano.isEmpty() )
{
// our time struct only supports hundredth seconds
sNano = sNano.copy(0,::std::min<sal_Int32>(sNano.getLength(),2));
diff --git a/connectivity/source/commontools/dbtools.cxx
b/connectivity/source/commontools/dbtools.cxx
index 35482a2..a4aeb56 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -258,7 +258,7 @@ Reference< XDataSource> getDataSource_allowException(
const ::rtl::OUString& _rsTitleOrPath,
const Reference< XMultiServiceFactory >& _rxFactory )
{
- ENSURE_OR_RETURN( _rsTitleOrPath.getLength(), "getDataSource_allowException: invalid arg !",
NULL );
+ ENSURE_OR_RETURN( !_rsTitleOrPath.isEmpty(), "getDataSource_allowException: invalid arg !",
NULL );
Reference< XNameAccess> xDatabaseContext(
_rxFactory->createInstance(
@@ -298,7 +298,7 @@ Reference< XConnection > getConnection_allowException(
if (xDataSource.is())
{
// do it with interaction handler
- if(!_rsUser.getLength() || !_rsPwd.getLength())
+ if(_rsUser.isEmpty() || _rsPwd.isEmpty())
{
Reference<XPropertySet> xProp(xDataSource,UNO_QUERY);
::rtl::OUString sPwd, sUser;
@@ -313,7 +313,7 @@ Reference< XConnection > getConnection_allowException(
{
OSL_FAIL("dbtools::getConnection: error while retrieving data source properties!");
}
- if(bPwdReq && !sPwd.getLength())
+ if(bPwdReq && sPwd.isEmpty())
{ // password required, but empty -> connect using an interaction handler
Reference<XCompletedConnection> xConnectionCompletion(xProp, UNO_QUERY);
if (xConnectionCompletion.is())
@@ -436,7 +436,7 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R
xRowSetProps->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL"))) >>=
sURL;
Reference< XConnection > xPureConnection;
- if (sDataSourceName.getLength())
+ if (!sDataSourceName.isEmpty())
{ // the row set's data source property is set
// -> try to connect, get user and pwd setting for that
::rtl::OUString sUser, sPwd;
@@ -448,7 +448,7 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R
xPureConnection = getConnection_allowException( sDataSourceName, sUser, sPwd,
_rxFactory );
}
- else if (sURL.getLength())
+ else if (!sURL.isEmpty())
{ // the row set has no data source, but a connection url set
// -> try to connection with that url
Reference< XDriverManager > xDriverManager(
@@ -460,7 +460,7 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R
xRowSetProps->getPropertyValue(sUserProp) >>= sUser;
if
(hasProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), xRowSetProps))
xRowSetProps->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD))
= sPwd;
- if (sUser.getLength())
+ if (!sUser.isEmpty())
{ // use user and pwd together with the url
Sequence< PropertyValue> aInfo(2);
aInfo.getArray()[0].Name =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user"));
@@ -586,7 +586,7 @@ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnect
OSL_PRECOND( _rxConnection.is(), "::dbtools::getFieldsByCommandDescriptor: invalid
connection!" );
OSL_PRECOND( ( CommandType::TABLE == _nCommandType ) || ( CommandType::QUERY == _nCommandType
) || ( CommandType::COMMAND == _nCommandType ),
"::dbtools::getFieldsByCommandDescriptor: invalid command type!" );
- OSL_PRECOND( _rCommand.getLength(), "::dbtools::getFieldsByCommandDescriptor: invalid command
(empty)!" );
+ OSL_PRECOND( !_rCommand.isEmpty(), "::dbtools::getFieldsByCommandDescriptor: invalid command
(empty)!" );
Reference< XNameAccess > xFields;
@@ -878,7 +878,7 @@ static ::rtl::OUString impl_doComposeTableName( const Reference< XDatabaseMetaDa
OSL_ENSURE(_rxMetaData.is(), "impl_doComposeTableName : invalid meta data !");
if ( !_rxMetaData.is() )
return ::rtl::OUString();
- OSL_ENSURE(_rName.getLength(), "impl_doComposeTableName : at least the name should be
non-empty !");
+ OSL_ENSURE(!_rName.isEmpty(), "impl_doComposeTableName : at least the name should be non-empty
!");
const ::rtl::OUString sQuoteString = _rxMetaData->getIdentifierQuoteString();
const NameComponentSupport aNameComps( lcl_getNameComponentSupport( _rxMetaData, _eComposeRule
) );
@@ -887,19 +887,19 @@ static ::rtl::OUString impl_doComposeTableName( const Reference<
XDatabaseMetaDa
::rtl::OUString sCatalogSep;
sal_Bool bCatlogAtStart = sal_True;
- if ( _rCatalog.getLength() && aNameComps.bCatalogs )
+ if ( !_rCatalog.isEmpty() && aNameComps.bCatalogs )
{
sCatalogSep = _rxMetaData->getCatalogSeparator();
bCatlogAtStart = _rxMetaData->isCatalogAtStart();
- if ( bCatlogAtStart && sCatalogSep.getLength())
+ if ( bCatlogAtStart && !sCatalogSep.isEmpty())
{
aComposedName.append( _bQuote ? quoteName( sQuoteString, _rCatalog ) : _rCatalog );
aComposedName.append( sCatalogSep );
}
}
- if ( _rSchema.getLength() && aNameComps.bSchemas )
+ if ( !_rSchema.isEmpty() && aNameComps.bSchemas )
{
aComposedName.append( _bQuote ? quoteName( sQuoteString, _rSchema ) : _rSchema );
aComposedName.appendAscii( "." );
@@ -907,9 +907,9 @@ static ::rtl::OUString impl_doComposeTableName( const Reference< XDatabaseMetaDa
aComposedName.append( _bQuote ? quoteName( sQuoteString, _rName ) : _rName );
- if ( _rCatalog.getLength()
+ if ( !_rCatalog.isEmpty()
&& !bCatlogAtStart
- && sCatalogSep.getLength()
+ && !sCatalogSep.isEmpty()
&& aNameComps.bCatalogs
)
{
diff --git a/connectivity/source/commontools/dbtools2.cxx
b/connectivity/source/commontools/dbtools2.cxx
index 63492b4..7ea7bc9 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -115,10 +115,10 @@ namespace dbtools
sPostFix = xRow->getString (5);
sCreateParams = xRow->getString(6);
// first identical type will be used if typename is empty
- if ( !sTypeName.getLength() && nType == nDataType )
+ if ( sTypeName.isEmpty() && nType == nDataType )
sTypeName = sTypeName2Cmp;
- if( sTypeName.equalsIgnoreAsciiCase(sTypeName2Cmp) && nType == nDataType &&
sCreateParams.getLength() && !xRow->wasNull())
+ if( sTypeName.equalsIgnoreAsciiCase(sTypeName2Cmp) && nType == nDataType &&
!sCreateParams.isEmpty() && !xRow->wasNull())
{
bUseLiteral = sal_True;
break;
@@ -128,7 +128,7 @@ namespace dbtools
}
sal_Int32 nIndex = 0;
- if ( sAutoIncrementValue.getLength() && (nIndex = sTypeName.indexOf(sAutoIncrementValue)) !=
-1 )
+ if ( !sAutoIncrementValue.isEmpty() && (nIndex = sTypeName.indexOf(sAutoIncrementValue)) != -1
)
{
sTypeName = sTypeName.replaceAt(nIndex,sTypeName.getLength() - nIndex,::rtl::OUString());
}
@@ -149,10 +149,10 @@ namespace dbtools
if ( nPrecision > 0 && nDataType != DataType::TIMESTAMP )
{
aSql.append(nPrecision);
- if ( (nScale > 0) || (_sCreatePattern.getLength() &&
sCreateParams.indexOf(_sCreatePattern) != -1) )
+ if ( (nScale > 0) || (!_sCreatePattern.isEmpty() &&
sCreateParams.indexOf(_sCreatePattern) != -1) )
aSql.appendAscii(",");
}
- if ( (nScale > 0) || (_sCreatePattern.getLength() &&
sCreateParams.indexOf(_sCreatePattern) != -1 ) || nDataType == DataType::TIMESTAMP )
+ if ( (nScale > 0) || ( !_sCreatePattern.isEmpty() &&
sCreateParams.indexOf(_sCreatePattern) != -1 ) || nDataType == DataType::TIMESTAMP )
aSql.append(nScale);
if ( nParenPos == -1 )
@@ -167,7 +167,7 @@ namespace dbtools
aSql.append(sTypeName); // simply add the type name
::rtl::OUString aDefault =
::comphelper::getString(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_DEFAULTVALUE)));
- if ( aDefault.getLength() )
+ if ( !aDefault.isEmpty() )
{
aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" DEFAULT ")));
aSql.append(sPreFix);
@@ -178,7 +178,7 @@ namespace dbtools
if(::comphelper::getINT32(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_ISNULLABLE)))
== ColumnValue::NO_NULLS)
aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" NOT NULL")));
- if ( bIsAutoIncrement && sAutoIncrementValue.getLength())
+ if ( bIsAutoIncrement && !sAutoIncrementValue.isEmpty())
{
aSql.appendAscii(" ");
aSql.append(sAutoIncrementValue);
@@ -204,7 +204,7 @@ namespace dbtools
descriptor->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= sTable;
sComposedName = ::dbtools::composeTableName( xMetaData, sCatalog, sSchema, sTable, sal_True,
::dbtools::eInTableDefinitions );
- if ( !sComposedName.getLength() )
+ if ( sComposedName.isEmpty() )
::dbtools::throwFunctionSequenceException(_xConnection);
aSql.append(sComposedName);
@@ -324,7 +324,7 @@ namespace
sComposedName = ::dbtools::composeTableName( xMetaData, sCatalog, sSchema,
sTable, sal_True, ::dbtools::eInTableDefinitions );
- if ( !sComposedName.getLength() )
+ if ( sComposedName.isEmpty() )
::dbtools::throwFunctionSequenceException(_xConnection);
aSql.append(generateColumnNames(xColumns,xMetaData));
@@ -370,7 +370,7 @@ namespace
{
::rtl::OUString aSql =
::dbtools::createStandardCreateStatement(descriptor,_xConnection,_pHelper,_sCreatePattern);
const ::rtl::OUString sKeyStmt =
::dbtools::createStandardKeyStatement(descriptor,_xConnection);
- if ( sKeyStmt.getLength() )
+ if ( !sKeyStmt.isEmpty() )
aSql += sKeyStmt;
else
{
@@ -670,7 +670,7 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData,
try
{
Any aVal;
- if(_sCatalog.getLength())
+ if(!_sCatalog.isEmpty())
aVal <<= _sCatalog;
Reference< XResultSet > xPrivileges = _xMetaData->getTablePrivileges(aVal, _sSchema,
_sTable);
Reference< XRow > xCurrentRow(xPrivileges, UNO_QUERY);
@@ -943,7 +943,7 @@ sal_Int32 DBTypeConversion::convertUnicodeStringToLength( const ::rtl::OUString&
{
::rtl::OUString sDefaultReportEngineName;
aReportEngines.getNodeValue(lcl_getDefaultReportEngine()) >>= sDefaultReportEngineName;
- if ( sDefaultReportEngineName.getLength() )
+ if ( !sDefaultReportEngineName.isEmpty() )
{
::utl::OConfigurationNode aReportEngineNames =
aReportEngines.openNode(lcl_getReportEngineNames());
if ( aReportEngineNames.isValid() )
diff --git a/connectivity/source/commontools/filtermanager.cxx
b/connectivity/source/commontools/filtermanager.cxx
index 620362f..08a8bc3 100644
--- a/connectivity/source/commontools/filtermanager.cxx
+++ b/connectivity/source/commontools/filtermanager.cxx
@@ -107,7 +107,7 @@ namespace dbtools
try
{
- if ( m_xComponentAggregate.is() && getFilterComponent( fcPublicFilter ).getLength() )
+ if ( m_xComponentAggregate.is() && !getFilterComponent( fcPublicFilter ).isEmpty() )
{ // only if there changed something
m_xComponentAggregate->setPropertyValue(
OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FILTER), makeAny( getComposedFilter() ) );
}
@@ -140,7 +140,7 @@ namespace dbtools
sal_Int32 i;
for ( i = getFirstApplicableFilterIndex(); i < FC_COMPONENT_COUNT; ++i )
{
- if ( m_aFilterComponents[ i ].getLength() )
+ if ( !m_aFilterComponents[ i ].isEmpty() )
{
if ( nOnlyNonEmpty != -1 )
// it's the second non-empty component
diff --git a/connectivity/source/commontools/parameters.cxx
b/connectivity/source/commontools/parameters.cxx
index ed46507..531f130 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -276,7 +276,7 @@ namespace dbtools
const ::rtl::OUString* pDetailFieldsEnd = pDetailFields + m_aDetailFields.getLength();
for ( ; pDetailFields < pDetailFieldsEnd; ++pDetailFields, ++pMasterFields )
{
- if ( !pMasterFields->getLength() || !pDetailFields->getLength() )
+ if ( pMasterFields->isEmpty() || !pDetailFields->getLength() )
continue;
// if not even the master part of the relationship exists in the parent , the
@@ -305,7 +305,7 @@ namespace dbtools
{
::rtl::OUString sNewParamName;
const ::rtl::OUString sFilterCondition = createFilterConditionFromColumnLink(
*pMasterFields, *pDetailFields, sNewParamName );
- OSL_PRECOND( sNewParamName.getLength(), "ParameterManager::classifyLinks:
createFilterConditionFromColumnLink returned nonsense!" );
+ OSL_PRECOND( !sNewParamName.isEmpty(), "ParameterManager::classifyLinks:
createFilterConditionFromColumnLink returned nonsense!" );
// remember meta information about this new parameter
::std::pair< ParameterInformation::iterator, bool > aInsertionPos =
diff --git a/connectivity/source/commontools/predicateinput.cxx
b/connectivity/source/commontools/predicateinput.cxx
index d94621e..2b7df48 100644
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@ -67,10 +67,10 @@ namespace dbtools
//---------------------------------------------------------------------
static sal_Unicode lcl_getSeparatorChar( const ::rtl::OUString& _rSeparator, sal_Unicode
_nFallback )
{
- OSL_ENSURE( 0 < _rSeparator.getLength(), "::lcl_getSeparatorChar: invalid separator
string!" );
+ OSL_ENSURE( !_rSeparator.isEmpty(), "::lcl_getSeparatorChar: invalid separator string!" );
sal_Unicode nReturn( _nFallback );
- if ( _rSeparator.getLength() )
+ if ( !_rSeparator.isEmpty() )
nReturn = static_cast< sal_Char >( _rSeparator.getStr()[0] );
return nReturn;
}
@@ -156,7 +156,7 @@ namespace dbtools
)
{ // yes -> force a quoted text and try again
::rtl::OUString sQuoted( _rStatement );
- if ( sQuoted.getLength()
+ if ( !sQuoted.isEmpty()
&& ( (sQuoted.getStr()[0] != '\'')
|| (sQuoted.getStr()[ sQuoted.getLength() - 1 ] != '\'' )
)
@@ -220,7 +220,7 @@ namespace dbtools
) >>= aFormatLocale;
// valid locale
- if ( aFormatLocale.Language.getLength() )
+ if ( !aFormatLocale.Language.isEmpty() )
{
getSeparatorChars( aFormatLocale, nFmtDecSep, nCtxThdSep );
}
@@ -349,7 +349,7 @@ namespace dbtools
if(nIndex == -1)
sField = _sField;
sal_Int32 nType =
::connectivity::OSQLParser::getFunctionReturnType(sField,&m_aParser.getContext());
- if ( nType == DataType::OTHER || !sField.getLength() )
+ if ( nType == DataType::OTHER || sField.isEmpty() )
{
// first try the international version
::rtl::OUString sSql;
diff --git a/connectivity/source/commontools/sqlerror.cxx
b/connectivity/source/commontools/sqlerror.cxx
index 558437d..3072af2 100644
--- a/connectivity/source/commontools/sqlerror.cxx
+++ b/connectivity/source/commontools/sqlerror.cxx
@@ -253,7 +253,7 @@ namespace connectivity
if ( impl_initResources() )
{
::rtl::OUString sResMessage( m_pResources->loadString( lcl_getResourceID( _eCondition,
false ) ) );
- OSL_ENSURE( sResMessage.getLength(), "SQLError_Impl::impl_getErrorMessage: illegal
error condition, or invalid resource!" );
+ OSL_ENSURE( !sResMessage.isEmpty(), "SQLError_Impl::impl_getErrorMessage: illegal
error condition, or invalid resource!" );
aMessage.append( getMessagePrefix() ).appendAscii( " " ).append( sResMessage );
}
@@ -272,7 +272,7 @@ namespace connectivity
sState = m_pResources->loadString( nResourceId );
}
- if ( !sState.getLength() )
+ if ( sState.isEmpty() )
sState = ::rtl::OUString::intern( RTL_CONSTASCII_USTRINGPARAM( "S1000" ) );
return sState;
diff --git a/connectivity/source/commontools/statementcomposer.cxx
b/connectivity/source/commontools/statementcomposer.cxx
index d83a83f..7b4ab77 100644
--- a/connectivity/source/commontools/statementcomposer.cxx
+++ b/connectivity/source/commontools/statementcomposer.cxx
@@ -135,7 +135,7 @@ namespace dbtools
case CommandType::TABLE:
{
- if ( !_rData.sCommand.getLength() )
+ if ( _rData.sCommand.isEmpty() )
break;
sStatement = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SELECT * FROM
" ) );
@@ -166,7 +166,7 @@ namespace dbtools
// the command used by the query
xQuery->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"Command" ) ) ) >>= sStatement;
- if ( !sStatement.getLength() )
+ if ( sStatement.isEmpty() )
break;
// use a composer to build a statement from the query filter/order props
@@ -214,7 +214,7 @@ namespace dbtools
break;
}
- if ( sStatement.getLength() )
+ if ( !sStatement.isEmpty() )
{
// create an composer
Reference< XMultiServiceFactory > xFactory( _rData.xConnection,
UNO_QUERY_THROW );
diff --git a/connectivity/source/drivers/calc/CConnection.cxx
b/connectivity/source/drivers/calc/CConnection.cxx
index 7488491..e7ac50d 100644
--- a/connectivity/source/drivers/calc/CConnection.cxx
+++ b/connectivity/source/drivers/calc/CConnection.cxx
@@ -127,7 +127,7 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc()
aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly"));
aArgs[1].Value <<= (sal_Bool) sal_True;
- if ( m_sPassword.getLength() )
+ if ( !m_sPassword.isEmpty() )
{
const sal_Int32 nPos = aArgs.getLength();
aArgs.realloc(nPos+1);
diff --git a/connectivity/source/drivers/calc/CTable.cxx
b/connectivity/source/drivers/calc/CTable.cxx
index 3448d49..f9e5413 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -477,7 +477,7 @@ void OCalcTable::fillColumns()
lcl_GetColumnInfo( m_xSheet, m_xFormats, m_nStartCol + i, m_nStartRow, m_bHasHeaders,
aColumnName, eType, bCurrency );
- if ( !aColumnName.getLength() )
+ if ( aColumnName.isEmpty() )
aColumnName = lcl_GetColumnStr( i );
sal_Int32 nPrecision = 0; //! ...
diff --git a/connectivity/source/drivers/dbase/DTable.cxx
b/connectivity/source/drivers/dbase/DTable.cxx
index 8d6c467..93e4db9 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -1726,7 +1726,7 @@ sal_Bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow
pOrgRow,c
if (pIndex->Find(0,*rRow.get()[nPos]))
{
// There is no unique value
- if ( !aColName.getLength() )
+ if ( aColName.isEmpty() )
{
m_pColumns->getByIndex(i) >>= xCol;
OSL_ENSURE(xCol.is(),"ODbaseTable::UpdateBuffer column is null!");
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx
b/connectivity/source/drivers/dbase/dindexnode.cxx
index 0b67e1d..a82c7c7 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -57,7 +57,7 @@ ONDXKey::ONDXKey(const rtl::OUString& aStr, sal_uInt32 nRec)
: ONDXKey_BASE(::com::sun::star::sdbc::DataType::VARCHAR)
,nRecord(nRec)
{
- if (aStr.getLength())
+ if (!aStr.isEmpty())
{
xValue = aStr;
xValue.setBound(sal_True);
@@ -745,14 +745,14 @@ StringCompare ONDXKey::Compare(const ONDXKey& rKey) const
if (getValue().isNull())
{
- if (rKey.getValue().isNull() || (rKey.IsText(getDBType()) &&
!rKey.getValue().getString().getLength()))
+ if (rKey.getValue().isNull() || (rKey.IsText(getDBType()) &&
rKey.getValue().getString().isEmpty()))
eResult = COMPARE_EQUAL;
else
eResult = COMPARE_LESS;
}
else if (rKey.getValue().isNull())
{
- if (getValue().isNull() || (IsText(getDBType()) && !getValue().getString().getLength()))
+ if (getValue().isNull() || (IsText(getDBType()) && getValue().getString().isEmpty()))
eResult = COMPARE_EQUAL;
else
eResult = COMPARE_GREATER;
diff --git a/connectivity/source/drivers/file/FConnection.cxx
b/connectivity/source/drivers/file/FConnection.cxx
index 09e6a25..3ba887a 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -158,7 +158,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
m_bDefaultTextEncoding = true;
}
- if ( aExt.getLength() )
+ if ( !aExt.isEmpty() )
m_aFilenameExtension = aExt;
try
@@ -449,7 +449,7 @@ void OConnection::throwUrlNotValid(const ::rtl::OUString & _rsUrl,const ::rtl::O
aError.SQLState = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000"));
aError.ErrorCode = 0;
aError.Context = static_cast< XConnection* >(this);
- if (_rsMessage.getLength())
+ if (!_rsMessage.isEmpty())
aError.NextException <<= SQLException(_rsMessage, aError.Context, ::rtl::OUString(), 0,
Any());
throw aError;
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index caf0dc1..5ab1320 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -301,7 +301,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
sal_Bool bErg = sal_False;
do
{
- if (!aURL.getExtension().getLength())
+ if (aURL.getExtension().isEmpty())
{
sal_Unicode nChar = aURL.getBase().getStr()[0];
if(match(tableNamePattern,aURL.getBase(),'\0') && ( !bCheckEnabled || (
bCheckEnabled && ((nChar < '0' || nChar > '9')))) )
diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx
b/connectivity/source/drivers/file/FPreparedStatement.cxx
index 16037c9..53d628f 100644
--- a/connectivity/source/drivers/file/FPreparedStatement.cxx
+++ b/connectivity/source/drivers/file/FPreparedStatement.cxx
@@ -530,7 +530,7 @@ void OPreparedStatement::describeColumn(OSQLParseNode* _pParameter,OSQLParseNode
{
::rtl::OUString sColumnName,sTableRange;
m_aSQLIterator.getColumnRange(_pNode,sColumnName,sTableRange);
- if ( sColumnName.getLength() )
+ if ( !sColumnName.isEmpty() )
{
Reference<XNameAccess> xNameAccess = _xTable->getColumns();
if(xNameAccess->hasByName(sColumnName))
diff --git a/connectivity/source/drivers/flat/ETable.cxx
b/connectivity/source/drivers/flat/ETable.cxx
index f47304b..1e49f01 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -494,7 +494,7 @@ String OFlatTable::getEntry()
// name and extension have to coincide
if ( m_pConnection->matchesExtension( sExt ) )
{
- if ( sExt.getLength() )
+ if ( !sExt.isEmpty() )
sName =
sName.replaceAt(sName.getLength()-(sExt.getLength()+1),sExt.getLength()+1,::rtl::OUString());
if ( sName == m_Name )
{
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx
b/connectivity/source/drivers/hsqldb/HDriver.cxx
index bcaa77e..ae56c2e 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -205,7 +205,7 @@ namespace connectivity
}
}
- if ( !xStorage.is() || !sURL.getLength() )
+ if ( !xStorage.is() || sURL.isEmpty() )
{
::connectivity::SharedResources aResources;
const ::rtl::OUString sMessage = aResources.getResourceString(STR_NO_STROAGE);
@@ -215,7 +215,7 @@ namespace connectivity
::rtl::OUString sSystemPath;
osl_getSystemPathFromFileURL( sURL.pData, &sSystemPath.pData );
sal_Int32 nIndex = sSystemPath.lastIndexOf('.');
- if ( !sURL.getLength() || !sSystemPath.getLength() )
+ if ( sURL.isEmpty() || sSystemPath.isEmpty() )
{
::connectivity::SharedResources aResources;
const ::rtl::OUString sMessage =
aResources.getResourceString(STR_INVALID_FILE_URL);
@@ -322,7 +322,7 @@ namespace connectivity
catch(Exception&)
{
}
- if ( sMessage.getLength() )
+ if ( !sMessage.isEmpty() )
{
::dbtools::throwGenericSQLException(sMessage ,*this);
}
@@ -645,7 +645,7 @@ namespace connectivity
Reference< XStorage> xStorage(aEvent.Source,UNO_QUERY);
::rtl::OUString sKey = StorageContainer::getRegisteredKey(xStorage);
- if ( sKey.getLength() )
+ if ( !sKey.isEmpty() )
{
TWeakPairVector::iterator i =
::std::find_if(m_aConnections.begin(),m_aConnections.end(),::o3tl::compose1(
::std::bind2nd(::std::equal_to< ::rtl::OUString >(),sKey)
@@ -872,7 +872,7 @@ namespace connectivity
{
OSL_FAIL( "lcl_getSystemLocale: caught an exception!" );
}
- if ( !sLocaleString.getLength() )
+ if ( sLocaleString.isEmpty() )
{
rtl_Locale* pProcessLocale = NULL;
osl_getProcessLocale( &pProcessLocale );
diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx
b/connectivity/source/drivers/hsqldb/HTable.cxx
index 1430ba8..54fac55 100644
--- a/connectivity/source/drivers/hsqldb/HTable.cxx
+++ b/connectivity/source/drivers/hsqldb/HTable.cxx
@@ -245,13 +245,13 @@ void SAL_CALL OHSQLTable::alterColumnByName( const ::rtl::OUString& colName,
con
xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DEFAULTVALUE)) >>=
sOldDefault;
descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DEFAULTVALUE)) >>=
sNewDefault;
- if(sOldDefault.getLength())
+ if(!sOldDefault.isEmpty())
{
dropDefaultValue(colName);
- if(sNewDefault.getLength() && sOldDefault != sNewDefault)
+ if(!sNewDefault.isEmpty() && sOldDefault != sNewDefault)
alterDefaultValue(sNewDefault,sNewColumnName);
}
- else if(!sOldDefault.getLength() && sNewDefault.getLength())
+ else if(sOldDefault.isEmpty() && !sNewDefault.isEmpty())
alterDefaultValue(sNewDefault,sNewColumnName);
m_pColumns->refresh();
diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx
b/connectivity/source/drivers/hsqldb/HTables.cxx
index eec5438..2805845 100644
--- a/connectivity/source/drivers/hsqldb/HTables.cxx
+++ b/connectivity/source/drivers/hsqldb/HTables.cxx
@@ -71,7 +71,7 @@ sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& _rName)
sTableTypes[2] = s_sAll; // just to be sure to include anything else ....
Any aCatalog;
- if ( sCatalog.getLength() )
+ if ( !sCatalog.isEmpty() )
aCatalog <<= sCatalog;
Reference< XResultSet > xResult = m_xMetaData->getTables(aCatalog,sSchema,sTable,sTableTypes);
diff --git a/connectivity/source/drivers/hsqldb/HTools.cxx
b/connectivity/source/drivers/hsqldb/HTools.cxx
index 9c8de99..bddfe6f7 100644
--- a/connectivity/source/drivers/hsqldb/HTools.cxx
+++ b/connectivity/source/drivers/hsqldb/HTools.cxx
@@ -48,14 +48,14 @@ namespace connectivity { namespace hsqldb
const ::rtl::OUString _rSchema, const ::rtl::OUString _rName, bool _bShortForm )
{
_inout_rBuffer.appendAscii( " WHERE " );
- if ( _rCatalog.getLength() )
+ if ( !_rCatalog.isEmpty() )
{
_inout_rBuffer.appendAscii( _bShortForm ? "TABLE_CAT" : "TABLE_CATALOG" );
_inout_rBuffer.appendAscii( " = '" );
_inout_rBuffer.append ( _rCatalog );
_inout_rBuffer.appendAscii( "' AND " );
}
- if ( _rSchema.getLength() )
+ if ( !_rSchema.isEmpty() )
{
_inout_rBuffer.appendAscii( _bShortForm ? "TABLE_SCHEM" : "TABLE_SCHEMA" );
_inout_rBuffer.appendAscii( " = '" );
diff --git a/connectivity/source/drivers/hsqldb/HUser.cxx
b/connectivity/source/drivers/hsqldb/HUser.cxx
index 4d12a04..5373c16 100644
--- a/connectivity/source/drivers/hsqldb/HUser.cxx
+++ b/connectivity/source/drivers/hsqldb/HUser.cxx
@@ -111,7 +111,7 @@ void OHSQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName,
case PrivilegeObject::VIEW:
{
Any aCatalog;
- if ( sCatalog.getLength() )
+ if ( !sCatalog.isEmpty() )
aCatalog <<= sCatalog;
xRes = xMeta->getTablePrivileges(aCatalog,sSchema,sTable);
}
@@ -120,7 +120,7 @@ void OHSQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName,
case PrivilegeObject::COLUMN:
{
Any aCatalog;
- if ( sCatalog.getLength() )
+ if ( !sCatalog.isEmpty() )
aCatalog <<= sCatalog;
xRes =
xMeta->getColumnPrivileges(aCatalog,sSchema,sTable,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")));
}
@@ -234,7 +234,7 @@ void SAL_CALL OHSQLUser::grantPrivileges( const ::rtl::OUString& objName, sal_In
::osl::MutexGuard aGuard(m_aMutex);
::rtl::OUString sPrivs = getPrivilegeString(objPrivileges);
- if(sPrivs.getLength())
+ if(!sPrivs.isEmpty())
{
::rtl::OUString sGrant;
sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GRANT "));
@@ -264,7 +264,7 @@ void SAL_CALL OHSQLUser::revokePrivileges( const ::rtl::OUString& objName, sal_I
::osl::MutexGuard aGuard(m_aMutex);
checkDisposed(OUser_BASE_RBHELPER::rBHelper.bDisposed);
::rtl::OUString sPrivs = getPrivilegeString(objPrivileges);
- if(sPrivs.getLength())
+ if(!sPrivs.isEmpty())
{
::rtl::OUString sGrant;
sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REVOKE "));
@@ -311,35 +311,35 @@ void SAL_CALL OHSQLUser::changePassword( const ::rtl::OUString&
/*oldPassword*/,
if((nRights & Privilege::DELETE) == Privilege::DELETE)
{
- if(sPrivs.getLength())
+ if(!sPrivs.isEmpty())
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DELETE"));
}
if((nRights & Privilege::UPDATE) == Privilege::UPDATE)
{
- if(sPrivs.getLength())
+ if(!sPrivs.isEmpty())
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UPDATE"));
}
if((nRights & Privilege::ALTER) == Privilege::ALTER)
{
- if(sPrivs.getLength())
+ if(!sPrivs.isEmpty())
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ALTER"));
}
if((nRights & Privilege::SELECT) == Privilege::SELECT)
{
- if(sPrivs.getLength())
+ if(!sPrivs.isEmpty())
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT"));
}
if((nRights & Privilege::REFERENCE) == Privilege::REFERENCE)
{
- if(sPrivs.getLength())
+ if(!sPrivs.isEmpty())
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REFERENCES"));
}
diff --git a/connectivity/source/drivers/hsqldb/HUsers.cxx
b/connectivity/source/drivers/hsqldb/HUsers.cxx
index 78fd863..3f98a81 100644
--- a/connectivity/source/drivers/hsqldb/HUsers.cxx
+++ b/connectivity/source/drivers/hsqldb/HUsers.cxx
@@ -85,7 +85,7 @@ sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" @\"%\" "));
::rtl::OUString sPassword;
descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD))
= sPassword;
- if ( sPassword.getLength() )
+ if ( !sPassword.isEmpty() )
{
aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" IDENTIFIED BY '"));
aSql += sPassword;
diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
index 1bd5969..cdde095 100644
--- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
@@ -194,7 +194,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables(
t.pEnv->DeleteLocalRef((jstring)args[1].l);
OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, sal_True ), "Exception occurred!" );
}
- if(tableNamePattern.getLength())
+ if(!tableNamePattern.isEmpty())
{
t.pEnv->DeleteLocalRef((jstring)args[2].l);
OSL_VERIFY_RES( !isExceptionOccurred( t.pEnv, sal_True ), "Exception occurred!" );
@@ -374,7 +374,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getIndexInfo(
t.pEnv->DeleteLocalRef((jstring)args[0].l);
if(args[1].l)
t.pEnv->DeleteLocalRef((jstring)args[1].l);
- if(table.getLength())
+ if(!table.isEmpty())
t.pEnv->DeleteLocalRef((jstring)args[2].l);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
@@ -413,7 +413,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getBestRowIdentifier
t.pEnv->DeleteLocalRef((jstring)args[0].l);
if(args[1].l)
t.pEnv->DeleteLocalRef((jstring)args[1].l);
- if(table.getLength())
+ if(!table.isEmpty())
t.pEnv->DeleteLocalRef((jstring)args[2].l);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
@@ -532,13 +532,13 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getCrossReference(
t.pEnv->DeleteLocalRef((jstring)args[0].l);
if(args[1].l)
t.pEnv->DeleteLocalRef((jstring)args[1].l);
- if(primaryTable.getLength())
+ if(!primaryTable.isEmpty())
t.pEnv->DeleteLocalRef((jstring)args[2].l);
if(foreignCatalog.hasValue())
t.pEnv->DeleteLocalRef((jstring)args[3].l);
if(args[4].l)
t.pEnv->DeleteLocalRef((jstring)args[4].l);
- if(foreignTable.getLength())
+ if(!foreignTable.isEmpty())
t.pEnv->DeleteLocalRef((jstring)args[5].l);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
@@ -568,7 +568,7 @@ sal_Bool java_sql_DatabaseMetaData::impl_callBooleanMethod( const char* _pMethod
if ( m_aLogger.isLoggable( LogLevel::FINEST ) )
{
::rtl::OUString sLoggedResult( sReturn );
- if ( !sLoggedResult.getLength() )
+ if ( sLoggedResult.isEmpty() )
sLoggedResult = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "<empty string>" ) );
m_aLogger.log( LogLevel::FINEST, STR_LOG_META_DATA_RESULT, _pMethodName, sLoggedResult );
}
@@ -1175,7 +1175,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsANSI92IntermediateSQL(
) t
::rtl::OUString SAL_CALL java_sql_DatabaseMetaData::getURL( ) throw(SQLException,
RuntimeException)
{
::rtl::OUString sURL = m_pConnection->getURL();
- if ( !sURL.getLength() )
+ if ( sURL.isEmpty() )
{
static jmethodID mID(NULL);
sURL = impl_callStringMethod( "getURL", mID );
@@ -1446,9 +1446,9 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getUDTs(
if(catalog.hasValue())
t.pEnv->DeleteLocalRef((jstring)args[0].l);
- if(schemaPattern.getLength())
+ if(!schemaPattern.isEmpty())
t.pEnv->DeleteLocalRef((jstring)args[1].l);
- if(typeNamePattern.getLength())
+ if(!typeNamePattern.isEmpty())
t.pEnv->DeleteLocalRef((jstring)args[2].l);
if(args[3].l)
t.pEnv->DeleteLocalRef((jintArray)args[3].l);
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx
b/connectivity/source/drivers/jdbc/JConnection.cxx
index af15252..4a7650c 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -605,7 +605,7 @@ namespace
STR_NO_CLASSNAME,
"$classname$", _rDriverClass
) );
- if ( _rDriverClassPath.getLength() )
+ if ( !_rDriverClassPath.isEmpty() )
{
const ::rtl::OUString sError2( _aResource.getResourceStringWithSubstitution(
STR_NO_CLASSNAME_PATH,
@@ -687,7 +687,7 @@ void java_sql_Connection::loadDriverFromProperties( const ::rtl::OUString& _sDri
java_sql_SQLException_BASE::st_getMyClass();
java_lang_Throwable::st_getMyClass();
- if ( !_sDriverClass.getLength() )
+ if ( _sDriverClass.isEmpty() )
{
m_aLogger.log( LogLevel::SEVERE, STR_LOG_NO_DRIVER_CLASS );
::dbtools::throwGenericSQLException(
@@ -700,7 +700,7 @@ void java_sql_Connection::loadDriverFromProperties( const ::rtl::OUString& _sDri
m_aLogger.log( LogLevel::INFO, STR_LOG_LOADING_DRIVER, _sDriverClass );
// the driver manager holds the class of the driver for later use
::std::auto_ptr< java_lang_Class > pDrvClass;
- if ( !_sDriverClassPath.getLength() )
+ if ( _sDriverClassPath.isEmpty() )
{
// if forName didn't find the class it will throw an exception
pDrvClass = ::std::auto_ptr< java_lang_Class
(java_lang_Class::forName(_sDriverClass));
@@ -799,7 +799,7 @@ sal_Bool java_sql_Connection::construct(const ::rtl::OUString& url,
::comphelper::NamedValueCollection aSettings( info );
sDriverClass = aSettings.getOrDefault( "JavaDriverClass", sDriverClass );
sDriverClassPath = aSettings.getOrDefault( "JavaDriverClassPath", sDriverClassPath);
- if ( !sDriverClassPath.getLength() )
+ if ( sDriverClassPath.isEmpty() )
sDriverClassPath = impl_getJavaDriverClassPath_nothrow(sDriverClass);
bAutoRetrievingEnabled = aSettings.getOrDefault( "IsAutoRetrievingEnabled",
bAutoRetrievingEnabled );
sGeneratedValueStatement = aSettings.getOrDefault( "AutoRetrievingStatement",
sGeneratedValueStatement );
diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx
b/connectivity/source/drivers/jdbc/JStatement.cxx
index f327d79..f10dfd3 100644
--- a/connectivity/source/drivers/jdbc/JStatement.cxx
+++ b/connectivity/source/drivers/jdbc/JStatement.cxx
@@ -179,7 +179,7 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::getGeneratedValues( )
if ( m_pConnection )
{
::rtl::OUString sStmt =
m_pConnection->getTransformedGeneratedStatement(m_sSqlStatement);
- if ( sStmt.getLength() )
+ if ( !sStmt.isEmpty() )
{
m_aLogger.log( LogLevel::FINER, STR_LOG_GENERATED_VALUES_FALLBACK, sStmt );
::comphelper::disposeComponent(m_xGeneratedStatement);
diff --git a/connectivity/source/drivers/jdbc/Object.cxx
b/connectivity/source/drivers/jdbc/Object.cxx
index 5c552c0c..4cace9a 100644
--- a/connectivity/source/drivers/jdbc/Object.cxx
+++ b/connectivity/source/drivers/jdbc/Object.cxx
@@ -192,9 +192,9 @@ namespace
{
::std::auto_ptr< java_lang_Throwable > pThrow( new java_lang_Throwable( _pEnvironment,
jThrow ) );
::rtl::OUString sMessage = pThrow->getMessage();
- if ( !sMessage.getLength() )
+ if ( sMessage.isEmpty() )
sMessage = pThrow->getLocalizedMessage();
- if( !sMessage.getLength() )
+ if( sMessage.isEmpty() )
sMessage = pThrow->toString();
_out_rException = SQLException( sMessage, _rxContext, ::rtl::OUString(), -1, Any() );
return true;
diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx
b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
index 8f90a1c..d1ed307 100644
--- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx
+++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
@@ -356,7 +356,7 @@ void SAL_CALL java_sql_PreparedStatement::setObjectWithInfo( sal_Int32 parameter
ORowSetValue aValue;
aValue.fill(x);
const ::rtl::OUString sValue = aValue;
- if ( sValue.getLength() )
+ if ( !sValue.isEmpty() )
pBigDecimal.reset(new java_math_BigDecimal(sValue));
else
pBigDecimal.reset(new java_math_BigDecimal(0.0));
diff --git a/connectivity/source/drivers/mozab/MColumnAlias.cxx
b/connectivity/source/drivers/mozab/MColumnAlias.cxx
index a068e1a..5530e2f 100644
--- a/connectivity/source/drivers/mozab/MColumnAlias.cxx
+++ b/connectivity/source/drivers/mozab/MColumnAlias.cxx
@@ -129,7 +129,7 @@ void OColumnAlias::initialize( const ::com::sun::star::uno::Reference< ::com::su
// normalize in case the config data is corrupted
// (what we really don't need is an empty alias ...)
- if ( 0 == sAssignedAlias.getLength() )
+ if ( sAssignedAlias.isEmpty() )
sAssignedAlias = *pProgrammaticNames;
::rtl::OString sAsciiProgrammaticName( ::rtl::OUStringToOString(
*pProgrammaticNames, RTL_TEXTENCODING_ASCII_US ) );
diff --git a/connectivity/source/drivers/mozab/MConnection.cxx
b/connectivity/source/drivers/mozab/MConnection.cxx
index a94ce28..29e1a9e 100644
--- a/connectivity/source/drivers/mozab/MConnection.cxx
+++ b/connectivity/source/drivers/mozab/MConnection.cxx
@@ -167,7 +167,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
if ( nLen == -1 )
{
// There isn't any subschema: - but could be just subschema
- if ( aAddrbookURI.getLength() > 0 )
+ if ( !aAddrbookURI.isEmpty() )
{
aAddrbookScheme= aAddrbookURI;
}
@@ -207,7 +207,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
if ( aAddrbookScheme.compareToAscii( getSdbcScheme( SDBC_MOZILLA ) ) == 0 ) {
m_sMozillaURI = rtl::OUString::createFromAscii( getSchemeURI( SCHEME_MOZILLA ) );
m_eSDBCAddressType = SDBCAddress::Mozilla;
- if(sAdditionalInfo.getLength())
+ if(!sAdditionalInfo.isEmpty())
m_sMozillaProfile = sAdditionalInfo;
}
else
@@ -215,7 +215,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
//Yes. I am sure it is SCHEME_MOZILLA
m_sMozillaURI = rtl::OUString::createFromAscii( getSchemeURI( SCHEME_MOZILLA ) );
m_eSDBCAddressType = SDBCAddress::ThunderBird;
- if(sAdditionalInfo.getLength())
+ if(!sAdditionalInfo.isEmpty())
m_sMozillaProfile = sAdditionalInfo;
}
else if ( aAddrbookScheme.compareToAscii( getSdbcScheme( SDBC_LDAP ) ) == 0 ) {
@@ -225,10 +225,10 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence<
PropertyV
m_sMozillaURI = rtl::OUString::createFromAscii( getSchemeURI( SCHEME_LDAP ) );
m_eSDBCAddressType = SDBCAddress::LDAP;
- if ( !m_sHostName.getLength() )
+ if ( m_sHostName.isEmpty() )
{
// see whether the URI contains a hostname/port
- if ( sAdditionalInfo.getLength() )
+ if ( !sAdditionalInfo.isEmpty() )
{
sal_Int32 nPortSeparator = sAdditionalInfo.indexOf( ':' );
if ( nPortSeparator == -1 )
@@ -281,7 +281,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
}
}
- if ( m_sHostName.getLength() != 0 ) {
+ if ( !m_sHostName.isEmpty() ) {
m_sMozillaURI += m_sHostName;
}
else
@@ -292,7 +292,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
m_sMozillaURI += rtl::OUString::valueOf( nPortNumber );
}
- if ( sBaseDN.getLength() != 0 ) {
+ if ( !sBaseDN.isEmpty() ) {
m_sMozillaURI += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") );
m_sMozillaURI += sBaseDN;
}
@@ -564,7 +564,7 @@ void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Refer
"OConnection::throwSQLException: unsupported error code combination!" );
::rtl::OUString sParameter( _rError.getParameter() );
- if ( sParameter.getLength() )
+ if ( !sParameter.isEmpty() )
{
const ::rtl::OUString sError( getResources().getResourceStringWithSubstitution(
_rError.getResId(),
@@ -582,7 +582,7 @@ void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Refer
{
SQLError aErrorHelper( getDriver()->getMSFactory() );
::rtl::OUString sParameter( _rError.getParameter() );
- if ( sParameter.getLength() )
+ if ( !sParameter.isEmpty() )
aErrorHelper.raiseException( _rError.getErrorCondition(), _rxContext, sParameter );
else
aErrorHelper.raiseException( _rError.getErrorCondition(), _rxContext);
diff --git a/connectivity/source/drivers/mozab/MDriver.cxx
b/connectivity/source/drivers/mozab/MDriver.cxx
index 5785470..89f2321 100644
--- a/connectivity/source/drivers/mozab/MDriver.cxx
+++ b/connectivity/source/drivers/mozab/MDriver.cxx
@@ -233,7 +233,7 @@ EDriverType MozabDriver::impl_classifyURL( const ::rtl::OUString& url )
if ( nLen == -1 )
{
// There isn't any subschema: - but could be just subschema
- if ( aAddrbookURI.getLength() > 0 )
+ if ( !aAddrbookURI.isEmpty() )
aAddrbookScheme= aAddrbookURI;
else if(url == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:")) )
return Unknown; // TODO check
diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.cxx
b/connectivity/source/drivers/mozab/MPreparedStatement.cxx
index fc71ff5..2aa2ddd 100644
--- a/connectivity/source/drivers/mozab/MPreparedStatement.cxx
+++ b/connectivity/source/drivers/mozab/MPreparedStatement.cxx
@@ -470,7 +470,7 @@ _pParameter,OSQLParseNode* _pNode,const OSQLTable& _xTable)
{
::rtl::OUString sColumnName,sTableRange;
m_pSQLIterator->getColumnRange(_pNode,sColumnName,sTableRange);
- if(sColumnName.getLength())
+ if(!sColumnName.isEmpty())
{
Reference<XNameAccess> xNameAccess = _xTable->getColumns();
if(xNameAccess->hasByName(sColumnName))
diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
index 191885c..45dbeb4 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
@@ -221,7 +221,7 @@ Sequence< ::rtl::OUString > SAL_CALL MozillaBootstrap::getSupportedServiceNames(
::com::sun::star::mozilla::MozillaProductType currProduct = getCurrentProduct();
//if client provides a profileName, we will use it
- if (profileName.getLength()
+ if (!profileName.isEmpty()
&& ( aCode->getProductType() != currProduct || !profileName.equals(currProfileName))
)
setCurrentProfile(aCode->getProductType(),profileName);
MNSRunnable xRunnable;
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
index d098e67..3625e56 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
@@ -92,7 +92,7 @@ namespace
static ::rtl::OUString s_productDirectories[3];
- if ( !s_productDirectories[ productIndex ].getLength() )
+ if ( s_productDirectories[ productIndex ].isEmpty() )
{
::rtl::OUString sProductPath;
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
index acb08b4..0bb006a 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx
@@ -43,7 +43,7 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce
oslFileHandle handle=NULL;
oslFileError fileError = osl_File_E_INVAL;
try{
- if (iniUrl.getLength())
+ if (!iniUrl.isEmpty())
fileError = osl_openFile(iniUrl.pData, &handle, osl_File_OpenFlag_Read);
}
catch(::com::sun::star::io::IOException&)
@@ -90,7 +90,7 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce
{
sectionName = OStringToOUString(
line.copy(nIndexStart + 1,nIndexEnd - nIndexStart -1).trim(),
RTL_TEXTENCODING_ASCII_US );
- if (!sectionName.getLength())
+ if (sectionName.isEmpty())
sectionName = OUString(RTL_CONSTASCII_USTRINGPARAM("no name section"));
ini_Section *aSection = &mAllSection[sectionName];
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
index be2eb8c..346dcc0 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
@@ -200,11 +200,11 @@ namespace connectivity
sIsDefault = aValue->sValue;
}
}
- if (profileName.getLength() != 0 || profilePath.getLength() != 0)
+ if (!(profileName.isEmpty() && profilePath.isEmpty()))
{
#ifndef MINIMAL_PROFILEDISCOVER
sal_Int32 isRelative = 0;
- if (sIsRelative.getLength() != 0)
+ if (!sIsRelative.isEmpty())
{
isRelative = sIsRelative.toInt32();
}
@@ -241,7 +241,7 @@ namespace connectivity
m_Product.mProfileList[profileName] = profileItem;
sal_Int32 isDefault = 0;
- if (sIsDefault.getLength() != 0)
+ if (!sIsDefault.isEmpty())
{
isDefault = sIsDefault.toInt32();
}
@@ -295,7 +295,7 @@ namespace connectivity
{
sal_Int32 index=product;
ProductStruct &m_Product = m_ProductProfileList[index];
- if (m_Product.mCurrentProfileName.getLength() != 0)
+ if (!m_Product.mCurrentProfileName.isEmpty())
{
//default profile setted in mozilla registry
return m_Product.mCurrentProfileName;
@@ -376,7 +376,7 @@ namespace connectivity
return sal_True;
#else
::rtl::OUString path = getProfilePath(product,profileName);
- if (!path.getLength())
+ if (path.isEmpty())
return sal_True;
// PRUnichar != sal_Unicode in mingw
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.cxx
b/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.cxx
index 94d26a5..afa48d4 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.cxx
@@ -86,7 +86,7 @@ namespace connectivity
{
::rtl::OUString currentProfile = getCurrentProfile();
//if profileName not given, then skip and return curernt profile
- if (!profileName.getLength() && m_CurrentProduct == product)
+ if (profileName.isEmpty() && m_CurrentProduct == product)
return currentProfile;
if (m_CurrentProduct == product && profileName.equals(currentProfile))
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx
b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx
index 9f38974..3a35c95 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx
+++ b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx
@@ -447,7 +447,7 @@ nsresult getTableStringsProxied(const sal_Char* sAbURI, sal_Int32 *nDirectoryTyp
ODatabaseMetaDataResultSet::ORow aRow(3);
// Insert table into map
- if ( aTableName.getLength() == 0 )
+ if ( aTableName.isEmpty() )
aTableName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AddressBook"));
OSL_TRACE("TableName = >%s<", OUtoCStr( aTableName ) );
@@ -500,7 +500,7 @@ sal_Bool MDatabaseMetaDataHelper::getTableStrings( OConnection*
sAbURI = _pCon->getMozURI();
OSL_TRACE("AbURI = %s", OUtoCStr( sAbURI ) );
- if ( sAbURI.getLength() == 0 )
+ if ( sAbURI.isEmpty() )
bGivenURI = sal_False;
else {
sAbURIString = ::rtl::OUStringToOString( sAbURI,
@@ -566,7 +566,7 @@ sal_Bool MDatabaseMetaDataHelper::getTableStrings( OConnection*
//Or the given profile name does not found
//We will reaise a "No Addressbook Directories Exist" error
if ( xMozillaBootstrap->getProfileCount(m_ProductType) == 0 ||
- ( m_ProfileName.getLength() &&
!(xMozillaBootstrap->getProfilePath(m_ProductType,m_ProfileName).getLength())))
+ ( !m_ProfileName.isEmpty() &&
xMozillaBootstrap->getProfilePath(m_ProductType,m_ProfileName).isEmpty()))
m_bProfileExists = sal_False;
else
if (xMozillaBootstrap->bootupProfile(m_ProductType,m_ProfileName) > 0)
@@ -650,7 +650,7 @@ sal_Bool MDatabaseMetaDataHelper::getTables( OConnection* _pCon,
( 0 == types.getLength() || //types is null or types include aTableType or
types include "%"
0 != ::comphelper::findValue( types, aTableType, sal_True ).getLength() ||
0 != ::comphelper::findValue( types, matchAny, sal_True ).getLength())) {
- if ( aTableName.getLength() == 0 ) {
+ if ( aTableName.isEmpty() ) {
aTableName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AddressBook"));
}
@@ -699,7 +699,7 @@ MDatabaseMetaDataHelper::testLDAPConnection( OConnection* _pCon )
sAbURI = sAbURI.replaceAt( pos, len - pos, ::rtl::OString("") );
}
const sal_Unicode* bindDN=nsnull;
- if (sAbBindDN.getLength() != 0)
+ if (!sAbBindDN.isEmpty())
{
bindDN = sAbBindDN.getStr();
}
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx
b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx
index 47275f8..81b087c 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx
+++ b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx
@@ -329,7 +329,7 @@ sal_uInt32 MQuery::InsertLoginInfo(OConnection* _pCon)
const char *pAddressBook = MTypeConverter::ouStringToCCharStringAscii(nameAB.getStr());
prefName.Append(pAddressBook);
- if (bindDN.getLength())
+ if (!bindDN.isEmpty())
{
nsCAutoString bindPrefName=prefName;
bindPrefName.Append(NS_LITERAL_CSTRING(".auth.dn"));
diff --git a/connectivity/source/drivers/mysql/YDriver.cxx
b/connectivity/source/drivers/mysql/YDriver.cxx
index 2e3c3bb..af3eb9e 100644
--- a/connectivity/source/drivers/mysql/YDriver.cxx
+++ b/connectivity/source/drivers/mysql/YDriver.cxx
@@ -263,7 +263,7 @@ namespace connectivity
{
::comphelper::NamedValueCollection aSettings( info );
::rtl::OUString sIanaName = aSettings.getOrDefault( "CharSet",
::rtl::OUString() );
- if ( sIanaName.getLength() )
+ if ( !sIanaName.isEmpty() )
{
::dbtools::OCharsetMap aLookupIanaName;
::dbtools::OCharsetMap::const_iterator aLookup =
aLookupIanaName.find(sIanaName, ::dbtools::OCharsetMap::IANA());
diff --git a/connectivity/source/drivers/mysql/YTable.cxx
b/connectivity/source/drivers/mysql/YTable.cxx
index 56c9e58..5cba2bc 100644
--- a/connectivity/source/drivers/mysql/YTable.cxx
+++ b/connectivity/source/drivers/mysql/YTable.cxx
@@ -249,7 +249,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, co
else
{
sal_Int32 nIndex = 0;
- if ( sTypeName.getLength() && (nIndex = sTypeName.indexOf(s_sAutoIncrement))
!= -1 )
+ if ( !sTypeName.isEmpty() && (nIndex = sTypeName.indexOf(s_sAutoIncrement)) !=
-1 )
{
sTypeName = sTypeName.copy(0,nIndex);
descriptor->setPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPENAME),makeAny(sTypeName));
@@ -265,13 +265,13 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName,
co
xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DEFAULTVALUE)) >>=
sOldDefault;
descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DEFAULTVALUE)) >>=
sNewDefault;
- if(sOldDefault.getLength())
+ if(!sOldDefault.isEmpty())
{
dropDefaultValue(colName);
- if(sNewDefault.getLength() && sOldDefault != sNewDefault)
+ if(!sNewDefault.isEmpty() && sOldDefault != sNewDefault)
alterDefaultValue(sNewDefault,colName);
}
- else if(!sOldDefault.getLength() && sNewDefault.getLength())
+ else if(sOldDefault.isEmpty() && !sNewDefault.isEmpty())
alterDefaultValue(sNewDefault,colName);
// now we should look if the name of the column changed
diff --git a/connectivity/source/drivers/mysql/YTables.cxx
b/connectivity/source/drivers/mysql/YTables.cxx
index b933f63..00471e3 100644
--- a/connectivity/source/drivers/mysql/YTables.cxx
+++ b/connectivity/source/drivers/mysql/YTables.cxx
@@ -71,7 +71,7 @@ sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& _rName)
sTableTypes[2] = s_sAll; // just to be sure to include anything else ....
Any aCatalog;
- if ( sCatalog.getLength() )
+ if ( !sCatalog.isEmpty() )
aCatalog <<= sCatalog;
Reference< XResultSet > xResult = m_xMetaData->getTables(aCatalog,sSchema,sTable,sTableTypes);
@@ -233,7 +233,7 @@ void OTables::addComment(const Reference< XPropertySet >& descriptor,::rtl::OUSt
{
::rtl::OUString sDesc;
descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION))
>>= sDesc;
- if ( sDesc.getLength() )
+ if ( !sDesc.isEmpty() )
{
_rOut.appendAscii(" COMMENT '");
_rOut.append(sDesc);
diff --git a/connectivity/source/drivers/mysql/YUser.cxx
b/connectivity/source/drivers/mysql/YUser.cxx
index 08f3422..f008455 100644
--- a/connectivity/source/drivers/mysql/YUser.cxx
+++ b/connectivity/source/drivers/mysql/YUser.cxx
@@ -111,7 +111,7 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName
case PrivilegeObject::VIEW:
{
Any aCatalog;
- if ( sCatalog.getLength() )
+ if ( !sCatalog.isEmpty() )
aCatalog <<= sCatalog;
xRes = xMeta->getTablePrivileges(aCatalog,sSchema,sTable);
}
@@ -120,7 +120,7 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const ::rtl::OUString& objName
case PrivilegeObject::COLUMN:
{
Any aCatalog;
- if ( sCatalog.getLength() )
+ if ( !sCatalog.isEmpty() )
aCatalog <<= sCatalog;
xRes =
xMeta->getColumnPrivileges(aCatalog,sSchema,sTable,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")));
}
@@ -233,7 +233,7 @@ void SAL_CALL OMySQLUser::grantPrivileges( const ::rtl::OUString& objName, sal_I
::osl::MutexGuard aGuard(m_aMutex);
::rtl::OUString sPrivs = getPrivilegeString(objPrivileges);
- if(sPrivs.getLength())
+ if(!sPrivs.isEmpty())
{
::rtl::OUString sGrant;
sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GRANT "));
@@ -263,7 +263,7 @@ void SAL_CALL OMySQLUser::revokePrivileges( const ::rtl::OUString& objName, sal_
::osl::MutexGuard aGuard(m_aMutex);
checkDisposed(OUser_BASE_RBHELPER::rBHelper.bDisposed);
::rtl::OUString sPrivs = getPrivilegeString(objPrivileges);
- if(sPrivs.getLength())
+ if(!sPrivs.isEmpty())
{
::rtl::OUString sGrant;
sGrant += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REVOKE "));
@@ -310,35 +310,35 @@ void SAL_CALL OMySQLUser::changePassword( const ::rtl::OUString&
/*oldPassword*/
if((nRights & Privilege::DELETE) == Privilege::DELETE)
{
- if(sPrivs.getLength())
+ if(!sPrivs.isEmpty())
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DELETE"));
}
if((nRights & Privilege::UPDATE) == Privilege::UPDATE)
{
- if(sPrivs.getLength())
+ if(!sPrivs.isEmpty())
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UPDATE"));
}
if((nRights & Privilege::ALTER) == Privilege::ALTER)
{
- if(sPrivs.getLength())
+ if(!sPrivs.isEmpty())
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ALTER"));
}
if((nRights & Privilege::SELECT) == Privilege::SELECT)
{
- if(sPrivs.getLength())
+ if(!sPrivs.isEmpty())
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT"));
}
if((nRights & Privilege::REFERENCE) == Privilege::REFERENCE)
{
- if(sPrivs.getLength())
+ if(!sPrivs.isEmpty())
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
sPrivs += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REFERENCES"));
}
diff --git a/connectivity/source/drivers/mysql/YUsers.cxx
b/connectivity/source/drivers/mysql/YUsers.cxx
index 6fd42c1..b286cae 100644
--- a/connectivity/source/drivers/mysql/YUsers.cxx
+++ b/connectivity/source/drivers/mysql/YUsers.cxx
@@ -85,7 +85,7 @@ sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" @\"%\" "));
::rtl::OUString sPassword;
descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD))
= sPassword;
- if ( sPassword.getLength() )
+ if ( !sPassword.isEmpty() )
{
aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" IDENTIFIED BY '"));
aSql += sPassword;
diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx
b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx
index 3169a77..093c6d9 100644
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx
@@ -1220,7 +1220,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( )
throw(SQL
::rtl::OUString SAL_CALL ODatabaseMetaData::getURL( ) throw(SQLException, RuntimeException)
{
::rtl::OUString aValue = m_pConnection->getURL();
- if ( !aValue.getLength() )
+ if ( aValue.isEmpty() )
{
aValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:odbc:"));
aValue += getURLImpl();
diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
index e795693..59876bb 100644
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx
@@ -892,8 +892,8 @@ void ODatabaseMetaDataResultSet::openTables(const Any& catalog, const ::rtl::OUS
aPKO = ::rtl::OUStringToOString(schemaPattern,m_nTextEncoding);
aPKN = ::rtl::OUStringToOString(tableNamePattern,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() ? aPKO.getStr() : NULL,
*pPKN = aPKN.getStr();
@@ -906,7 +906,7 @@ void ODatabaseMetaDataResultSet::openTables(const Any& catalog, const ::rtl::OUS
aCOL += ::rtl::OUStringToOString(*pBegin,m_nTextEncoding);
aCOL += pComma;
}
- if ( aCOL.getLength() )
+ if ( !aCOL.isEmpty() )
{
aCOL = aCOL.replaceAt(aCOL.getLength()-1,1,pComma);
pCOL = aCOL.getStr();
@@ -915,7 +915,7 @@ void ODatabaseMetaDataResultSet::openTables(const Any& catalog, const ::rtl::OUS
pCOL = SQL_ALL_TABLE_TYPES;
SQLRETURN nRetcode = N3SQLTables(m_aStatementHandle,
- (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && aPKQ.getLength()) ?
SQL_NTS : 0,
+ (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && !aPKQ.isEmpty()) ?
SQL_NTS : 0,
(SDB_ODBC_CHAR *) pPKO, pPKO ? SQL_NTS : 0,
(SDB_ODBC_CHAR *) pPKN, SQL_NTS,
(SDB_ODBC_CHAR *) pCOL, pCOL ? SQL_NTS : 0);
@@ -996,14 +996,14 @@ void ODatabaseMetaDataResultSet::openColumnPrivileges( const Any& catalog,
cons
aPKN = ::rtl::OUStringToOString(table,m_nTextEncoding);
aCOL = ::rtl::OUStringToOString(columnNamePattern,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() ? aPKO.getStr() : NULL,
*pPKN = aPKN.getStr(),
*pCOL = aCOL.getStr();
SQLRETURN nRetcode = N3SQLColumnPrivileges(m_aStatementHandle,
- (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && aPKQ.getLength()) ?
SQL_NTS : 0,
+ (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && !aPKQ.isEmpty()) ?
SQL_NTS : 0,
(SDB_ODBC_CHAR *) pPKO, pPKO ? SQL_NTS : 0 ,
(SDB_ODBC_CHAR *) pPKN, SQL_NTS,
(SDB_ODBC_CHAR *) pCOL, SQL_NTS);
@@ -1031,14 +1031,14 @@ void ODatabaseMetaDataResultSet::openColumns( const Any& catalog,
aPKN = ::rtl::OUStringToOString(tableNamePattern,m_nTextEncoding);
aCOL = ::rtl::OUStringToOString(columnNamePattern,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && pSchemaPat->getLength() && pSchemaPat->getLength() ?
aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() && !pSchemaPat->isEmpty() ?
aPKO.getStr() : NULL,
*pPKN = aPKN.getStr(),
*pCOL = aCOL.getStr();
SQLRETURN nRetcode = N3SQLColumns(m_aStatementHandle,
- (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && aPKQ.getLength()) ?
SQL_NTS : 0,
+ (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && !aPKQ.isEmpty()) ?
SQL_NTS : 0,
(SDB_ODBC_CHAR *) pPKO, pPKO ? SQL_NTS : 0,
(SDB_ODBC_CHAR *) pPKN, SQL_NTS,
(SDB_ODBC_CHAR *) pCOL, SQL_NTS);
@@ -1100,14 +1100,14 @@ void ODatabaseMetaDataResultSet::openProcedureColumns( const Any& catalog,
aPKN = ::rtl::OUStringToOString(procedureNamePattern,m_nTextEncoding);
aCOL = ::rtl::OUStringToOString(columnNamePattern,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() ? aPKO.getStr() : NULL,
*pPKN = aPKN.getStr(),
*pCOL = aCOL.getStr();
SQLRETURN nRetcode = N3SQLProcedureColumns(m_aStatementHandle,
- (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && aPKQ.getLength()) ?
SQL_NTS : 0,
+ (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && !aPKQ.isEmpty()) ?
SQL_NTS : 0,
(SDB_ODBC_CHAR *) pPKO, pPKO ? SQL_NTS : 0 ,
(SDB_ODBC_CHAR *) pPKN, SQL_NTS,
(SDB_ODBC_CHAR *) pCOL, SQL_NTS);
@@ -1135,13 +1135,13 @@ void ODatabaseMetaDataResultSet::openProcedures(const Any& catalog, const
::rtl:
aPKO = ::rtl::OUStringToOString(schemaPattern,m_nTextEncoding);
aPKN = ::rtl::OUStringToOString(procedureNamePattern,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() ? aPKO.getStr() : NULL,
*pPKN = aPKN.getStr();
SQLRETURN nRetcode = N3SQLProcedures(m_aStatementHandle,
- (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && aPKQ.getLength()) ?
SQL_NTS : 0,
+ (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && !aPKQ.isEmpty()) ?
SQL_NTS : 0,
(SDB_ODBC_CHAR *) pPKO, pPKO ? SQL_NTS : 0 ,
(SDB_ODBC_CHAR *) pPKN, SQL_NTS);
OTools::ThrowException(m_pConnection,nRetcode,m_aStatementHandle,SQL_HANDLE_STMT,*this);
@@ -1166,13 +1166,13 @@ void ODatabaseMetaDataResultSet::openSpecialColumns(sal_Bool _bRowVer,const
Any&
aPKO = ::rtl::OUStringToOString(schema,m_nTextEncoding);
aPKN = ::rtl::OUStringToOString(table,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() ? aPKO.getStr() : NULL,
*pPKN = aPKN.getStr();
SQLRETURN nRetcode = N3SQLSpecialColumns(m_aStatementHandle,_bRowVer ? SQL_ROWVER :
SQL_BEST_ROWID,
- (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && aPKQ.getLength()) ?
SQL_NTS : 0,
+ (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && !aPKQ.isEmpty()) ?
SQL_NTS : 0,
(SDB_ODBC_CHAR *) pPKO, pPKO ? SQL_NTS : 0 ,
(SDB_ODBC_CHAR *) pPKN, SQL_NTS,
(SQLSMALLINT)scope,
@@ -1206,19 +1206,19 @@ void ODatabaseMetaDataResultSet::openForeignKeys( const Any& catalog, const
::rt
if ( catalog2.hasValue() )
aFKQ = ::rtl::OUStringToOString(comphelper::getString(catalog2),m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL,
- *pPKO = schema && schema->getLength() ?
::rtl::OUStringToOString(*schema,m_nTextEncoding).getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
+ *pPKO = schema && !schema->isEmpty() ?
::rtl::OUStringToOString(*schema,m_nTextEncoding).getStr() : NULL,
*pPKN = table ? (aPKN =
::rtl::OUStringToOString(*table,m_nTextEncoding)).getStr(): NULL,
- *pFKQ = catalog2.hasValue() && aFKQ.getLength() ? aFKQ.getStr() : NULL,
- *pFKO = schema2 && schema2->getLength() ? (aFKO =
::rtl::OUStringToOString(*schema2,m_nTextEncoding)).getStr() : NULL,
+ *pFKQ = catalog2.hasValue() && !aFKQ.isEmpty() ? aFKQ.getStr() : NULL,
+ *pFKO = schema2 && !schema2->isEmpty() ? (aFKO =
::rtl::OUStringToOString(*schema2,m_nTextEncoding)).getStr() : NULL,
*pFKN = table2 ? (aFKN =
::rtl::OUStringToOString(*table2,m_nTextEncoding)).getStr() : NULL;
SQLRETURN nRetcode = N3SQLForeignKeys(m_aStatementHandle,
- (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && aPKQ.getLength()) ?
SQL_NTS : 0,
+ (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && !aPKQ.isEmpty()) ?
SQL_NTS : 0,
(SDB_ODBC_CHAR *) pPKO, pPKO ? SQL_NTS : 0,
(SDB_ODBC_CHAR *) pPKN, pPKN ? SQL_NTS : 0,
- (SDB_ODBC_CHAR *) pFKQ, (catalog2.hasValue() && aFKQ.getLength()) ?
SQL_NTS : 0,
+ (SDB_ODBC_CHAR *) pFKQ, (catalog2.hasValue() && !aFKQ.isEmpty()) ?
SQL_NTS : 0,
(SDB_ODBC_CHAR *) pFKO, pFKO ? SQL_NTS : 0,
(SDB_ODBC_CHAR *) pFKN, SQL_NTS
);
@@ -1256,13 +1256,13 @@ void ODatabaseMetaDataResultSet::openPrimaryKeys(const Any& catalog, const
::rtl
aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
aPKO = ::rtl::OUStringToOString(schema,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() ? aPKO.getStr() : NULL,
*pPKN = (aPKN = ::rtl::OUStringToOString(table,m_nTextEncoding)).getStr();
SQLRETURN nRetcode = N3SQLPrimaryKeys(m_aStatementHandle,
- (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && aPKQ.getLength()) ?
SQL_NTS : 0,
+ (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && !aPKQ.isEmpty()) ?
SQL_NTS : 0,
(SDB_ODBC_CHAR *) pPKO, pPKO ? SQL_NTS : 0 ,
(SDB_ODBC_CHAR *) pPKN, SQL_NTS);
OTools::ThrowException(m_pConnection,nRetcode,m_aStatementHandle,SQL_HANDLE_STMT,*this);
@@ -1286,13 +1286,13 @@ void ODatabaseMetaDataResultSet::openTablePrivileges(const Any& catalog,
const :
aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
aPKO = ::rtl::OUStringToOString(schemaPattern,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() ? aPKO.getStr() : NULL,
*pPKN = (aPKN =
::rtl::OUStringToOString(tableNamePattern,m_nTextEncoding)).getStr();
SQLRETURN nRetcode = N3SQLTablePrivileges(m_aStatementHandle,
- (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && aPKQ.getLength()) ?
SQL_NTS : 0,
+ (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && !aPKQ.isEmpty()) ?
SQL_NTS : 0,
(SDB_ODBC_CHAR *) pPKO, pPKO ? SQL_NTS : 0 ,
(SDB_ODBC_CHAR *) pPKN, SQL_NTS);
OTools::ThrowException(m_pConnection,nRetcode,m_aStatementHandle,SQL_HANDLE_STMT,*this);
@@ -1317,13 +1317,13 @@ void ODatabaseMetaDataResultSet::openIndexInfo( const Any& catalog, const
::rtl:
aPKQ = ::rtl::OUStringToOString(comphelper::getString(catalog),m_nTextEncoding);
aPKO = ::rtl::OUStringToOString(schema,m_nTextEncoding);
- const char *pPKQ = catalog.hasValue() && aPKQ.getLength() ? aPKQ.getStr() : NULL,
- *pPKO = pSchemaPat && pSchemaPat->getLength() ? aPKO.getStr() : NULL,
+ const char *pPKQ = catalog.hasValue() && !aPKQ.isEmpty() ? aPKQ.getStr() : NULL,
+ *pPKO = pSchemaPat && !pSchemaPat->isEmpty() ? aPKO.getStr() : NULL,
*pPKN = (aPKN = ::rtl::OUStringToOString(table,m_nTextEncoding)).getStr();
SQLRETURN nRetcode = N3SQLStatistics(m_aStatementHandle,
- (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && aPKQ.getLength()) ?
SQL_NTS : 0,
+ (SDB_ODBC_CHAR *) pPKQ, (catalog.hasValue() && !aPKQ.isEmpty()) ?
SQL_NTS : 0,
(SDB_ODBC_CHAR *) pPKO, pPKO ? SQL_NTS : 0 ,
(SDB_ODBC_CHAR *) pPKN, SQL_NTS,
unique ? SQL_INDEX_UNIQUE : SQL_INDEX_ALL,
diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx
b/connectivity/source/drivers/odbcbase/OStatement.cxx
index 1e8558c..d268b2f 100644
--- a/connectivity/source/drivers/odbcbase/OStatement.cxx
+++ b/connectivity/source/drivers/odbcbase/OStatement.cxx
@@ -181,7 +181,7 @@ Reference< XResultSet > SAL_CALL OStatement_Base::getGeneratedValues( ) throw (
if ( m_pConnection )
{
::rtl::OUString sStmt = m_pConnection->getTransformedGeneratedStatement(m_sSqlStatement);
- if ( sStmt.getLength() )
+ if ( !sStmt.isEmpty() )
{
::comphelper::disposeComponent(m_xGeneratedStatement);
m_xGeneratedStatement = m_pConnection->createStatement();
diff --git a/connectivity/source/parse/PColumn.cxx b/connectivity/source/parse/PColumn.cxx
index 57b68b0..6dd0f5f 100644
--- a/connectivity/source/parse/PColumn.cxx
+++ b/connectivity/source/parse/PColumn.cxx
@@ -115,7 +115,7 @@ OParseColumn::OParseColumn( const ::rtl::OUString& _Name,
Reference<XPropertySet>
xColumn(i_xQueryColumns->getByName(pColumn->getRealName()),UNO_QUERY_THROW);
::rtl::OUString sLabel;
xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_LABEL)) >>=
sLabel;
- if ( sLabel.getLength() )
+ if ( !sLabel.isEmpty() )
pColumn->setLabel(sLabel);
}
}
@@ -155,7 +155,7 @@ OParseColumn* OParseColumn::createColumnForResultSet( const Reference< XResultSe
_rxDBMetaData->supportsMixedCaseQuotedIdentifiers()
);
const ::rtl::OUString sTableName = _rxResMetaData->getTableName( _nColumnPos );
- if ( sTableName.getLength() )
+ if ( !sTableName.isEmpty() )
pColumn->setTableName( ::dbtools::composeTableName( _rxDBMetaData,
_rxResMetaData->getCatalogName( _nColumnPos ),
_rxResMetaData->getSchemaName( _nColumnPos ),
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index a82b1bb..ae31689 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -290,7 +290,7 @@ namespace
sComposedName = ::rtl::OUString();
Reference< XResultSet> xRes = _rxDBMeta->getTables(
- _rCatalog.getLength() ? makeAny( _rCatalog ) : Any(), _rSchema.getLength() ?
_rSchema : s_sWildcard, _rTableName, sTableTypes );
+ !_rCatalog.isEmpty() ? makeAny( _rCatalog ) : Any(), !_rSchema.isEmpty() ?
_rSchema : s_sWildcard, _rTableName, sTableTypes );
Reference< XRow > xCurrentRow( xRes, UNO_QUERY );
if ( xCurrentRow.is() && xRes->next() )
@@ -342,7 +342,7 @@ void OSQLParseTreeIterator::impl_getQueryParameterColumns( const OSQLTable& _rQu
// parse the sub query
do {
- if ( !bEscapeProcessing || ( sSubQueryCommand.getLength() == 0 ) )
+ if ( !bEscapeProcessing || ( sSubQueryCommand.isEmpty() ) )
break;
::rtl::OUString sError;
@@ -368,7 +368,7 @@ void OSQLParseTreeIterator::impl_getQueryParameterColumns( const OSQLTable& _rQu
OSQLTable OSQLParseTreeIterator::impl_locateRecordSource( const ::rtl::OUString& _rComposedName )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com",
"OSQLParseTreeIterator::impl_locateRecordSource" );
- if ( !_rComposedName.getLength() )
+ if ( _rComposedName.isEmpty() )
{
OSL_FAIL( "OSQLParseTreeIterator::impl_locateRecordSource: no object name at all?" );
return OSQLTable();
@@ -468,7 +468,7 @@ void OSQLParseTreeIterator::traverseOneTableName( OSQLTables& _rTables,const OSQ
::dbtools::eInDataManipulation);
// if there is no alias for the table name assign the orignal name to it
- if ( !aTableRange.getLength() )
+ if ( aTableRange.isEmpty() )
aTableRange = aComposedName;
// get the object representing this table/query
@@ -488,7 +488,7 @@ void OSQLParseTreeIterator::impl_fillJoinConditions(const OSQLParseNode* i_pJoin
else if (SQL_ISRULEOR2(i_pJoinCondition,search_condition,boolean_term) && //
AND/OR-Verknuepfung:
i_pJoinCondition->count() == 3)
{
- // nur AND Verknüpfung zulassen
+ // nur AND Verkn�pfung zulassen
if ( SQL_ISTOKEN(i_pJoinCondition->getChild(1),AND) )
{
impl_fillJoinConditions(i_pJoinCondition->getChild(0));
@@ -808,7 +808,7 @@ sal_Bool OSQLParseTreeIterator::getColumnTableRange(const OSQLParseNode* pNode,
{
::rtl::OUString aColName, aTableRange;
getColumnRange(pNode, aColName, aTableRange);
- if (!aTableRange.getLength()) // keinen gefunden
+ if (aTableRange.isEmpty()) // keinen gefunden
{
// dann die Spalte in den Tabellen suchen
for (ConstOSQLTablesIterator aIter = m_pImpl->m_pTables->begin(); aIter !=
m_pImpl->m_pTables->end(); ++aIter)
@@ -834,12 +834,12 @@ sal_Bool OSQLParseTreeIterator::getColumnTableRange(const OSQLParseNode*
pNode,
}
}
}
- if (!aTableRange.getLength())
+ if (aTableRange.isEmpty())
return sal_False;
}
- if (!rTableRange.getLength())
+ if (rTableRange.isEmpty())
rTableRange = aTableRange;
else if (rTableRange != aTableRange)
return sal_False;
@@ -901,7 +901,7 @@ void OSQLParseTreeIterator::traverseCreateColumns(const OSQLParseNode* pSelectNo
aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR"));
}
- if (aTypeName.getLength())
+ if (!aTypeName.isEmpty())
{
//TODO:Create a new class for create statement to handle field length
OParseColumn* pColumn = new
OParseColumn(aColumnName,aTypeName,::rtl::OUString(),::rtl::OUString(),
@@ -981,7 +981,7 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSele
if (SQL_ISRULE(pColumnRef,column_ref))
{
getColumnRange(pColumnRef,sColumnName,aTableRange);
- OSL_ENSURE(sColumnName.getLength(),"Columnname darf nicht leer sein");
+ OSL_ENSURE(!sColumnName.isEmpty(),"Columnname darf nicht leer sein");
}
else /*if (SQL_ISRULE(pColumnRef,general_set_fct) ||
SQL_ISRULE(pColumnRef,set_fct_spec) ||
SQL_ISRULE(pColumnRef,position_exp) ||
SQL_ISRULE(pColumnRef,extract_exp) ||
@@ -1016,7 +1016,7 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode*
pSele
return;
}
*/
- if(!aColumnAlias.getLength())
+ if(aColumnAlias.isEmpty())
aColumnAlias = sColumnName;
setSelectColumnName(m_aSelectColumns,sColumnName,aColumnAlias,aTableRange,bFkt,nType,SQL_ISRULE(pColumnRef,general_set_fct)
|| SQL_ISRULE(pColumnRef,set_fct_spec));
}
@@ -1103,7 +1103,7 @@ void OSQLParseTreeIterator::traverseByColumnNames(const OSQLParseNode*
pSelectNo
else // eine Expression
pColumnRef->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, sal_False,
sal_False );
- OSL_ENSURE(sColumnName.getLength(),"sColumnName darf nicht leer sein");
+ OSL_ENSURE(!sColumnName.isEmpty(),"sColumnName darf nicht leer sein");
}
else
{ // here I found a predicate
@@ -1465,9 +1465,9 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode
if (SQL_ISPUNCTUATION(pMark,"?"))
{
- sParameterName = _rColumnAlias.getLength()
+ sParameterName = !_rColumnAlias.isEmpty()
? _rColumnAlias
- : _aColumnName.getLength()
+ : !_aColumnName.isEmpty()
? _aColumnName
: ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?"));
}
@@ -1530,7 +1530,7 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode
m_aParameters->get().push_back(pNewColumn);
bNotFound = sal_False;
}
- else if(_aColumnName.getLength())// search in the tables for the right one
+ else if(!_aColumnName.isEmpty())// search in the tables for the right one
{
Reference<XPropertySet> xColumn = findColumn( _aColumnName, _aTableRange, true );
@@ -1730,13 +1730,13 @@ void OSQLParseTreeIterator::appendColumns(::rtl::Reference<OSQLColumns>&
_rColum
void OSQLParseTreeIterator::setSelectColumnName(::rtl::Reference<OSQLColumns>& _rColumns,const
::rtl::OUString & rColumnName,const ::rtl::OUString & rColumnAlias, const ::rtl::OUString &
rTableRange,sal_Bool bFkt,sal_Int32 _nType,sal_Bool bAggFkt)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com",
"OSQLParseTreeIterator::setSelectColumnName" );
- if(rColumnName.toChar() == '*' && !rTableRange.getLength())
+ if(rColumnName.toChar() == '*' && rTableRange.isEmpty())
{ // SELECT * ...
OSL_ENSURE(_rColumns == m_aSelectColumns,"Invalid columns used here!");
for(ConstOSQLTablesIterator aIter = m_pImpl->m_pTables->begin(); aIter !=
m_pImpl->m_pTables->end();++aIter)
appendColumns(_rColumns,aIter->first,aIter->second);
}
- else if( rColumnName.toChar() == '*' && rTableRange.getLength() )
+ else if( rColumnName.toChar() == '*' && !rTableRange.isEmpty() )
{ // SELECT <table>.*
OSL_ENSURE(_rColumns == m_aSelectColumns,"Invalid columns used here!");
ConstOSQLTablesIterator aFind = m_pImpl->m_pTables->find(rTableRange);
@@ -1744,7 +1744,7 @@ void
OSQLParseTreeIterator::setSelectColumnName(::rtl::Reference<OSQLColumns>& _
if(aFind != m_pImpl->m_pTables->end())
appendColumns(_rColumns,rTableRange,aFind->second);
}
- else if ( !rTableRange.getLength() )
+ else if ( rTableRange.isEmpty() )
{ // SELECT <something> ...
// without table specified
if ( !bFkt )
@@ -2095,7 +2095,7 @@ Reference< XPropertySet > OSQLParseTreeIterator::findColumn(const OSQLTables&
_r
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com",
"OSQLParseTreeIterator::findColumn" );
Reference< XPropertySet > xColumn;
- if ( rTableRange.getLength() )
+ if ( !rTableRange.isEmpty() )
{
ConstOSQLTablesIterator aFind = _rTables.find(rTableRange);
@@ -2148,7 +2148,7 @@ void OSQLParseTreeIterator::impl_appendError( IParseContext::ErrorCode
_eError,
void OSQLParseTreeIterator::impl_appendError( const SQLException& _rError )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com",
"OSQLParseTreeIterator::impl_appendError" );
- if ( m_aErrors.Message.getLength() )
+ if ( !m_aErrors.Message.isEmpty() )
{
SQLException* pErrorChain = &m_aErrors;
while ( pErrorChain->NextException.hasValue() )
@@ -2186,7 +2186,7 @@ sal_Int32 OSQLParseTreeIterator::getFunctionReturnType(const OSQLParseNode*
_pNo
::rtl::OUString sColumnName;
::rtl::OUString aTableRange;
getColumnRange(pValueExp,sColumnName,aTableRange);
- OSL_ENSURE(sColumnName.getLength(),"Columnname darf nicht leer sein");
+ OSL_ENSURE(!sColumnName.isEmpty(),"Columnname darf nicht leer sein");
Reference<XPropertySet> xColumn = findColumn( sColumnName, aTableRange, true );
if ( xColumn.is() )
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 034d44b..d076f57 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -131,7 +131,7 @@ namespace
rNewValue += rValue;
sal_Int32 nIndex = (sal_Int32)-1; // Quotes durch zweifache Quotes ersetzen, sonst
kriegt der Parser Probleme
- if (rQuot.getLength())
+ if (!rQuot.isEmpty())
{
do
{
@@ -349,7 +349,7 @@ namespace
{
bool lcl_isAliasNamePresent( const OSQLParseNode& _rTableNameNode )
{
- return OSQLParseNode::getTableRange(_rTableNameNode.getParent()).getLength() != 0;
+ return !OSQLParseNode::getTableRange(_rTableNameNode.getParent()).isEmpty();
}
}
@@ -763,7 +763,7 @@ sal_Bool OSQLParseNode::getTableComponents(const OSQLParseNode* _pTableNode,
OSL_FAIL("Error in parse tree!");
}
}
- return _rTable.getLength() != 0;
+ return !_rTable.isEmpty();
}
// -----------------------------------------------------------------------------
void OSQLParser::killThousandSeparator(OSQLParseNode* pLiteral)
@@ -919,7 +919,7 @@ sal_Int16 OSQLParser::buildPredicateRule(OSQLParseNode*& pAppend,OSQLParseNode*
if ( pNode1 )
{
OSQLParseNode* pNode2 = convertNode(nType,pLiteral2);
- if ( !m_sErrorMessage.getLength() )
+ if ( m_sErrorMessage.isEmpty() )
nErg = buildNode(pAppend,pCompare,pNode1,pNode2);
}
}
@@ -1245,9 +1245,9 @@ OSQLParseNode* OSQLParser::predicateTree(::rtl::OUString& rErrorMessage,
const :
m_nFormatKey = 0;
m_nDateFormatKey = 0;
- if (!m_sErrorMessage.getLength())
+ if (m_sErrorMessage.isEmpty())
m_sErrorMessage = s_pScanner->getErrorMessage();
- if (!m_sErrorMessage.getLength())
+ if (m_sErrorMessage.isEmpty())
m_sErrorMessage = m_pContext->getErrorMessage(IParseContext::ERROR_GENERAL);
rErrorMessage = m_sErrorMessage;
@@ -2471,7 +2471,7 @@ void OSQLParseNode::parseLeaf(::rtl::OUStringBuffer& rString, const
SQLParseNode
case ' ' :
case '.' : break;
default :
- if ( !rParam.aMetaData.getCatalogSeparator().getLength()
+ if ( rParam.aMetaData.getCatalogSeparator().isEmpty()
|| rString[rString.getLength() - 1] !=
rParam.aMetaData.getCatalogSeparator().toChar()
)
rString.appendAscii(" "); break;
@@ -2527,7 +2527,7 @@ void OSQLParseNode::parseLeaf(::rtl::OUStringBuffer& rString, const
SQLParseNode
case ' ' :
case '.' : break;
default :
- if ( !rParam.aMetaData.getCatalogSeparator().getLength()
+ if ( rParam.aMetaData.getCatalogSeparator().isEmpty()
|| rString[rString.getLength() - 1] !=
rParam.aMetaData.getCatalogSeparator().toChar()
)
rString.appendAscii(" "); break;
diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx
index 05af673..34caa74 100644
--- a/connectivity/source/sdbcx/VCollection.cxx
+++ b/connectivity/source/sdbcx/VCollection.cxx
@@ -534,8 +534,8 @@ void OCollection::renameObject(const ::rtl::OUString _sOldName,const ::rtl::OUSt
{
OSL_ENSURE(m_pElements->exists(_sOldName),"Element doesn't exist");
OSL_ENSURE(!m_pElements->exists(_sNewName),"Element already exists");
- OSL_ENSURE(_sNewName.getLength(),"New name must not be empty!");
- OSL_ENSURE(_sOldName.getLength(),"New name must not be empty!");
+ OSL_ENSURE(!_sNewName.isEmpty(),"New name must not be empty!");
+ OSL_ENSURE(!_sOldName.isEmpty(),"New name must not be empty!");
if ( m_pElements->rename(_sOldName,_sNewName) )
{
diff --git a/connectivity/source/sdbcx/VTable.cxx b/connectivity/source/sdbcx/VTable.cxx
index 6b6f785..0cd553c 100644
--- a/connectivity/source/sdbcx/VTable.cxx
+++ b/connectivity/source/sdbcx/VTable.cxx
@@ -312,8 +312,8 @@ void SAL_CALL OTable::alterColumnByIndex( sal_Int32 /*index*/, const Reference<
::rtl::OUString SAL_CALL OTable::getName() throw(::com::sun::star::uno::RuntimeException)
{
// this is only correct for tables who haven't a schema or catalog name
- OSL_ENSURE(!m_CatalogName.getLength(),"getName(): forgot to overload getName()!");
- OSL_ENSURE(!m_SchemaName.getLength(),"getName(): forgot to overload getName()!");
+ OSL_ENSURE(m_CatalogName.isEmpty(),"getName(): forgot to overload getName()!");
+ OSL_ENSURE(m_SchemaName.isEmpty(),"getName(): forgot to overload getName()!");
return m_Name;
}
// -----------------------------------------------------------------------------
--
1.7.5.4
Context
- [Libreoffice] [PATCH] Fix for fdo43460 Part IX getLength() to isEmpty() · Olivier Hallot
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.