summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2011-12-14 23:13:36 -0200
committerIvan Timofeev <timofeev.i.s@gmail.com>2011-12-17 16:36:00 +0400
commit1777c09a0781710c309e500f680e6f95c080ca86 (patch)
tree30b82b768f01de93895daadc1bec8731b082d98c /connectivity/source/drivers
parent3744cd818383fd954125a6567856e92198792cf1 (diff)
Fix for fdo43460 Part IX getLength() to isEmpty()
Part IX Module connectivity
Diffstat (limited to 'connectivity/source/drivers')
-rw-r--r--connectivity/source/drivers/calc/CConnection.cxx2
-rw-r--r--connectivity/source/drivers/calc/CTable.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx2
-rw-r--r--connectivity/source/drivers/dbase/dindexnode.cxx6
-rw-r--r--connectivity/source/drivers/file/FConnection.cxx4
-rw-r--r--connectivity/source/drivers/file/FDatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/file/FPreparedStatement.cxx2
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx10
-rw-r--r--connectivity/source/drivers/hsqldb/HTable.cxx6
-rw-r--r--connectivity/source/drivers/hsqldb/HTables.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/HTools.cxx4
-rw-r--r--connectivity/source/drivers/hsqldb/HUser.cxx18
-rw-r--r--connectivity/source/drivers/hsqldb/HUsers.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/DatabaseMetaData.cxx18
-rw-r--r--connectivity/source/drivers/jdbc/JConnection.cxx8
-rw-r--r--connectivity/source/drivers/jdbc/JStatement.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/Object.cxx4
-rw-r--r--connectivity/source/drivers/jdbc/PreparedStatement.cxx2
-rw-r--r--connectivity/source/drivers/mozab/MColumnAlias.cxx2
-rw-r--r--connectivity/source/drivers/mozab/MConnection.cxx18
-rw-r--r--connectivity/source/drivers/mozab/MDriver.cxx2
-rw-r--r--connectivity/source/drivers/mozab/MPreparedStatement.cxx2
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx2
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx2
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx4
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx10
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.cxx2
-rw-r--r--connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx10
-rw-r--r--connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx2
-rw-r--r--connectivity/source/drivers/mysql/YDriver.cxx2
-rw-r--r--connectivity/source/drivers/mysql/YTable.cxx8
-rw-r--r--connectivity/source/drivers/mysql/YTables.cxx4
-rw-r--r--connectivity/source/drivers/mysql/YUser.cxx18
-rw-r--r--connectivity/source/drivers/mysql/YUsers.cxx2
-rw-r--r--connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx68
-rw-r--r--connectivity/source/drivers/odbcbase/OStatement.cxx2
38 files changed, 130 insertions, 130 deletions
diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx
index 74884912aad1..e7ac50dc4211 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 3448d49648b0..f9e5413c9a37 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 5e5b9e2b46ae..fc5afcd3d354 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -1737,7 +1737,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 c1befc432e45..111745794750 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 09e6a2514393..3ba887ad9b09 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 caf0dc15277e..5ab1320b16cd 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 16037c985329..53d628f18a42 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 f47304b3a434..1e49f01523d6 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 5e62a0bd957b..b1b5784086ef 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 1430ba8035e8..54fac5505cf1 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 eec54383804a..28058450eea6 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 9c8de99e3157..bddfe6f7de1a 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 4d12a044b9d0..5373c165d917 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 78fd863b852e..3f98a8153557 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 1bd5969b94ea..cdde095e21c0 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 af15252bc6c1..4a7650c5da39 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 f327d79f88ea..f10dfd325974 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 5c552c0c0ef8..4cace9ac636a 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 8f90a1cdd951..d1ed30769682 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 a068e1a86fa7..5530e2f8fb76 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 a94ce286e6af..29e1a9e55229 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 5785470b675c..89f2321b832c 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 fc71ff5f4d5c..2aa2dddb9750 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 93c07f1c95b6..d12c2e253bdc 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 d098e67f1123..3625e56f479f 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 acb08b49806b..0bb006a9119f 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 be2eb8c84a1c..346dcc0bbbfd 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 94d26a502dcf..afa48d471ac8 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 e2eb236349e7..70a6b7bff246 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 47275f8bc250..81b087cbfde5 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 2e3c3bbc7410..af3eb9e8aa78 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 56c9e5865612..5cba2bcd6429 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 b933f63a2da1..00471e3de25a 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 08f342269bb9..f0084551b1e1 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 6fd42c1d1332..b286cae92ac5 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 3169a77392fc..093c6d9840f2 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 e79569314390..59876bb4c2de 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 1e8558cc21b6..d268b2fc2874 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();