-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Please find attached a partial fix for Easy Hack FDO43460
Part XII
Module
dbaccess
- --
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/
iQEcBAEBAgAGBQJO75rfAAoJEJp3R7nH3vLxC2sIALggtPcrL6t/S/XXKb3eT1ga
WEI7GIDnnGTt4xDOo1N7g8G1fFOGieg+LgdlZnqFrPO3NalgRXlW8PNqUE+aNpOi
8CN6ul3syoQIsoGeYc9Zggp9JDsCamPJyGlMmQY3xfy0QmF1gSMc9LfuuUw82sp7
9zOKgIOFcvaf+91tv1mOhiOhES1segjKfTAzSsNtbaGdzPNULFnNVi2uhZpnoaL2
JPX3Lb0m0jNC4dXgdQyunF7e3f6/5QDCvingfeBhASOEakOGrhzJlf6pjBvR9BzI
bZZrOo5OMhmKw+1E5/NGABi8m2a42kY3E0FCRZLOL/g50O9HTw8s6Zewtl1U1bk=
=5CHP
-----END PGP SIGNATURE-----
From 4426cea7a1c00643f7dafb5c9b43988de4ad44f6 Mon Sep 17 00:00:00 2001
From: Olivier Hallot <olivier.hallot@alta.org.br>
Date: Mon, 19 Dec 2011 18:10:37 -0200
Subject: [PATCH] Fix for fdo43460 Part XII getLength() to isEmpty()
Part XII
Module
dbaccess
---
dbaccess/source/core/api/CRowSetDataColumn.cxx | 2 +-
dbaccess/source/core/api/CacheSet.cxx | 2 +-
dbaccess/source/core/api/FilteredContainer.cxx | 2 +-
dbaccess/source/core/api/KeySet.cxx | 14 ++--
dbaccess/source/core/api/OptimisticSet.cxx | 4 +-
dbaccess/source/core/api/RowSet.cxx | 16 ++--
dbaccess/source/core/api/RowSetCache.cxx | 6 +-
.../source/core/api/SingleSelectQueryComposer.cxx | 22 +++---
dbaccess/source/core/api/definitioncolumn.cxx | 6 +-
dbaccess/source/core/api/querycomposer.cxx | 4 +-
dbaccess/source/core/api/querycontainer.cxx | 12 ++--
dbaccess/source/core/api/resultset.cxx | 2 +-
dbaccess/source/core/api/table.cxx | 2 +-
dbaccess/source/core/api/tablecontainer.cxx | 4 +-
dbaccess/source/core/api/viewcontainer.cxx | 4 +-
.../source/core/dataaccess/ComponentDefinition.cxx | 2 +-
dbaccess/source/core/dataaccess/ContentHelper.cxx | 4 +-
dbaccess/source/core/dataaccess/ModelImpl.cxx | 20 +++---
.../source/core/dataaccess/bookmarkcontainer.cxx | 6 +-
dbaccess/source/core/dataaccess/connection.cxx | 2 +-
.../source/core/dataaccess/databasecontext.cxx | 12 ++--
.../source/core/dataaccess/databasedocument.cxx | 26 +++---
.../core/dataaccess/databaseregistrations.cxx | 4 +-
dbaccess/source/core/dataaccess/datasource.cxx | 22 +++---
.../source/core/dataaccess/definitioncontainer.cxx | 4 +-
.../source/core/dataaccess/documentcontainer.cxx | 16 ++--
.../source/core/dataaccess/documentdefinition.cxx | 20 +++---
.../core/dataaccess/documenteventexecutor.cxx | 2 +-
dbaccess/source/core/dataaccess/documentevents.cxx | 8 +-
.../source/core/dataaccess/myucp_datasupplier.cxx | 6 +-
dbaccess/source/core/inc/composertools.hxx | 2 +-
dbaccess/source/core/misc/DatabaseDataProvider.cxx | 6 +-
dbaccess/source/core/misc/dsntypes.cxx | 6 +-
dbaccess/source/core/misc/sdbcoretools.cxx | 2 +-
dbaccess/source/core/recovery/dbdocrecovery.cxx | 2 +-
dbaccess/source/core/recovery/settingsimport.cxx | 4 +-
.../source/core/recovery/subcomponentrecovery.cxx | 4 +-
dbaccess/source/ext/adabas/Acomponentmodule.cxx | 2 +-
.../source/ext/macromigration/docinteraction.cxx | 2 +-
.../source/ext/macromigration/migrationengine.cxx | 14 ++--
.../source/ext/macromigration/migrationerror.hxx | 6 +-
.../source/ext/macromigration/migrationlog.cxx | 2 +-
dbaccess/source/filter/xml/dbloader2.cxx | 6 +-
dbaccess/source/filter/xml/xmlAutoStyle.cxx | 2 +-
dbaccess/source/filter/xml/xmlColumn.cxx | 14 ++--
dbaccess/source/filter/xml/xmlComponent.cxx | 2 +-
.../source/filter/xml/xmlConnectionResource.cxx | 2 +-
dbaccess/source/filter/xml/xmlDataSource.cxx | 2 +-
dbaccess/source/filter/xml/xmlDataSourceInfo.cxx | 2 +-
.../source/filter/xml/xmlDataSourceSetting.cxx | 2 +-
dbaccess/source/filter/xml/xmlDatabase.cxx | 6 +-
dbaccess/source/filter/xml/xmlExport.cxx | 28 ++++----
.../source/filter/xml/xmlFileBasedDatabase.cxx | 6 +-
.../source/filter/xml/xmlHierarchyCollection.cxx | 2 +-
dbaccess/source/filter/xml/xmlQuery.cxx | 6 +-
dbaccess/source/filter/xml/xmlServerDatabase.cxx | 16 ++--
dbaccess/source/filter/xml/xmlStyleImport.cxx | 6 +-
dbaccess/source/filter/xml/xmlTable.cxx | 2 +-
dbaccess/source/filter/xml/xmlfilter.cxx | 6 +-
.../source/sdbtools/connection/objectnames.cxx | 6 +-
dbaccess/source/shared/registrationhelper.cxx | 2 +-
dbaccess/source/ui/app/AppController.cxx | 10 +-
dbaccess/source/ui/app/AppControllerDnD.cxx | 10 +-
dbaccess/source/ui/app/AppControllerGen.cxx | 4 +-
dbaccess/source/ui/app/AppDetailPageHelper.cxx | 2 +-
dbaccess/source/ui/app/subcomponentmanager.cxx | 4 +-
dbaccess/source/ui/browser/brwctrlr.cxx | 4 +-
dbaccess/source/ui/browser/dbloader.cxx | 2 +-
dbaccess/source/ui/browser/exsrcbrw.cxx | 4 +-
dbaccess/source/ui/browser/genericcontroller.cxx | 10 +-
dbaccess/source/ui/browser/sbagrid.cxx | 2 +-
dbaccess/source/ui/browser/unodatbr.cxx | 18 ++--
dbaccess/source/ui/control/FieldDescControl.cxx | 16 ++--
dbaccess/source/ui/control/dbtreelistbox.cxx | 8 +-
dbaccess/source/ui/control/opendoccontrols.cxx | 2 +-
dbaccess/source/ui/control/tabletree.cxx | 8 +-
dbaccess/source/ui/control/toolboxcontroller.cxx | 2 +-
dbaccess/source/ui/dlg/CollectionView.cxx | 6 +-
dbaccess/source/ui/dlg/ConnectionHelper.cxx | 10 +-
dbaccess/source/ui/dlg/DbAdminImpl.cxx | 6 +-
dbaccess/source/ui/dlg/UserAdmin.cxx | 2 +-
dbaccess/source/ui/dlg/adminpages.cxx | 2 +-
dbaccess/source/ui/dlg/adtabdlg.cxx | 4 +-
dbaccess/source/ui/dlg/dbwizsetup.cxx | 2 +-
dbaccess/source/ui/dlg/dlgsave.cxx | 2 +-
dbaccess/source/ui/dlg/dsselect.cxx | 2 +-
dbaccess/source/ui/dlg/generalpage.cxx | 4 +-
dbaccess/source/ui/dlg/indexdialog.cxx | 2 +-
dbaccess/source/ui/dlg/queryfilter.cxx | 4 +-
dbaccess/source/ui/dlg/queryorder.cxx | 2 +-
dbaccess/source/ui/dlg/sqlmessage.cxx | 4 +-
dbaccess/source/ui/dlg/tablespage.cxx | 4 +-
dbaccess/source/ui/inc/TableFieldDescription.hxx | 14 ++--
dbaccess/source/ui/inc/indexes.hxx | 2 +-
dbaccess/source/ui/misc/DExport.cxx | 4 +-
dbaccess/source/ui/misc/TableCopyHelper.cxx | 2 +-
dbaccess/source/ui/misc/TokenWriter.cxx | 8 +-
dbaccess/source/ui/misc/UITools.cxx | 22 +++---
dbaccess/source/ui/misc/WCPage.cxx | 2 +-
dbaccess/source/ui/misc/WCopyTable.cxx | 18 ++--
dbaccess/source/ui/misc/charsets.cxx | 2 +-
dbaccess/source/ui/misc/databaseobjectview.cxx | 8 +-
dbaccess/source/ui/misc/datasourceconnector.cxx | 4 +-
.../source/ui/misc/dbsubcomponentcontroller.cxx | 2 +-
dbaccess/source/ui/misc/defaultobjectnamecheck.cxx | 2 +-
dbaccess/source/ui/misc/linkeddocuments.cxx | 2 +-
dbaccess/source/ui/querydesign/JoinTableView.cxx | 2 +-
dbaccess/source/ui/querydesign/QTableWindow.cxx | 4 +-
dbaccess/source/ui/querydesign/QueryDesignView.cxx | 78 ++++++++++----------
dbaccess/source/ui/querydesign/QueryTableView.cxx | 8 +-
.../source/ui/querydesign/SelectionBrowseBox.cxx | 18 ++--
.../source/ui/querydesign/TableConnectionData.cxx | 2 +-
dbaccess/source/ui/querydesign/TableWindowData.cxx | 2 +-
dbaccess/source/ui/querydesign/querycontroller.cxx | 36 +++++-----
.../ui/relationdesign/RTableConnectionData.cxx | 2 +-
.../ui/relationdesign/RelationController.cxx | 2 +-
.../source/ui/relationdesign/RelationTableView.cxx | 2 +-
.../source/ui/tabledesign/FieldDescriptions.cxx | 4 +-
dbaccess/source/ui/tabledesign/TEditControl.cxx | 8 +-
dbaccess/source/ui/tabledesign/TableController.cxx | 16 ++--
dbaccess/source/ui/uno/copytablewizard.cxx | 8 +-
121 files changed, 436 insertions(+), 436 deletions(-)
diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx
b/dbaccess/source/core/api/CRowSetDataColumn.cxx
index faad024..e227bc6 100644
--- a/dbaccess/source/core/api/CRowSetDataColumn.cxx
+++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx
@@ -128,7 +128,7 @@ void SAL_CALL ORowSetDataColumn::getFastPropertyValue( Any& rValue, sal_Int32 nH
rValue = ((*m_aColumnValue)->get())[m_nPos].makeAny();
}
}
- else if ( PROPERTY_ID_LABEL == nHandle && m_sLabel.getLength() )
+ else if ( PROPERTY_ID_LABEL == nHandle && !m_sLabel.isEmpty() )
rValue <<= m_sLabel;
else
ODataColumn::getFastPropertyValue( rValue, nHandle );
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index 6f065d7..7b7b948 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -150,7 +150,7 @@ void OCacheSet::fillTableName(const Reference<XPropertySet>& _xTable) throw(SQL
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com",
"OCacheSet::fillTableName" );
OSL_ENSURE(_xTable.is(),"OCacheSet::fillTableName: PropertySet is empty!");
- if(!m_aComposedTableName.getLength() && _xTable.is() )
+ if(m_aComposedTableName.isEmpty() && _xTable.is() )
{
Reference<XDatabaseMetaData> xMeta(m_xConnection->getMetaData());
m_aComposedTableName = composeTableName(xMeta
diff --git a/dbaccess/source/core/api/FilteredContainer.cxx
b/dbaccess/source/core/api/FilteredContainer.cxx
index aeeadea..2da3120 100644
--- a/dbaccess/source/core/api/FilteredContainer.cxx
+++ b/dbaccess/source/core/api/FilteredContainer.cxx
@@ -325,7 +325,7 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
// table type restriction which is inherent to the container
Sequence< ::rtl::OUString > aTableTypeFilter;
::rtl::OUString sInherentTableTypeRestriction( getTableTypeRestriction() );
- if ( sInherentTableTypeRestriction.getLength() )
+ if ( !sInherentTableTypeRestriction.isEmpty() )
{
if ( _rTableTypeFilter.getLength() != 0 )
{
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 92d0d50..4e35e10 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -178,7 +178,7 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable,
}
::rtl::OUString sUpdateTableName( i_rUpdateTableName );
- if ( sUpdateTableName.getLength() == 0 )
+ if ( sUpdateTableName.isEmpty() )
{
OSL_FAIL( "OKeySet::findTableColumnsMatching_throw: This is a fallback only - it won't
work when the table has an alias name." );
// If i_aTable originates from a query composer, and is a table which appears with an
alias in the SELECT statement,
@@ -309,7 +309,7 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::O
}
void OKeySet::executeStatement(::rtl::OUStringBuffer& io_aFilter,const ::rtl::OUString&
i_sRowSetFilter,Reference<XSingleSelectQueryComposer>& io_xAnalyzer)
{
- bool bFilterSet = i_sRowSetFilter.getLength() != 0;
+ bool bFilterSet = !i_sRowSetFilter.isEmpty();
if ( bFilterSet )
{
FilterCreator aFilterCreator;
@@ -607,7 +607,7 @@ void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rO
sal_uInt16 j = 0;
for(;aIter != aEnd;++aIter,++j)
{
- if ( !i_sTableName.getLength() || aIter->second.sTableName == i_sTableName )
+ if ( i_sTableName.isEmpty() || aIter->second.sTableName == i_sTableName )
{
sal_Int32 nPos = aIter->second.nPosition;
if((_rInsertRow->get())[nPos].isModified())
@@ -628,7 +628,7 @@ void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rO
j = 0;
for(;aIter != aEnd;++aIter,++j)
{
- if ( !i_sTableName.getLength() || aIter->second.sTableName == i_sTableName )
+ if ( i_sTableName.isEmpty() || aIter->second.sTableName == i_sTableName )
{
setParameter(i++,xParameter,(_rOrginalRow->get())[aIter->second.nPosition],aIter->second.nType,aIter->second.nScale);
}
@@ -713,7 +713,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
SelectColumnsMetaData::const_iterator aEnd = m_pColumnNames->end();
for(sal_Int32 i = 1;aIter != aEnd;++aIter)
{
- if ( !i_sTableName.getLength() || aIter->second.sTableName == i_sTableName )
+ if ( i_sTableName.isEmpty() || aIter->second.sTableName == i_sTableName )
{
const sal_Int32 nPos = aIter->second.nPosition;
if((_rInsertRow->get())[nPos].isModified())
@@ -776,7 +776,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
::comphelper::disposeComponent(xPrep);
- if ( !i_sTableName.getLength() && !bAutoValuesFetched && m_bInserted )
+ if ( i_sTableName.isEmpty() && !bAutoValuesFetched && m_bInserted )
{
// first check if all key column values were set
const ::rtl::OUString sMax(RTL_CONSTASCII_USTRINGPARAM(" MAX("));
@@ -799,7 +799,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
}
}
- if(sMaxStmt.getLength())
+ if(!sMaxStmt.isEmpty())
{
sMaxStmt =
sMaxStmt.replaceAt(sMaxStmt.getLength()-1,1,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")));
::rtl::OUString sStmt = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT "));
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index 1d11414..8228f95 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -162,10 +162,10 @@ void OptimisticSet::construct(const Reference< XResultSet>& _xDriverSet,const
::
fillJoinedColumns_throw(m_aSqlIterator.getJoinConditions());
const ::rtl::OUString sComposerFilter = m_xComposer->getFilter();
- if ( i_sRowSetFilter.getLength() || (sComposerFilter.getLength() && sComposerFilter !=
i_sRowSetFilter) )
+ if ( !i_sRowSetFilter.isEmpty() || (!sComposerFilter.isEmpty() && sComposerFilter !=
i_sRowSetFilter) )
{
FilterCreator aFilterCreator;
- if ( sComposerFilter.getLength() && sComposerFilter != i_sRowSetFilter )
+ if ( !sComposerFilter.isEmpty() && sComposerFilter != i_sRowSetFilter )
aFilterCreator.append( sComposerFilter );
aFilterCreator.append( i_sRowSetFilter );
aFilterCreator.append( aFilter.makeStringAndClear() );
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index c14a4b0..33d1f0c 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -352,7 +352,7 @@ void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const
break;
case PROPERTY_ID_URL:
// is the connection-to-be-built determined by the url (which is the case if
m_aDataSourceName is empty) ?
- if (!m_aDataSourceName.getLength())
+ if (m_aDataSourceName.isEmpty())
{
// are we active at the moment ?
if (m_xStatement.is())
@@ -1508,7 +1508,7 @@ Reference< XIndexAccess > SAL_CALL ORowSet::getParameters( ) throw
(RuntimeExce
// complete command, and thus the parameters, changed
impl_disposeParametersContainer_nothrow();
- if ( !m_pParameters.get() && m_aCommand.getLength() )
+ if ( !m_pParameters.get() && !m_aCommand.isEmpty() )
{
try
{
@@ -1800,7 +1800,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard&
_rClearForNotifi
m_aWarnings.setExternalWarnings( Reference< XWarningsSupplier >( xResultSet, UNO_QUERY ) );
::rtl::OUString aComposedUpdateTableName;
- if ( m_aUpdateTableName.getLength() )
+ if ( !m_aUpdateTableName.isEmpty() )
aComposedUpdateTableName = composeTableName( m_xActiveConnection->getMetaData(),
m_aUpdateCatalogName, m_aUpdateSchemaName, m_aUpdateTableName, sal_False,
::dbtools::eInDataManipulation );
{
@@ -1976,7 +1976,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard&
_rClearForNotifi
pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_ISREADONLY,makeAny(rKeyColumns.find(i) !=
rKeyColumns.end()));
- if(!sColumnLabel.getLength())
+ if(sColumnLabel.isEmpty())
{
if(xColumn.is())
xColumn->getPropertyValue(PROPERTY_NAME) >>= sColumnLabel;
@@ -2162,7 +2162,7 @@ Reference< XConnection > ORowSet::calcConnection(const Reference<
XInteractionH
if (!m_xActiveConnection.is())
{
Reference< XConnection > xNewConn;
- if ( m_aDataSourceName.getLength() )
+ if ( !m_aDataSourceName.isEmpty() )
{
Reference< XNameAccess > xDatabaseContext(
m_aContext.createComponent( (::rtl::OUString)SERVICE_SDB_DATABASECONTEXT ),
@@ -2316,7 +2316,7 @@ sal_Bool ORowSet::impl_buildActiveCommand_throw()
m_aActiveCommand = ::rtl::OUString();
::rtl::OUString sCommand;
- if ( !m_aCommand.getLength() )
+ if ( m_aCommand.isEmpty() )
return bDoEscapeProcessing;
switch (m_nCommandType)
@@ -2372,7 +2372,7 @@ sal_Bool ORowSet::impl_buildActiveCommand_throw()
xQuery->getPropertyValue(PROPERTY_UPDATE_CATALOGNAME) >>= aCatalog;
xQuery->getPropertyValue(PROPERTY_UPDATE_SCHEMANAME) >>= aSchema;
xQuery->getPropertyValue(PROPERTY_UPDATE_TABLENAME) >>= aTable;
- if(aTable.getLength())
+ if(!aTable.isEmpty())
m_aUpdateTableName = composeTableName(
m_xActiveConnection->getMetaData(), aCatalog, aSchema, aTable, sal_False,
::dbtools::eInDataManipulation );
}
}
@@ -2395,7 +2395,7 @@ sal_Bool ORowSet::impl_buildActiveCommand_throw()
m_aActiveCommand = sCommand;
- if ( !m_aActiveCommand.getLength() && !bDoEscapeProcessing )
+ if ( m_aActiveCommand.isEmpty() && !bDoEscapeProcessing )
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_SQL_COMMAND ),
SQL_FUNCTION_SEQUENCE_ERROR, *this );
return bDoEscapeProcessing;
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index 49f6368..8fc264a 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -176,7 +176,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
OSL_ENSURE(xTabSup.is(),"ORowSet::execute composer isn't a tablesupplier!");
Reference<XNameAccess> xTables = xTabSup->getTables();
Sequence< ::rtl::OUString> aTableNames = xTables->getElementNames();
- if ( aTableNames.getLength() > 1 && !_rUpdateTableName.getLength() && bNeedKeySet )
+ if ( aTableNames.getLength() > 1 && _rUpdateTableName.isEmpty() && bNeedKeySet )
{// here we have a join or union and nobody told us which table to update, so we
update them all
m_nPrivileges =
Privilege::SELECT|Privilege::DELETE|Privilege::INSERT|Privilege::UPDATE;
OptimisticSet* pCursor = new
OptimisticSet(m_aContext,xConnection,_xAnalyzer,_aParameterValueForCache,i_nMaxRows,m_nRowCount);
@@ -198,7 +198,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
}
else
{
- if(_rUpdateTableName.getLength() && xTables->hasByName(_rUpdateTableName))
+ if(!_rUpdateTableName.isEmpty() && xTables->hasByName(_rUpdateTableName))
xTables->getByName(_rUpdateTableName) >>= m_aUpdateTable;
else if(xTables->getElementNames().getLength())
{
@@ -1568,7 +1568,7 @@ sal_Bool ORowSetCache::checkJoin(const Reference< XConnection>& _xConnection,
OSL_ENSURE(SQL_ISRULE(pTableRef,table_ref),"Must be a tableref here!");
::rtl::OUString sTableRange = OSQLParseNode::getTableRange(pTableRef);
- if(!sTableRange.getLength())
+ if(sTableRange.isEmpty())
pTableRef->getChild(0)->parseNodeToStr( sTableRange, _xConnection, NULL,
sal_False, sal_False );
bOk = sTableRange == _sUpdateTableName;
}
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 04f7a5a..4133630 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -555,10 +555,10 @@ void SAL_CALL OSingleSelectQueryComposer::appendOrderByColumn( const
Reference<
::osl::MutexGuard aGuard( m_aMutex );
::rtl::OUString sColumnName( impl_getColumnName_throw(column) );
::rtl::OUString sOrder = getOrder();
- if ( (sOrder.getLength() != 0) && sColumnName.getLength() )
+ if ( !(sOrder.isEmpty() || sColumnName.isEmpty()) )
sOrder += COMMA;
sOrder += sColumnName;
- if ( !ascending && sColumnName.getLength() )
+ if ( !(ascending || sColumnName.isEmpty()) )
sOrder += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" DESC "));
setOrder(sOrder);
@@ -582,7 +582,7 @@ void SAL_CALL OSingleSelectQueryComposer::appendGroupByColumn( const Reference<
::rtl::OUStringBuffer aSql( m_aPureSelectSQL );
for ( SQLPart eLoopParts = Where; eLoopParts != SQLPartCount; incSQLPart( eLoopParts ) )
- if ( _rParts[ eLoopParts ].getLength() )
+ if ( !_rParts[ eLoopParts ].isEmpty() )
{
aSql.append( getKeyword( eLoopParts ) );
aSql.append( _rParts[ eLoopParts ] );
@@ -640,7 +640,7 @@ namespace
_rComposer.append( _rElementaryClause );
_rComposer.append( _rAdditionalClause );
::rtl::OUString sComposed = _rComposer.getComposedAndClear();
- if ( sComposed.getLength() )
+ if ( !sComposed.isEmpty() )
sComposed = _rKeyword + sComposed;
return sComposed;
}
@@ -793,7 +793,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
// preserve the original WHERE clause
// #i102234#
::rtl::OUString sOriginalWhereClause = getSQLPart( Where, m_aSqlIterator, sal_False );
- if ( sOriginalWhereClause.getLength() )
+ if ( !sOriginalWhereClause.isEmpty() )
{
aSQL.appendAscii( " ( 0 = 1 ) AND ( " );
aSQL.append( sOriginalWhereClause );
@@ -805,7 +805,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
}
::rtl::OUString sGroupBy = getSQLPart( Group, m_aSqlIterator, sal_True );
- if ( sGroupBy.getLength() )
+ if ( !sGroupBy.isEmpty() )
aSQL.append( sGroupBy );
::rtl::OUString sSQL( aSQL.makeStringAndClear() );
@@ -936,7 +936,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
::rtl::OUString sRealName;
xProp->getPropertyValue(PROPERTY_REALNAME) >>= sRealName;
::std::vector< ::rtl::OUString>::iterator aFindName;
- if ( !sColumnName.getLength() )
+ if ( sColumnName.isEmpty() )
xProp->getPropertyValue(PROPERTY_NAME) >>= sColumnName;
aFindName =
::std::find_if(aNames.begin(),aNames.end(),::std::bind2nd(aCaseCompareFunctor,sColumnName));
@@ -1310,7 +1310,7 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode *
pCon
const ::rtl::OUString* pBegin = aNames.getConstArray();
const ::rtl::OUString* pEnd = pBegin + aNames.getLength();
- if(!aTable.getLength())
+ if(aTable.isEmpty())
{ // we haven't found a table name, now we must search every table for this column
for(;pBegin != pEnd;++pBegin)
{
@@ -1693,7 +1693,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference<
XPropert
// select ohne where und order by aufbauen
::rtl::OUString sFilter = getFilter();
- if ( sFilter.getLength() && aSQL.getLength() )
+ if ( !sFilter.isEmpty() && aSQL.getLength() )
{
::rtl::OUString sTemp(L_BRACKET);
sTemp += sFilter;
@@ -1717,7 +1717,7 @@ Sequence< Sequence< PropertyValue > >
OSingleSelectQueryComposer::getStructuredC
Sequence< Sequence< PropertyValue > > aFilterSeq;
::rtl::OUString sFilter = getStatementPart( _aGetFunctor, m_aAdditiveIterator );
- if ( sFilter.getLength() != 0 )
+ if ( !sFilter.isEmpty() )
{
::rtl::OUString aSql(m_aPureSelectSQL);
// build a temporary parse node
@@ -1847,7 +1847,7 @@ Sequence< Sequence< PropertyValue > >
OSingleSelectQueryComposer::getStructuredC
}
::rtl::OUString sRet = getStatementPart( F_tmp, _rIterator );
- if ( _bWithKeyword && sRet.getLength() )
+ if ( _bWithKeyword && !sRet.isEmpty() )
sRet = sKeyword + sRet;
return sRet;
}
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx
b/dbaccess/source/core/api/definitioncolumn.cxx
index 7007181..3ab320c 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -249,7 +249,7 @@ Reference< XPropertySet > OQueryColumn::impl_determineOriginalTableColumn( const
OSL_VERIFY( getPropertyValue( PROPERTY_CATALOGNAME ) >>= sCatalog );
OSL_VERIFY( getPropertyValue( PROPERTY_SCHEMANAME ) >>= sSchema );
OSL_VERIFY( getPropertyValue( PROPERTY_TABLENAME ) >>= sTable );
- if ( !sCatalog.getLength() && !sSchema.getLength() && !sTable.getLength() )
+ if ( sCatalog.isEmpty() && sSchema.isEmpty() && sTable.isEmpty() )
return NULL;
::rtl::OUString sComposedTableName = ::dbtools::composeTableName(
@@ -317,7 +317,7 @@ void SAL_CALL OQueryColumn::getFastPropertyValue( Any& _rValue, sal_Int32 _nHand
::rtl::OUString sPropName;
sal_Int16 nAttributes( 0 );
const_cast< OQueryColumn* >( this )->getInfoHelper().fillPropertyMembersByHandle(
&sPropName, &nAttributes, _nHandle );
- OSL_ENSURE( sPropName.getLength(), "OColumnWrapper::impl_getPropertyNameFromHandle:
property not found!" );
+ OSL_ENSURE( !sPropName.isEmpty(), "OColumnWrapper::impl_getPropertyNameFromHandle:
property not found!" );
_rValue = m_xOriginalTableColumn->getPropertyValue( sPropName );
}
@@ -363,7 +363,7 @@ OColumnWrapper::~OColumnWrapper()
::rtl::OUString sPropName;
sal_Int16 nAttributes( 0 );
const_cast< OColumnWrapper* >( this )->getInfoHelper().fillPropertyMembersByHandle(
&sPropName, &nAttributes, _nHandle );
- OSL_ENSURE( sPropName.getLength(), "OColumnWrapper::impl_getPropertyNameFromHandle: property
not found!" );
+ OSL_ENSURE( !sPropName.isEmpty(), "OColumnWrapper::impl_getPropertyNameFromHandle: property
not found!" );
return sPropName;
}
diff --git a/dbaccess/source/core/api/querycomposer.cxx b/dbaccess/source/core/api/querycomposer.cxx
index 11ceae8..f3a6273 100644
--- a/dbaccess/source/core/api/querycomposer.cxx
+++ b/dbaccess/source/core/api/querycomposer.cxx
@@ -288,7 +288,7 @@ void SAL_CALL OQueryComposer::setFilter( const ::rtl::OUString& filter ) throw(S
aFilterCreator.append(filter);
m_aFilters.clear();
- if ( filter.getLength() )
+ if ( !filter.isEmpty() )
m_aFilters.push_back(filter);
m_xComposer->setFilter( aFilterCreator.getComposedAndClear() );
@@ -306,7 +306,7 @@ void SAL_CALL OQueryComposer::setOrder( const ::rtl::OUString& order ) throw(SQL
aOrderCreator.append(order);
m_aOrders.clear();
- if ( order.getLength() )
+ if ( !order.isEmpty() )
m_aOrders.push_back(order);
m_xComposer->setOrder(aOrderCreator.getComposedAndClear());
diff --git a/dbaccess/source/core/api/querycontainer.cxx
b/dbaccess/source/core/api/querycontainer.cxx
index a9fe2b4..dfa6a5e 100644
--- a/dbaccess/source/core/api/querycontainer.cxx
+++ b/dbaccess/source/core/api/querycontainer.cxx
@@ -240,9 +240,9 @@ void SAL_CALL OQueryContainer::elementInserted( const ::com::sun::star::containe
// nothing to do, we're inserting via an "appendByDescriptor"
return;
- OSL_ENSURE(sElementName.getLength(), "OQueryContainer::elementInserted : invalid name !");
+ OSL_ENSURE(!sElementName.isEmpty(), "OQueryContainer::elementInserted : invalid name !");
OSL_ENSURE(m_aDocumentMap.find(sElementName) == m_aDocumentMap.end(),
"OQueryContainer::elementInserted : oops .... we're inconsistent with our master container
!");
- if (!sElementName.getLength() || hasByName(sElementName))
+ if (sElementName.isEmpty() || hasByName(sElementName))
return;
// insert an own new element
@@ -256,9 +256,9 @@ void SAL_CALL OQueryContainer::elementRemoved( const ::com::sun::star::container
::rtl::OUString sAccessor;
_rEvent.Accessor >>= sAccessor;
{
- OSL_ENSURE(sAccessor.getLength(), "OQueryContainer::elementRemoved : invalid name !");
+ OSL_ENSURE(!sAccessor.isEmpty(), "OQueryContainer::elementRemoved : invalid name !");
OSL_ENSURE(m_aDocumentMap.find(sAccessor) != m_aDocumentMap.end(),
"OQueryContainer::elementRemoved : oops .... we're inconsistent with our master container !");
- if ( !sAccessor.getLength() || !hasByName(sAccessor) )
+ if ( sAccessor.isEmpty() || !hasByName(sAccessor) )
return;
}
removeByName(sAccessor);
@@ -273,9 +273,9 @@ void SAL_CALL OQueryContainer::elementReplaced( const ::com::sun::star::containe
{
MutexGuard aGuard(m_aMutex);
- OSL_ENSURE(sAccessor.getLength(), "OQueryContainer::elementReplaced : invalid name !");
+ OSL_ENSURE(!sAccessor.isEmpty(), "OQueryContainer::elementReplaced : invalid name !");
OSL_ENSURE(m_aDocumentMap.find(sAccessor) != m_aDocumentMap.end(),
"OQueryContainer::elementReplaced : oops .... we're inconsistent with our master container
!");
- if (!sAccessor.getLength() || !hasByName(sAccessor))
+ if (sAccessor.isEmpty() || !hasByName(sAccessor))
return;
xNewElement = implCreateWrapper(sAccessor);
diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx
index e331399..267875f 100644
--- a/dbaccess/source/core/api/resultset.cxx
+++ b/dbaccess/source/core/api/resultset.cxx
@@ -287,7 +287,7 @@ void OResultSet::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
sal_Int16 nAttributes;
const_cast<OResultSet*>(this)->getInfoHelper().
fillPropertyMembersByHandle(&aPropName, &nAttributes, nHandle);
- OSL_ENSURE(aPropName.getLength(), "property not found?");
+ OSL_ENSURE(!aPropName.isEmpty(), "property not found?");
// now read the value
rValue = Reference< XPropertySet >(m_xDelegatorResultSet,
UNO_QUERY)->getPropertyValue(aPropName);
diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx
index 4e98d47..6452b11 100644
--- a/dbaccess/source/core/api/table.cxx
+++ b/dbaccess/source/core/api/table.cxx
@@ -91,7 +91,7 @@ ODBTable::ODBTable(connectivity::sdbcx::OCollection* _pTables
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::ODBTable"
);
DBG_CTOR(ODBTable, NULL);
OSL_ENSURE(getMetaData().is(), "ODBTable::ODBTable : invalid conn !");
- OSL_ENSURE(_rName.getLength(), "ODBTable::ODBTable : name !");
+ OSL_ENSURE(!_rName.isEmpty(), "ODBTable::ODBTable : name !");
// TODO : think about collecting the privileges here, as we can't ensure that in
getFastPropertyValue, where
// we do this at the moment, the statement needed can be supplied by the connection (for
example the SQL-Server
// ODBC driver does not allow more than one statement per connection, and in
getFastPropertyValue it's more
diff --git a/dbaccess/source/core/api/tablecontainer.cxx
b/dbaccess/source/core/api/tablecontainer.cxx
index fb68bdb..bae8503 100644
--- a/dbaccess/source/core/api/tablecontainer.cxx
+++ b/dbaccess/source/core/api/tablecontainer.cxx
@@ -216,7 +216,7 @@ connectivity::sdbcx::ObjectType OTableContainer::createObject(const ::rtl::OUStr
sTable,
::dbtools::eInDataManipulation);
Any aCatalog;
- if(sCatalog.getLength())
+ if(!sCatalog.isEmpty())
aCatalog <<= sCatalog;
::rtl::OUString sType,sDescription;
Sequence< ::rtl::OUString> aTypeFilter;
@@ -402,7 +402,7 @@ void OTableContainer::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElement
bIsView =
sType.equalsIgnoreAsciiCase(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW")));
}
- if(!sComposedName.getLength())
+ if(sComposedName.isEmpty())
::dbtools::throwFunctionSequenceException(static_cast<XTypeProvider*>(static_cast<OFilteredContainer*>(this)));
::rtl::OUString aSql(RTL_CONSTASCII_USTRINGPARAM("DROP "));
diff --git a/dbaccess/source/core/api/viewcontainer.cxx b/dbaccess/source/core/api/viewcontainer.cxx
index 00d779a..83badfb 100644
--- a/dbaccess/source/core/api/viewcontainer.cxx
+++ b/dbaccess/source/core/api/viewcontainer.cxx
@@ -153,7 +153,7 @@ ObjectType OViewContainer::appendObject( const ::rtl::OUString& _rForName, const
else
{
::rtl::OUString sComposedName = ::dbtools::composeTableName( m_xMetaData, descriptor,
::dbtools::eInTableDefinitions, false, false, true );
- if(!sComposedName.getLength())
+ if(sComposedName.isEmpty())
::dbtools::throwFunctionSequenceException(static_cast<XTypeProvider*>(static_cast<OFilteredContainer*>(this)));
::rtl::OUString sCommand;
@@ -200,7 +200,7 @@ void OViewContainer::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementN
sComposedName = ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema,
sTable, sal_True, ::dbtools::eInTableDefinitions );
}
- if(!sComposedName.getLength())
+ if(sComposedName.isEmpty())
::dbtools::throwFunctionSequenceException(static_cast<XTypeProvider*>(static_cast<OFilteredContainer*>(this)));
::rtl::OUString aSql(RTL_CONSTASCII_USTRINGPARAM("DROP VIEW "));
diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
index 0c8903c..7042d61 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
@@ -150,7 +150,7 @@ OComponentDefinition::OComponentDefinition( const Reference< XInterface >& _rxCo
registerProperties();
m_pImpl->m_aProps.aTitle = _rElementName;
- OSL_ENSURE(m_pImpl->m_aProps.aTitle.getLength() != 0,
"OComponentDefinition::OComponentDefinition : invalid name !");
+ OSL_ENSURE(!m_pImpl->m_aProps.aTitle.isEmpty(), "OComponentDefinition::OComponentDefinition :
invalid name !");
}
IMPLEMENT_IMPLEMENTATION_ID(OComponentDefinition);
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx
b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index af4d66c..975b612 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -274,7 +274,7 @@ void SAL_CALL OContentHelper::addPropertiesChangeListener( const Sequence< ::rtl
for ( sal_Int32 n = 0; n < nCount; ++n )
{
const ::rtl::OUString& rName = pSeq[ n ];
- if ( rName.getLength() )
+ if ( !rName.isEmpty() )
m_aPropertyChangeListeners.addInterface(rName, Listener );
}
}
@@ -296,7 +296,7 @@ void SAL_CALL OContentHelper::removePropertiesChangeListener( const Sequence< ::
for ( sal_Int32 n = 0; n < nCount; ++n )
{
const ::rtl::OUString& rName = pSeq[ n ];
- if ( rName.getLength() )
+ if ( !rName.isEmpty() )
m_aPropertyChangeListeners.removeInterface( rName, Listener );
}
}
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx
b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 37f18c4..fcdd4d5 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -221,7 +221,7 @@ void DocumentStorageAccess::dispose()
Reference< XStorage > DocumentStorageAccess::impl_openSubStorage_nothrow( const ::rtl::OUString&
_rStorageName, sal_Int32 _nDesiredMode )
{
- OSL_ENSURE( _rStorageName.getLength(),"ODatabaseModelImpl::impl_openSubStorage_nothrow:
Invalid storage name!" );
+ OSL_ENSURE( !_rStorageName.isEmpty(),"ODatabaseModelImpl::impl_openSubStorage_nothrow: Invalid
storage name!" );
Reference< XStorage > xStorage;
try
@@ -576,7 +576,7 @@ namespace
const TContentPtr& rDefinition( object->second );
const ::rtl::OUString& rPersistentName( rDefinition->m_aProps.sPersistentName );
- if ( !rPersistentName.getLength() )
+ if ( rPersistentName.isEmpty() )
{ // it's a logical sub folder used to organize the real objects
const ODefinitionContainer_Impl& rSubFoldersObjectDefinitions( dynamic_cast< const
ODefinitionContainer_Impl& >( *rDefinition.get() ) );
bSomeDocHasMacros = lcl_hasObjectWithMacros_throw( rSubFoldersObjectDefinitions,
_rxContainerStorage );
@@ -783,13 +783,13 @@ const Reference< XNumberFormatsSupplier > &
ODatabaseModelImpl::getNumberFormats
void ODatabaseModelImpl::setDocFileLocation( const ::rtl::OUString& i_rLoadedFrom )
{
- ENSURE_OR_THROW( i_rLoadedFrom.getLength(), "invalid URL" );
+ ENSURE_OR_THROW( !i_rLoadedFrom.isEmpty(), "invalid URL" );
m_sDocFileLocation = i_rLoadedFrom;
}
void ODatabaseModelImpl::setResource( const ::rtl::OUString& i_rDocumentURL, const Sequence<
PropertyValue >& _rArgs )
{
- ENSURE_OR_THROW( i_rDocumentURL.getLength(), "invalid URL" );
+ ENSURE_OR_THROW( !i_rDocumentURL.isEmpty(), "invalid URL" );
::comphelper::NamedValueCollection aMediaDescriptor( _rArgs );
#if OSL_DEBUG_LEVEL > 0
@@ -798,7 +798,7 @@ void ODatabaseModelImpl::setResource( const ::rtl::OUString& i_rDocumentURL, con
::rtl::OUString sSalvagedFile( aMediaDescriptor.getOrDefault( "SalvagedFile",
::rtl::OUString() ) );
// If SalvagedFile is an empty string, this indicates "the document is being recovered,
but i_rDocumentURL already
// is the real document URL, not the temporary document location"
- if ( !sSalvagedFile.getLength() )
+ if ( sSalvagedFile.isEmpty() )
sSalvagedFile = i_rDocumentURL;
OSL_ENSURE( sSalvagedFile == i_rDocumentURL, "ODatabaseModelImpl::setResource:
inconsistency!" );
@@ -854,7 +854,7 @@ Reference< XStorage > ODatabaseModelImpl::getOrCreateRootStorage()
aSource = m_aMediaDescriptor.get( "Stream" );
if ( !aSource.hasValue() )
aSource = m_aMediaDescriptor.get( "InputStream" );
- if ( !aSource.hasValue() && m_sDocFileLocation.getLength() )
+ if ( !aSource.hasValue() && !m_sDocFileLocation.isEmpty() )
aSource <<= m_sDocFileLocation;
// TODO: shouldn't we also check URL?
@@ -1149,7 +1149,7 @@ TContentPtr& ODatabaseModelImpl::getObjectContainer( ObjectType _eType )
void ODatabaseModelImpl::revokeDataSource() const
{
- if ( m_pDBContext && m_sDocumentURL.getLength() )
+ if ( m_pDBContext && !m_sDocumentURL.isEmpty() )
m_pDBContext->revokeDatabaseDocument( *this );
}
@@ -1294,7 +1294,7 @@ void ODatabaseModelImpl::impl_switchToLogicalURL( const ::rtl::OUString&
i_rDocu
const ::rtl::OUString sOldURL( m_sDocumentURL );
// update our name, if necessary
if ( ( m_sName == m_sDocumentURL ) // our name is our old URL
- || ( !m_sName.getLength() ) // we do not have a name, yet (i.e. are not registered
at the database context)
+ || ( m_sName.isEmpty() ) // we do not have a name, yet (i.e. are not registered at
the database context)
)
{
INetURLObject aURL( i_rDocumentURL );
@@ -1309,13 +1309,13 @@ void ODatabaseModelImpl::impl_switchToLogicalURL( const ::rtl::OUString&
i_rDocu
m_sDocumentURL = i_rDocumentURL;
// update our location, if necessary
- if ( m_sDocFileLocation.getLength() == 0 )
+ if ( m_sDocFileLocation.isEmpty() )
m_sDocFileLocation = m_sDocumentURL;
// register at the database context, or change registration
if ( m_pDBContext )
{
- if ( sOldURL.getLength() )
+ if ( !sOldURL.isEmpty() )
m_pDBContext->databaseDocumentURLChange( sOldURL, m_sDocumentURL );
else
m_pDBContext->registerDatabaseDocument( *this );
diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
index 23fe386..9cb5b8f 100644
--- a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
@@ -122,7 +122,7 @@ void SAL_CALL OBookmarkContainer::insertByName( const ::rtl::OUString& _rName, c
if (checkExistence(_rName))
throw ElementExistException();
- if (0 == _rName.getLength())
+ if (_rName.isEmpty())
throw IllegalArgumentException();
// approve the new object
@@ -151,7 +151,7 @@ void SAL_CALL OBookmarkContainer::removeByName( const ::rtl::OUString& _rName )
checkValid(sal_True);
// check the arguments
- if (!_rName.getLength())
+ if (_rName.isEmpty())
throw IllegalArgumentException();
if (!checkExistence(_rName))
@@ -181,7 +181,7 @@ void SAL_CALL OBookmarkContainer::replaceByName( const ::rtl::OUString& _rName,
checkValid(sal_True);
// check the arguments
- if (!_rName.getLength())
+ if (_rName.isEmpty())
throw IllegalArgumentException();
// do we have such an element?
diff --git a/dbaccess/source/core/dataaccess/connection.cxx
b/dbaccess/source/core/dataaccess/connection.cxx
index 8d8d02a..e80093e 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -690,7 +690,7 @@ Reference< XInterface > SAL_CALL OConnection::createInstance( const ::rtl::OUStr
}
else
{
- if ( _sServiceSpecifier.getLength() )
+ if ( !_sServiceSpecifier.isEmpty() )
{
TSupportServices::iterator aFind = m_aSupportServices.find(_sServiceSpecifier);
if ( aFind == m_aSupportServices.end() )
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx
b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 0492cd2..cac2b87 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -264,7 +264,7 @@ Reference< XInterface > SAL_CALL ODatabaseContext::createInstanceWithArguments(
::rtl::OUString sURL = aArgs.getOrDefault( (::rtl::OUString)INFO_POOLURL, ::rtl::OUString() );
Reference< XInterface > xDataSource;
- if ( sURL.getLength() )
+ if ( !sURL.isEmpty() )
xDataSource = getObject( sURL );
if ( !xDataSource.is() )
@@ -305,7 +305,7 @@ Reference< XInterface > ODatabaseContext::getRegisteredObject(const rtl::OUStri
::rtl::OUString sURL( getDatabaseLocation( _rName ) );
- if ( !sURL.getLength() )
+ if ( sURL.isEmpty() )
// there is a registration for this name, but no URL
throw IllegalArgumentException();
@@ -428,7 +428,7 @@ void ODatabaseContext::registerObject(const rtl::OUString& _rName, const Referen
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(DatabaseAccessContext_Base::rBHelper.bDisposed);
- if ( !_rName.getLength() )
+ if ( _rName.isEmpty() )
throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
Reference< XDocumentDataSource > xDocDataSource( _rxObject, UNO_QUERY );
@@ -437,7 +437,7 @@ void ODatabaseContext::registerObject(const rtl::OUString& _rName, const Referen
throw IllegalArgumentException( ::rtl::OUString(), *this, 2 );
::rtl::OUString sURL = xModel->getURL();
- if ( !sURL.getLength() )
+ if ( sURL.isEmpty() )
throw IllegalArgumentException( DBACORE_RESSTRING( RID_STR_DATASOURCE_NOT_STORED ), *this,
2 );
registerDatabaseLocation( _rName, sURL );
@@ -501,7 +501,7 @@ void ODatabaseContext::storeTransientProperties( ODatabaseModelImpl& _rModelImpl
}
else
{
- OSL_ENSURE( ( sDocumentURL.getLength() == 0 ) && ( _rModelImpl.m_sName.getLength() == 0 ),
+ OSL_ENSURE( sDocumentURL.isEmpty() && _rModelImpl.m_sName.isEmpty() ,
"ODatabaseContext::storeTransientProperties: a non-empty data source which I do not
know?!" );
}
}
@@ -614,7 +614,7 @@ Any ODatabaseContext::getByName(const rtl::OUString& _rName) throw( NoSuchElemen
{
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(DatabaseAccessContext_Base::rBHelper.bDisposed);
- if ( !_rName.getLength() )
+ if ( _rName.isEmpty() )
throw NoSuchElementException(_rName, *this);
try
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 0f00945..c6574c7 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -207,7 +207,7 @@ ODatabaseDocument::ODatabaseDocument(const ::rtl::Reference<ODatabaseModelImpl>&
// so we can properly finish our initialization then.
impl_setInitializing();
- if ( m_pImpl->getURL().getLength() )
+ if ( !m_pImpl->getURL().isEmpty() )
{
// if the previous incarnation of the DatabaseDocument already had an URL, then
creating this incarnation
// here is effectively loading the document.
@@ -380,7 +380,7 @@ namespace
static Sequence< PropertyValue > lcl_appendFileNameToDescriptor( const
::comphelper::NamedValueCollection& _rDescriptor, const ::rtl::OUString _rURL )
{
::comphelper::NamedValueCollection aMutableDescriptor( _rDescriptor );
- if ( _rURL.getLength() )
+ if ( !_rURL.isEmpty() )
{
aMutableDescriptor.put( "FileName", _rURL );
aMutableDescriptor.put( "URL", _rURL );
@@ -723,7 +723,7 @@ void SAL_CALL ODatabaseDocument::recoverFromFile( const ::rtl::OUString& i_Sourc
{
DocumentGuard aGuard( *this, DocumentGuard::InitMethod );
- if ( i_SourceLocation.getLength() == 0 )
+ if ( i_SourceLocation.isEmpty() )
throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
try
@@ -747,7 +747,7 @@ void SAL_CALL ODatabaseDocument::recoverFromFile( const ::rtl::OUString& i_Sourc
// by definition (of XDocumentRecovery), we're responsible for delivering a
fully-initialized document,
// which includes an attachResource call.
- const ::rtl::OUString sLogicalDocumentURL( i_SalvagedFile.getLength() ? i_SalvagedFile :
i_SourceLocation );
+ const ::rtl::OUString sLogicalDocumentURL( i_SalvagedFile.isEmpty() ? i_SourceLocation
i_SalvagedFile );
impl_attachResource( sLogicalDocumentURL, aMediaDescriptor.getPropertyValues(), aGuard );
// <- SYNCHRONIZED
}
@@ -791,8 +791,8 @@ sal_Bool ODatabaseDocument::impl_attachResource( const ::rtl::OUString& i_rLogic
// if no URL has been provided, the caller was lazy enough to not call our getURL - which is
not allowed anymore,
// now since getURL and getLocation both return the same, so calling one of those should be
simple.
::rtl::OUString sDocumentURL( i_rLogicalDocumentURL );
- OSL_ENSURE( sDocumentURL.getLength(), "ODatabaseDocument::impl_attachResource: invalid URL!" );
- if ( !sDocumentURL.getLength() )
+ OSL_ENSURE( !sDocumentURL.isEmpty(), "ODatabaseDocument::impl_attachResource: invalid URL!" );
+ if ( sDocumentURL.isEmpty() )
sDocumentURL = getURL();
m_pImpl->setResource( sDocumentURL, i_rMediaDescriptor );
@@ -969,7 +969,7 @@ Reference< XInterface > SAL_CALL ODatabaseDocument::getCurrentSelection( ) thro
// XStorable
sal_Bool SAL_CALL ODatabaseDocument::hasLocation( ) throw (RuntimeException)
{
- return getLocation().getLength() > 0;
+ return !getLocation().isEmpty();
}
::rtl::OUString SAL_CALL ODatabaseDocument::getLocation( ) throw (RuntimeException)
@@ -991,7 +991,7 @@ void SAL_CALL ODatabaseDocument::store( ) throw (IOException, RuntimeException)
DocumentGuard aGuard( *this );
::rtl::OUString sDocumentURL( m_pImpl->getURL() );
- if ( sDocumentURL.getLength() )
+ if ( !sDocumentURL.isEmpty() )
{
if ( m_pImpl->getDocFileLocation() == m_pImpl->getURL() )
if ( m_pImpl->m_bDocumentReadOnly )
@@ -1003,7 +1003,7 @@ void SAL_CALL ODatabaseDocument::store( ) throw (IOException,
RuntimeException)
// if we have no URL, but did survive the DocumentGuard above, then we've been inited via
XLoadable::initNew,
// i.e. we're based on a temporary storage
- OSL_ENSURE( m_pImpl->getDocFileLocation().getLength() == 0, "ODatabaseDocument::store:
unexpected URL inconsistency!" );
+ OSL_ENSURE( m_pImpl->getDocFileLocation().isEmpty(), "ODatabaseDocument::store: unexpected URL
inconsistency!" );
try
{
@@ -1357,7 +1357,7 @@ void SAL_CALL ODatabaseDocument::removeDocumentEventListener( const
Reference< X
void SAL_CALL ODatabaseDocument::notifyDocumentEvent( const ::rtl::OUString& _EventName, const
Reference< XController2 >& _ViewController, const Any& _Supplement ) throw
(IllegalArgumentException, NoSupportException, RuntimeException)
{
- if ( !_EventName.getLength() )
+ if ( _EventName.isEmpty() )
throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
// SYNCHRONIZED ->
@@ -1425,7 +1425,7 @@ Reference< XNameAccess > ODatabaseDocument::impl_getDocumentContainer_throw(
ODa
{
::rtl::OUString sSupportService;
aValue >>= sSupportService;
- if ( sSupportService.getLength() )
+ if ( !sSupportService.isEmpty() )
{
Sequence<Any> aArgs(1);
aArgs[0] <<=
NamedValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DatabaseDocument")),makeAny(xMy));
@@ -1653,7 +1653,7 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >&
_r
if ( nDefVersion >= SvtSaveOptions::ODFVER_012 )
aVersion = ODFVER_012_TEXT;
- if ( aVersion.getLength() )
+ if ( !aVersion.isEmpty() )
{
try
{
@@ -1726,7 +1726,7 @@ Reference< XUIConfigurationManager > SAL_CALL
ODatabaseDocument::getUIConfigurat
rtl::OUString aMediaType;
Reference< XPropertySet > xPropSet( xConfigStorage, UNO_QUERY );
Any a = xPropSet->getPropertyValue( INFO_MEDIATYPE );
- if ( !( a >>= aMediaType ) || ( aMediaType.getLength() == 0 ))
+ if ( !( a >>= aMediaType ) || aMediaType.isEmpty() )
{
a <<= aUIConfigMediaType;
xPropSet->setPropertyValue( INFO_MEDIATYPE, a );
diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.cxx
b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
index 023267e..e8cdf0d 100644
--- a/dbaccess/source/core/dataaccess/databaseregistrations.cxx
+++ b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
@@ -218,7 +218,7 @@ namespace dbaccess
if ( !m_aConfigurationRoot.isValid() )
throw RuntimeException( ::rtl::OUString(), *this );
- if ( !_rName.getLength() )
+ if ( _rName.isEmpty() )
throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
return impl_getNodeForName_throw( _rName, _bMustExist );
@@ -226,7 +226,7 @@ namespace dbaccess
void DatabaseRegistrations::impl_checkValidLocation_throw( const ::rtl::OUString& _rLocation )
{
- if ( !_rLocation.getLength() )
+ if ( _rLocation.isEmpty() )
throw IllegalArgumentException( ::rtl::OUString(), *this, 2 );
INetURLObject aURL( _rLocation );
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx
b/dbaccess/source/core/dataaccess/datasource.cxx
index 8283b4e..8a077a5 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -381,11 +381,11 @@ Reference<XConnection> OSharedConnectionManager::getConnection( const
rtl::OUStr
::rtl::OUString sUser = user;
::rtl::OUString sPassword = password;
- if ((0 == sUser.getLength()) && (0 == sPassword.getLength()) && (0 !=
_pDataSource->m_pImpl->m_sUser.getLength()))
+ if ((sUser.isEmpty()) && (sPassword.isEmpty()) && (!_pDataSource->m_pImpl->m_sUser.isEmpty()))
{ // ease the usage of this method. data source which are intended to have a user
automatically
// fill in the user/password combination if the caller of this method does not specify
otherwise
sUser = _pDataSource->m_pImpl->m_sUser;
- if (0 != _pDataSource->m_pImpl->m_aPassword.getLength())
+ if (!_pDataSource->m_pImpl->m_aPassword.isEmpty())
sPassword = _pDataSource->m_pImpl->m_aPassword;
}
@@ -659,11 +659,11 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const
::rtl::O
::rtl::OUString sUser(_rUid);
::rtl::OUString sPwd(_rPwd);
- if ((0 == sUser.getLength()) && (0 == sPwd.getLength()) && (0 != m_pImpl->m_sUser.getLength()))
+ if ((sUser.isEmpty()) && (sPwd.isEmpty()) && (!m_pImpl->m_sUser.isEmpty()))
{ // ease the usage of this method. data source which are intended to have a user
automatically
// fill in the user/password combination if the caller of this method does not specify
otherwise
sUser = m_pImpl->m_sUser;
- if (0 != m_pImpl->m_aPassword.getLength())
+ if (!m_pImpl->m_aPassword.isEmpty())
sPwd = m_pImpl->m_aPassword;
}
@@ -671,8 +671,8 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const ::rtl::O
if (xManager.is())
{
sal_Int32 nAdditionalArgs(0);
- if (sUser.getLength()) ++nAdditionalArgs;
- if (sPwd.getLength()) ++nAdditionalArgs;
+ if (!sUser.isEmpty()) ++nAdditionalArgs;
+ if (!sPwd.isEmpty()) ++nAdditionalArgs;
Sequence< PropertyValue > aUserPwd(nAdditionalArgs);
sal_Int32 nArgPos = 0;
@@ -682,7 +682,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const ::rtl::O
aUserPwd[ nArgPos ].Value <<= sUser;
++nArgPos;
}
- if (sPwd.getLength())
+ if (!sPwd.isEmpty())
{
aUserPwd[ nArgPos ].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("password"));
aUserPwd[ nArgPos ].Value <<= sPwd;
@@ -832,7 +832,7 @@ sal_Bool ODatabaseSource::convertFastPropertyValue(Any & rConvertedValue, Any &
const PropertyValue* checkName = aValues.getConstArray();
for ( ;checkName != valueEnd; ++checkName )
{
- if ( !checkName->Name.getLength() )
+ if ( checkName->Name.isEmpty() )
throw IllegalArgumentException();
}
@@ -1121,7 +1121,7 @@ Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion(
const
::rtl::OUString sUser(m_pImpl->m_sUser), sPassword(m_pImpl->m_aPassword);
sal_Bool bNewPasswordGiven = sal_False;
- if (m_pImpl->m_bPasswordRequired && (0 == sPassword.getLength()))
+ if (m_pImpl->m_bPasswordRequired && sPassword.isEmpty())
{ // we need a password, but don't have one yet.
// -> ask the user
@@ -1142,7 +1142,7 @@ Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion(
const
aRequest.HasRealm = aRequest.HasAccount = sal_False;
aRequest.HasUserName = aRequest.HasPassword = sal_True;
aRequest.UserName = m_pImpl->m_sUser;
- aRequest.Password = m_pImpl->m_sFailedPassword.getLength() ? m_pImpl->m_sFailedPassword :
m_pImpl->m_aPassword;
+ aRequest.Password = m_pImpl->m_sFailedPassword.isEmpty() ? m_pImpl->m_aPassword :
m_pImpl->m_sFailedPassword;
OInteractionRequest* pRequest = new OInteractionRequest(makeAny(aRequest));
Reference< XInteractionRequest > xRequest(pRequest);
// some knittings
@@ -1262,7 +1262,7 @@ Reference< XNameAccess > SAL_CALL ODatabaseSource::getQueryDefinitions( )
throw(
{
::rtl::OUString sSupportService;
aValue >>= sSupportService;
- if ( sSupportService.getLength() )
+ if ( !sSupportService.isEmpty() )
{
Sequence<Any> aArgs(1);
aArgs[0] <<=
NamedValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataSource")),makeAny(xMy));
diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index dcbe01c..bf95e7c 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -200,7 +200,7 @@ void SAL_CALL ODefinitionContainer::removeByName( const ::rtl::OUString& _rName
ResettableMutexGuard aGuard(m_aMutex);
// check the arguments
- if (!_rName.getLength())
+ if (_rName.isEmpty())
throw IllegalArgumentException();
if (!checkExistence(_rName))
@@ -573,7 +573,7 @@ void ODefinitionContainer::implReplace(const ::rtl::OUString& _rName, const Refe
void ODefinitionContainer::approveNewObject(const ::rtl::OUString& _sName,const Reference<
XContent >& _rxObject) const
{
// check the arguments
- if ( !_sName.getLength() )
+ if ( _sName.isEmpty() )
throw IllegalArgumentException(
DBA_RES( RID_STR_NAME_MUST_NOT_BE_EMPTY ),
*this,
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx
b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index 833c621..e5c485e 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -225,7 +225,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
const Sequence< PropertyValue > aCreationArgs( aArgs.getPropertyValues() );
const ODefinitionContainer_Impl& rDefinitions( getDefinitions() );
- sal_Bool bNew = ( 0 == sPersistentName.getLength() );
+ sal_Bool bNew = sPersistentName.isEmpty();
if ( bNew )
{
const static ::rtl::OUString sBaseName(RTL_CONSTASCII_USTRINGPARAM("Obj"));
@@ -236,7 +236,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
if ( xElements.is() )
sPersistentName = ::dbtools::createUniqueName(xElements,sPersistentName);
- const bool bNeedClassID = ( aClassID.getLength() == 0 ) && ( 0 == sURL.getLength() );
+ const bool bNeedClassID = (0 == aClassID.getLength()) && sURL.isEmpty() ;
if ( xCopyFrom.is() )
{
Sequence<Any> aIni(2);
@@ -259,9 +259,9 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
{
if ( bNeedClassID )
{
- if ( sMediaType.getLength() )
+ if ( !sMediaType.isEmpty() )
ODocumentDefinition::GetDocumentServiceFromMediaType( sMediaType,
m_aContext, aClassID );
- else if ( sDocServiceName.getLength() )
+ else if ( !sDocServiceName.isEmpty() )
{
::comphelper::MimeConfigurationHelper aConfigHelper(
m_aContext.getLegacyServiceFactory() );
const Sequence< NamedValue > aProps(
aConfigHelper.GetObjectPropsByDocumentName( sDocServiceName ) );
@@ -298,7 +298,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
}
xContent = pDocDef.get();
- if ( sURL.getLength() )
+ if ( !sURL.isEmpty() )
{
Sequence<Any> aIni(2);
aIni[0] <<= sURL;
@@ -331,7 +331,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
xCopyFrom.set(aValue.Value,UNO_QUERY);
}
}
- OSL_ENSURE(sName.getLength(),"Invalid name for a document container!");
+ OSL_ENSURE(!sName.isEmpty(),"Invalid name for a document container!");
const ODefinitionContainer_Impl& rDefinitions( getDefinitions() );
ODefinitionContainer_Impl::const_iterator aFind = rDefinitions.find( sName );
TContentPtr pElementImpl;
@@ -622,7 +622,7 @@ void SAL_CALL ODocumentContainer::insertByHierarchicalName( const ::rtl::OUStrin
void SAL_CALL ODocumentContainer::removeByHierarchicalName( const ::rtl::OUString& _sName ) throw
(NoSuchElementException, WrappedTargetException, RuntimeException)
{
- if ( !_sName.getLength() )
+ if ( _sName.isEmpty() )
throw NoSuchElementException(_sName,*this);
ClearableMutexGuard aGuard(m_aMutex);
@@ -731,7 +731,7 @@ void SAL_CALL ODocumentContainer::removeByName( const ::rtl::OUString& _rName )
ResettableMutexGuard aGuard(m_aMutex);
// check the arguments
- if (!_rName.getLength())
+ if (_rName.isEmpty())
throw IllegalArgumentException();
if (!checkExistence(_rName))
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx
b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 9321f61..5fafb3d 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -397,7 +397,7 @@ namespace dbaccess
::comphelper::MimeConfigurationHelper aConfigHelper( _rContext.getLegacyServiceFactory() );
sResult = aConfigHelper.GetDocServiceNameFromMediaType( _rMediaType );
_rClassId =
aConfigHelper.GetSequenceClassIDRepresentation(aConfigHelper.GetExplicitlyRegisteredObjClassID(
_rMediaType ));
- if ( !_rClassId.getLength() && sResult.getLength() )
+ if ( !_rClassId.getLength() && !sResult.isEmpty() )
{
Reference< XNameAccess > xObjConfig = aConfigHelper.GetObjConfiguration();
if ( xObjConfig.is() )
@@ -544,7 +544,7 @@ void SAL_CALL ODocumentDefinition::getFastPropertyValue( Any& o_rValue, sal_Int3
if ( i_nHandle == PROPERTY_ID_PERSISTENT_PATH )
{
::rtl::OUString sPersistentPath;
- if ( m_pImpl->m_aProps.sPersistentName.getLength() )
+ if ( !m_pImpl->m_aProps.sPersistentName.isEmpty() )
{
::rtl::OUStringBuffer aBuffer;
aBuffer.append( ODatabaseModelImpl::getObjectContainerStorageName( m_bForm ?
ODatabaseModelImpl::E_FORM : ODatabaseModelImpl::E_REPORT ) );
@@ -936,9 +936,9 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
OSL_FAIL( "unreachable" );
}
- OSL_ENSURE( m_pImpl->m_aProps.sPersistentName.getLength(),
+ OSL_ENSURE( !m_pImpl->m_aProps.sPersistentName.isEmpty(),
"ODocumentDefinition::onCommandOpenSomething: no persistent name - cannot load!" );
- if ( !m_pImpl->m_aProps.sPersistentName.getLength() )
+ if ( m_pImpl->m_aProps.sPersistentName.isEmpty() )
return Any();
// embedded objects themself do not support the hidden flag. We implement support for
@@ -1204,7 +1204,7 @@ void ODocumentDefinition::onCommandInsert( const ::rtl::OUString& _sURL,
const R
osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex );
// Check, if all required properties were set.
- if ( !_sURL.getLength() || m_xEmbeddedObject.is() )
+ if ( _sURL.isEmpty() || m_xEmbeddedObject.is() )
{
OSL_FAIL( "Content::onCommandInsert - property value missing!" );
@@ -1275,7 +1275,7 @@ sal_Bool ODocumentDefinition::save(sal_Bool _bApprove)
Reference<XNameAccess> xName(m_xParentContainer,UNO_QUERY);
DocumentSaveRequest aRequest;
aRequest.Name = m_pImpl->m_aProps.aTitle;
- if ( !aRequest.Name.getLength() )
+ if ( aRequest.Name.isEmpty() )
{
if ( m_bForm )
aRequest.Name = DBACORE_RESSTRING( RID_STR_FORM );
@@ -1291,7 +1291,7 @@ sal_Bool ODocumentDefinition::save(sal_Bool _bApprove)
// two continuations allowed: OK and Cancel
ODocumentSaveContinuation* pDocuSave = NULL;
- if ( !m_pImpl->m_aProps.aTitle.getLength() )
+ if ( m_pImpl->m_aProps.aTitle.isEmpty() )
{
pDocuSave = new ODocumentSaveContinuation;
pRequest->addContinuation(pDocuSave);
@@ -1356,7 +1356,7 @@ sal_Bool ODocumentDefinition::saveAs()
{
osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex );
- if ( !m_pImpl->m_aProps.aTitle.getLength() )
+ if ( m_pImpl->m_aProps.aTitle.isEmpty() )
{
aGuard.clear();
return save(sal_False); // (sal_False) : we don't want an approve dialog
@@ -1612,7 +1612,7 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference<
XC
aMediaDesc.put( "ComponentData", aComponentData.getPropertyValues() );
}
- if ( m_pImpl->m_aProps.aTitle.getLength() )
+ if ( !m_pImpl->m_aProps.aTitle.isEmpty() )
aMediaDesc.put( "DocumentTitle", m_pImpl->m_aProps.aTitle );
aMediaDesc.put( "DocumentBaseURL", m_pImpl->m_pDataSource->getURL() );
@@ -2129,7 +2129,7 @@ void ODocumentDefinition::updateDocumentTitle()
::rtl::OUString sName = m_pImpl->m_aProps.aTitle;
if ( m_pImpl->m_pDataSource )
{
- if ( !sName.getLength() )
+ if ( sName.isEmpty() )
{
if ( m_bForm )
sName = DBACORE_RESSTRING( RID_STR_FORM );
diff --git a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
index e1f8982..9d5420f 100644
--- a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
+++ b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
@@ -194,7 +194,7 @@ namespace dbaccess
( sEventType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Script" ) )
|| sEventType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Service" ) )
);
- bool bNonEmptyScript = sScript.getLength() != 0;
+ bool bNonEmptyScript = !sScript.isEmpty();
OSL_ENSURE( bDispatchScriptURL && bNonEmptyScript,
"DocumentEventExecutor::documentEventOccurred: invalid/unsupported script
descriptor" );
diff --git a/dbaccess/source/core/dataaccess/documentevents.cxx
b/dbaccess/source/core/dataaccess/documentevents.cxx
index ebfef4b..5b29c96 100644
--- a/dbaccess/source/core/dataaccess/documentevents.cxx
+++ b/dbaccess/source/core/dataaccess/documentevents.cxx
@@ -183,15 +183,15 @@ namespace dbaccess
if ( aCheck.has( "EventType" ) )
{
::rtl::OUString sEventType = aCheck.getOrDefault( "EventType", ::rtl::OUString() );
- OSL_ENSURE( sEventType.getLength(), "DocumentEvents::replaceByName: doing a reset via
an empty EventType is weird!" );
- if ( !sEventType.getLength() )
+ OSL_ENSURE( !sEventType.isEmpty(), "DocumentEvents::replaceByName: doing a reset via
an empty EventType is weird!" );
+ if ( sEventType.isEmpty() )
aEventDescriptor.realloc( 0 );
}
if ( aCheck.has( "Script" ) )
{
::rtl::OUString sScript = aCheck.getOrDefault( "Script", ::rtl::OUString() );
- OSL_ENSURE( sScript.getLength(), "DocumentEvents::replaceByName: doing a reset via an
empty Script is weird!" );
- if ( !sScript.getLength() )
+ OSL_ENSURE( !sScript.isEmpty(), "DocumentEvents::replaceByName: doing a reset via an
empty Script is weird!" );
+ if ( sScript.isEmpty() )
aEventDescriptor.realloc( 0 );
}
diff --git a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
index a243438..2aa89b6 100644
--- a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
+++ b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
@@ -152,7 +152,7 @@ rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
if ( (size_t)nIndex < m_pImpl->m_aResults.size() )
{
rtl::OUString aId = m_pImpl->m_aResults[ nIndex ]->aId;
- if ( aId.getLength() )
+ if ( !aId.isEmpty() )
{
// Already cached.
return aId;
@@ -164,7 +164,7 @@ rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
rtl::OUString aId
= m_pImpl->m_xContent->getIdentifier()->getContentIdentifier();
- if ( aId.getLength() )
+ if ( !aId.isEmpty() )
aId += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
aId += m_pImpl->m_aResults[ nIndex ]->rData.aTitle;
@@ -191,7 +191,7 @@ DataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
}
rtl::OUString aId = queryContentIdentifierString( nIndex );
- if ( aId.getLength() )
+ if ( !aId.isEmpty() )
{
Reference< XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( aId );
m_pImpl->m_aResults[ nIndex ]->xId = xId;
diff --git a/dbaccess/source/core/inc/composertools.hxx b/dbaccess/source/core/inc/composertools.hxx
index eaaba4c..aed35ec 100644
--- a/dbaccess/source/core/inc/composertools.hxx
+++ b/dbaccess/source/core/inc/composertools.hxx
@@ -91,7 +91,7 @@ namespace dbaccess
#ifdef DBG_UTIL
OSL_ENSURE( !m_bUsed, "FilterCreator::append: already used up!" );
#endif
- if ( lhs.getLength() )
+ if ( !lhs.isEmpty() )
{
if ( m_aBuffer.getLength() )
appendNonEmptyToNonEmpty( lhs );
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index 4489044..ba4e2e0 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -227,7 +227,7 @@ uno::Reference< chart2::data::XDataSource > SAL_CALL DatabaseDataProvider::creat
aArgs.getOrDefault( "ColumnDescriptions", uno::Sequence< ::rtl::OUString >() );
bool bRet = false;
- if ( m_Command.getLength() != 0 && m_xActiveConnection.is() )
+ if ( !m_Command.isEmpty() && m_xActiveConnection.is() )
{
try
{
@@ -713,7 +713,7 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat
sal_Int32 nLastNonEmptyColName = aImposedColumnNames.getLength() - 1;
for ( ; nLastNonEmptyColName >= 0; --nLastNonEmptyColName )
{
- if ( aImposedColumnNames[ nLastNonEmptyColName ].getLength() != 0 )
+ if ( !aImposedColumnNames[ nLastNonEmptyColName ].isEmpty() )
break;
}
aImposedColumnNames.realloc( nLastNonEmptyColName + 1 );
@@ -722,7 +722,7 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat
// column. This, this results in a ColumnDescriptions array like <"", "col2", "col3">,
where you'd expect
// <"col1", "col2", "col3">.
// Fix this with some heuristics:
- if ( ( aImposedColumnNames.getLength() > 0 ) && ( aImposedColumnNames[0].getLength() == 0
) )
+ if ( ( aImposedColumnNames.getLength() > 0 ) && ( !aImposedColumnNames[0].isEmpty() ) )
{
const sal_Int32 nAssumedRowSetColumnIndex = _bHasCategories ? 1 : 0;
if ( nAssumedRowSetColumnIndex < aRowSetColumnNames.getLength() )
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index ec1041b..a17214b 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -198,7 +198,7 @@ String ODsnTypeCollection::getDatasourcePrefixFromMediaType(const ::rtl::OUStrin
sURL = *pIter;
break;
}
- if ( !sFileExtension.getLength() && _sExtension.getLength() )
+ if ( sFileExtension.isEmpty() && !_sExtension.isEmpty() )
sFallbackURL = *pIter;
}
}
@@ -329,11 +329,11 @@ bool ODsnTypeCollection::isEmbeddedDatabase( const ::rtl::OUString& _sURL )
cons
static const ::rtl::OUString
s_sValue(RTL_CONSTASCII_USTRINGPARAM("EmbeddedDatabases/DefaultEmbeddedDatabase/Value"));
aInstalled.getNodeValue(s_sValue) >>= sEmbeddedDatabaseURL;
- if ( sEmbeddedDatabaseURL.getLength() )
+ if ( !sEmbeddedDatabaseURL.isEmpty() )
aInstalled.getNodeValue(s_sValue +
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + sEmbeddedDatabaseURL +
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/URL"))) >>= sEmbeddedDatabaseURL;
}
}
- if ( !sEmbeddedDatabaseURL.getLength() )
+ if ( sEmbeddedDatabaseURL.isEmpty() )
sEmbeddedDatabaseURL =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:embedded:hsqldb"));
return sEmbeddedDatabaseURL;
}
diff --git a/dbaccess/source/core/misc/sdbcoretools.cxx b/dbaccess/source/core/misc/sdbcoretools.cxx
index 6d87254..2c37862 100644
--- a/dbaccess/source/core/misc/sdbcoretools.cxx
+++ b/dbaccess/source/core/misc/sdbcoretools.cxx
@@ -114,7 +114,7 @@ namespace dbaccess
DBG_UNHANDLED_EXCEPTION();
}
- if ( !sDisplayMessage.getLength() )
+ if ( sDisplayMessage.isEmpty() )
{
Exception aExcept;
_rError >>= aExcept;
diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx
b/dbaccess/source/core/recovery/dbdocrecovery.cxx
index 099af98..965c2f8 100644
--- a/dbaccess/source/core/recovery/dbdocrecovery.cxx
+++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx
@@ -218,7 +218,7 @@ namespace dbaccess
::rtl::OUString sLine = xTextInput->readLine();
lcl_stripTrailingLineFeed( sLine );
- if ( sLine.getLength() == 0 )
+ if ( sLine.isEmpty() )
continue;
if ( lcl_isSectionStart( sLine, sCurrentSection ) )
diff --git a/dbaccess/source/core/recovery/settingsimport.cxx
b/dbaccess/source/core/recovery/settingsimport.cxx
index 432fdf2..fd46b17 100644
--- a/dbaccess/source/core/recovery/settingsimport.cxx
+++ b/dbaccess/source/core/recovery/settingsimport.cxx
@@ -194,7 +194,7 @@ namespace dbaccess
SettingsImport::endElement();
const ::rtl::OUString sItemName( getItemName() );
- ENSURE_OR_RETURN_VOID( sItemName.getLength(), "no item name -> no item value" );
+ ENSURE_OR_RETURN_VOID( !sItemName.isEmpty(), "no item name -> no item value" );
Any aValue;
getItemValue( aValue );
m_rSettings.put( sItemName, aValue );
@@ -210,7 +210,7 @@ namespace dbaccess
const ::rtl::OUString sValue = aCharacters.makeStringAndClear();
const ::rtl::OUString& rItemType( getItemType() );
- ENSURE_OR_RETURN_VOID( rItemType.getLength(), "no item type -> no item value" );
+ ENSURE_OR_RETURN_VOID( !rItemType.isEmpty(), "no item type -> no item value" );
if ( ::xmloff::token::IsXMLToken( rItemType, ::xmloff::token::XML_INT ) )
{
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index fab1295..0f05195 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -585,7 +585,7 @@ namespace dbaccess
// load/create the sub component hidden. We'll show it when the main app window is shown.
aLoadArgs.put( "Hidden", true );
- if ( i_rComponentName.getLength() )
+ if ( !i_rComponentName.isEmpty() )
{
xDocDefinition = lcl_getSubComponentDef_nothrow( m_xDocumentUI, m_eType,
i_rComponentName );
xSubComponent.set( m_xDocumentUI->loadComponentWithArguments(
@@ -646,7 +646,7 @@ namespace dbaccess
aLoadArgs.put( "CurrentQueryDesign", aCurrentQueryDesign );
aLoadArgs.put( "Hidden", true );
- if ( i_rComponentName.getLength() )
+ if ( !i_rComponentName.isEmpty() )
{
xSubComponent.set( m_xDocumentUI->loadComponentWithArguments(
m_eType,
diff --git a/dbaccess/source/ext/adabas/Acomponentmodule.cxx
b/dbaccess/source/ext/adabas/Acomponentmodule.cxx
index 6f15393..f139b02 100644
--- a/dbaccess/source/ext/adabas/Acomponentmodule.cxx
+++ b/dbaccess/source/ext/adabas/Acomponentmodule.cxx
@@ -244,7 +244,7 @@ namespace COMPMOD_NAMESPACE
const Reference< XMultiServiceFactory >& _rxServiceManager)
{
OSL_ENSURE(_rxServiceManager.is(), "OModule::getComponentFactory : invalid argument
(service manager) !");
- OSL_ENSURE(_rImplementationName.getLength(), "OModule::getComponentFactory : invalid
argument (implementation name) !");
+ OSL_ENSURE(!_rImplementationName.isEmpty(), "OModule::getComponentFactory : invalid
argument (implementation name) !");
if (!s_pImplementationNames)
{
diff --git a/dbaccess/source/ext/macromigration/docinteraction.cxx
b/dbaccess/source/ext/macromigration/docinteraction.cxx
index 021c23b..25940ac 100644
--- a/dbaccess/source/ext/macromigration/docinteraction.cxx
+++ b/dbaccess/source/ext/macromigration/docinteraction.cxx
@@ -105,7 +105,7 @@ namespace dbmm
DocumentPasswordRequest aRequest(
::rtl::OUString(), NULL,
InteractionClassification_QUERY,
- _io_rPassword.getLength() ? PasswordRequestMode_PASSWORD_REENTER :
PasswordRequestMode_PASSWORD_ENTER,
+ _io_rPassword.isEmpty() ? PasswordRequestMode_PASSWORD_ENTER :
PasswordRequestMode_PASSWORD_REENTER,
_rDocumentName
);
diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx
b/dbaccess/source/ext/macromigration/migrationengine.cxx
index d2977ee..54be4c4 100644
--- a/dbaccess/source/ext/macromigration/migrationengine.cxx
+++ b/dbaccess/source/ext/macromigration/migrationengine.cxx
@@ -1069,8 +1069,8 @@ namespace dbmm
SubDocuments& _out_rDocs, const SubDocumentType _eType, size_t& _io_counter )
{
const ::rtl::OUString sHierarhicalBase(
- _rContainerLoc.getLength() ? ::rtl::OUStringBuffer( _rContainerLoc
).appendAscii( "/" ).makeStringAndClear()
- : ::rtl::OUString() );
+ _rContainerLoc.isEmpty() ? ::rtl::OUString() :
+ ::rtl::OUStringBuffer( _rContainerLoc ).appendAscii(
"/" ).makeStringAndClear());
Sequence< ::rtl::OUString > aElementNames( _rxContainer->getElementNames() );
for ( const ::rtl::OUString* elementName = aElementNames.getConstArray();
@@ -1625,8 +1625,8 @@ namespace dbmm
bool MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow( const ::rtl::OUString&
_rScriptType,
::rtl::OUString& _inout_rScriptCode ) const
{
- OSL_PRECOND( _inout_rScriptCode.getLength(),
"MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow: invalid script!" );
- if ( !_inout_rScriptCode.getLength() )
+ OSL_PRECOND( !_inout_rScriptCode.isEmpty(),
"MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow: invalid script!" );
+ if ( _inout_rScriptCode.isEmpty() )
return false;
bool bSuccess = false;
@@ -1634,7 +1634,7 @@ namespace dbmm
try
{
if ( !_rScriptType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Script" ) )
- || !_rScriptType.getLength()
+ || _rScriptType.isEmpty()
)
{
OSL_FAIL(
@@ -1724,7 +1724,7 @@ namespace dbmm
//--------------------------------------------------------------------
bool MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow( ScriptEventDescriptor&
_inout_rScriptEvent ) const
{
- if ( _inout_rScriptEvent.ScriptType.getLength() &&
_inout_rScriptEvent.ScriptCode.getLength() )
+ if ( !(_inout_rScriptEvent.ScriptType.isEmpty() ||
_inout_rScriptEvent.ScriptCode.isEmpty()) )
return impl_adjustScriptLibrary_nothrow( _inout_rScriptEvent.ScriptType,
_inout_rScriptEvent.ScriptCode );
return false;
}
@@ -1749,7 +1749,7 @@ namespace dbmm
) );
}
- if ( sScriptType.getLength() && sScript.getLength() )
+ if ( !(sScriptType.isEmpty() || sScript.isEmpty()) )
if ( !impl_adjustScriptLibrary_nothrow( sScriptType, sScript ) )
return false;
diff --git a/dbaccess/source/ext/macromigration/migrationerror.hxx
b/dbaccess/source/ext/macromigration/migrationerror.hxx
index aee93d1..9b7440a 100644
--- a/dbaccess/source/ext/macromigration/migrationerror.hxx
+++ b/dbaccess/source/ext/macromigration/migrationerror.hxx
@@ -160,9 +160,9 @@ namespace dbmm
const ::rtl::OUString& _rDetail3 = ::rtl::OUString()
)
{
- if ( _rDetail1.getLength() ) aErrorDetails.push_back( _rDetail1 );
- if ( _rDetail2.getLength() ) aErrorDetails.push_back( _rDetail2 );
- if ( _rDetail3.getLength() ) aErrorDetails.push_back( _rDetail3 );
+ if ( !_rDetail1.isEmpty() ) aErrorDetails.push_back( _rDetail1 );
+ if ( !_rDetail2.isEmpty() ) aErrorDetails.push_back( _rDetail2 );
+ if ( !_rDetail3.isEmpty() ) aErrorDetails.push_back( _rDetail3 );
}
};
diff --git a/dbaccess/source/ext/macromigration/migrationlog.cxx
b/dbaccess/source/ext/macromigration/migrationlog.cxx
index db39028..38ded5a 100644
--- a/dbaccess/source/ext/macromigration/migrationlog.cxx
+++ b/dbaccess/source/ext/macromigration/migrationlog.cxx
@@ -442,7 +442,7 @@ namespace dbmm
{
::rtl::OUStringBuffer aBuffer;
- if ( m_pData->sBackupLocation.getLength() )
+ if ( !m_pData->sBackupLocation.isEmpty() )
{
String sBackedUp( MacroMigrationResId( STR_SAVED_COPY_TO ) );
sBackedUp.SearchAndReplaceAllAscii( "$location$", m_pData->sBackupLocation );
diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx
index 4739d36..e03e9c0 100644
--- a/dbaccess/source/filter/xml/dbloader2.cxx
+++ b/dbaccess/source/filter/xml/dbloader2.cxx
@@ -154,8 +154,8 @@ DBTypeDetection::DBTypeDetection(const Reference< XMultiServiceFactory >& _rxFac
{
::rtl::OUString sSalvagedURL( aMedia.getOrDefault( "SalvagedFile", ::rtl::OUString() )
);
- ::rtl::OUString sFileLocation( sSalvagedURL.getLength() ? sSalvagedURL : sURL );
- if ( sFileLocation.getLength() )
+ ::rtl::OUString sFileLocation( sSalvagedURL.isEmpty() ? sURL : sSalvagedURL );
+ if ( !sFileLocation.isEmpty() )
{
xStorageProperties.set( ::comphelper::OStorageHelper::GetStorageFromURL(
sFileLocation, ElementModes::READ, m_aContext.getLegacyServiceFactory() ),
UNO_QUERY );
@@ -521,7 +521,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const ::
// If it already *does* have an URL, then it was either passed in the arguments, or a
previous incarnation
// of that model existed before (which can happen if a model is closed, but an associated
DataSource is kept
// alive 'til loading the document again).
- bool bNeedLoad = ( xModel->getURL().getLength() == 0 );
+ bool bNeedLoad = ( xModel->getURL().isEmpty() );
try
{
aMediaDesc.put( "FileName", _rURL );
diff --git a/dbaccess/source/filter/xml/xmlAutoStyle.cxx
b/dbaccess/source/filter/xml/xmlAutoStyle.cxx
index 917940e..b429371 100644
--- a/dbaccess/source/filter/xml/xmlAutoStyle.cxx
+++ b/dbaccess/source/filter/xml/xmlAutoStyle.cxx
@@ -62,7 +62,7 @@ void OXMLAutoStylePoolP::exportStyleAttributes(
if ( i->maValue >>= nNumberFormat )
{
rtl::OUString sAttrValue = rODBExport.getDataStyleName(nNumberFormat);
- if ( sAttrValue.getLength() )
+ if ( !sAttrValue.isEmpty() )
{
GetExport().AddAttribute(
aPropMapper->GetEntryNameSpace(i->mnIndex),
diff --git a/dbaccess/source/filter/xml/xmlColumn.cxx b/dbaccess/source/filter/xml/xmlColumn.cxx
index 81e15dd..8916e2f 100644
--- a/dbaccess/source/filter/xml/xmlColumn.cxx
+++ b/dbaccess/source/filter/xml/xmlColumn.cxx
@@ -94,10 +94,10 @@ OXMLColumn::OXMLColumn( ODBFilter& rImport
break;
case XML_TOK_COLUMN_TYPE_NAME:
sType = sValue;
- OSL_ENSURE(sType.getLength(),"No type name set");
+ OSL_ENSURE(!sType.isEmpty(),"No type name set");
break;
case XML_TOK_COLUMN_DEFAULT_VALUE:
- if ( sValue.getLength() && sType.getLength() )
+ if ( !(sValue.isEmpty() || sType.isEmpty()) )
m_aDefaultValue <<= sValue;
break;
case XML_TOK_COLUMN_VISIBLE:
@@ -120,14 +120,14 @@ OXMLColumn::~OXMLColumn()
void OXMLColumn::EndElement()
{
Reference<XDataDescriptorFactory> xFac(m_xParentContainer,UNO_QUERY);
- if ( xFac.is() && m_sName.getLength() )
+ if ( xFac.is() && !m_sName.isEmpty() )
{
Reference<XPropertySet> xProp(xFac->createDataDescriptor());
if ( xProp.is() )
{
xProp->setPropertyValue(PROPERTY_NAME,makeAny(m_sName));
xProp->setPropertyValue(PROPERTY_HIDDEN,makeAny(m_bHidden));
- if ( m_sHelpMessage.getLength() )
+ if ( !m_sHelpMessage.isEmpty() )
xProp->setPropertyValue(PROPERTY_HELPTEXT,makeAny(m_sHelpMessage));
if ( m_aDefaultValue.hasValue() )
@@ -138,7 +138,7 @@ void OXMLColumn::EndElement()
xAppend->appendByDescriptor(xProp);
m_xParentContainer->getByName(m_sName) >>= xProp;
- if ( m_sStyleName.getLength() )
+ if ( !m_sStyleName.isEmpty() )
{
const SvXMLStylesContext* pAutoStyles = GetOwnImport().GetAutoStyles();
if ( pAutoStyles )
@@ -150,7 +150,7 @@ void OXMLColumn::EndElement()
}
}
}
- if ( m_sCellStyleName.getLength() )
+ if ( !m_sCellStyleName.isEmpty() )
{
const SvXMLStylesContext* pAutoStyles = GetOwnImport().GetAutoStyles();
if ( pAutoStyles )
@@ -167,7 +167,7 @@ void OXMLColumn::EndElement()
}
}
- else if ( m_sCellStyleName.getLength() )
+ else if ( !m_sCellStyleName.isEmpty() )
{
const SvXMLStylesContext* pAutoStyles = GetOwnImport().GetAutoStyles();
if ( pAutoStyles )
diff --git a/dbaccess/source/filter/xml/xmlComponent.cxx
b/dbaccess/source/filter/xml/xmlComponent.cxx
index c5b10b9..290b43e 100644
--- a/dbaccess/source/filter/xml/xmlComponent.cxx
+++ b/dbaccess/source/filter/xml/xmlComponent.cxx
@@ -88,7 +88,7 @@ OXMLComponent::OXMLComponent( ODBFilter& rImport
break;
}
}
- if ( m_sHREF.getLength() && m_sName.getLength() && _xParentContainer.is() )
+ if ( !m_sHREF.isEmpty() && !m_sName.isEmpty() && _xParentContainer.is() )
{
Sequence< Any > aArguments(3);
PropertyValue aValue;
diff --git a/dbaccess/source/filter/xml/xmlConnectionResource.cxx
b/dbaccess/source/filter/xml/xmlConnectionResource.cxx
index b8a2de4..df19b2c 100644
--- a/dbaccess/source/filter/xml/xmlConnectionResource.cxx
+++ b/dbaccess/source/filter/xml/xmlConnectionResource.cxx
@@ -90,7 +90,7 @@ OXMLConnectionResource::OXMLConnectionResource( ODBFilter& rImport,
aProperty.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Actuate"));
break;
}
- if ( aProperty.Name.getLength() )
+ if ( !aProperty.Name.isEmpty() )
{
if ( !aProperty.Value.hasValue() )
aProperty.Value <<= sValue;
diff --git a/dbaccess/source/filter/xml/xmlDataSource.cxx
b/dbaccess/source/filter/xml/xmlDataSource.cxx
index ca47d81..c2130d1 100644
--- a/dbaccess/source/filter/xml/xmlDataSource.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSource.cxx
@@ -168,7 +168,7 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
aProperty.Name =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JavaDriverClassPath"));
break;
}
- if ( aProperty.Name.getLength() )
+ if ( !aProperty.Name.isEmpty() )
{
if ( !aProperty.Value.hasValue() )
aProperty.Value <<= sValue;
diff --git a/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
b/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
index 7585549..8d31591 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
@@ -102,7 +102,7 @@ OXMLDataSourceInfo::OXMLDataSourceInfo( ODBFilter& rImport
bFoundCharset = true;
break;
}
- if ( aProperty.Name.getLength() )
+ if ( !aProperty.Name.isEmpty() )
{
aProperty.Value <<= sValue;
rImport.addInfo(aProperty);
diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
index dea6624..bbe086f 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
@@ -138,7 +138,7 @@ SvXMLImportContext* OXMLDataSourceSetting::CreateChildContext(
// -----------------------------------------------------------------------------
void OXMLDataSourceSetting::EndElement()
{
- if ( m_aSetting.Name.getLength() )
+ if ( !m_aSetting.Name.isEmpty() )
{
if ( m_bIsList && m_aInfoSequence.getLength() )
m_aSetting.Value <<= m_aInfoSequence;
diff --git a/dbaccess/source/filter/xml/xmlDatabase.cxx b/dbaccess/source/filter/xml/xmlDatabase.cxx
index 0fa088b..223c0be 100644
--- a/dbaccess/source/filter/xml/xmlDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlDatabase.cxx
@@ -86,7 +86,7 @@ SvXMLImportContext* OXMLDatabase::CreateChildContext(
::rtl::OUString sService;
dbtools::getDataSourceSetting(GetOwnImport().getDataSource(),"Forms",aValue);
aValue >>= sService;
- if ( !sService.getLength() )
+ if ( sService.isEmpty() )
{
Reference<XFormDocumentsSupplier> xSup(GetOwnImport().GetModel(),UNO_QUERY);
if ( xSup.is() )
@@ -101,7 +101,7 @@ SvXMLImportContext* OXMLDatabase::CreateChildContext(
::rtl::OUString sService;
dbtools::getDataSourceSetting(GetOwnImport().getDataSource(),"Reports",aValue);
aValue >>= sService;
- if ( !sService.getLength() )
+ if ( sService.isEmpty() )
{
Reference<XReportDocumentsSupplier> xSup(GetOwnImport().GetModel(),UNO_QUERY);
if ( xSup.is() )
@@ -116,7 +116,7 @@ SvXMLImportContext* OXMLDatabase::CreateChildContext(
::rtl::OUString sService;
dbtools::getDataSourceSetting(GetOwnImport().getDataSource(),"CommandDefinitions",aValue);
aValue >>= sService;
- if ( !sService.getLength() )
+ if ( sService.isEmpty() )
{
Reference<XQueryDefinitionsSupplier>
xSup(GetOwnImport().getDataSource(),UNO_QUERY);
if ( xSup.is() )
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 9da1a0e..6c2903f 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -472,7 +472,7 @@ void ODBExport::exportDataSource()
aSettingsMap.insert(TSettingsMap::value_type(eToken,sValue));
}
- if ( bAutoIncrementEnabled && (aAutoIncrement.first.getLength() ||
aAutoIncrement.second.getLength()) )
+ if ( bAutoIncrementEnabled && !(aAutoIncrement.first.isEmpty() &&
aAutoIncrement.second.isEmpty()) )
m_aAutoIncrement.reset( new TStringPair(aAutoIncrement));
if ( aDelimiter.bUsed )
m_aDelimiter.reset( new TDelimiter( aDelimiter ) );
@@ -585,7 +585,7 @@ void ODBExport::exportConnectionData()
OSL_VERIFY( xProp->getPropertyValue( PROPERTY_SETTINGS ) >>=
xDataSourceSettings );
xDataSourceSettings->getPropertyValue( INFO_TEXTFILEEXTENSION ) >>=
sExtension;
}
- if ( sExtension.getLength() )
+ if ( !sExtension.isEmpty() )
AddAttribute(XML_NAMESPACE_DB,XML_EXTENSION,sExtension);
}
catch(const Exception&)
@@ -644,7 +644,7 @@ void ODBExport::exportConnectionData()
if ( xSettingsInfo->hasPropertyByName( sPropertyName ) )
{
::rtl::OUString sPropertyValue;
- if ( ( xDataSourceSettings->getPropertyValue( sPropertyName ) >>=
sPropertyValue ) && sPropertyValue.getLength() )
+ if ( ( xDataSourceSettings->getPropertyValue( sPropertyName ) >>=
sPropertyValue ) && !sPropertyValue.isEmpty() )
AddAttribute( XML_NAMESPACE_DB, XML_LOCAL_SOCKET,
sPropertyValue );
}
@@ -760,7 +760,7 @@ void ODBExport::exportDataSourceSettings()
// -----------------------------------------------------------------------------
void ODBExport::exportCharSet()
{
- if ( m_sCharSet.getLength() )
+ if ( !m_sCharSet.isEmpty() )
{
AddAttribute(XML_NAMESPACE_DB, XML_ENCODING,m_sCharSet);
@@ -815,7 +815,7 @@ void ODBExport::exportLogin()
Reference<XPropertySet> xProp(getDataSource());
::rtl::OUString sValue;
xProp->getPropertyValue(PROPERTY_USER) >>= sValue;
- sal_Bool bAddLogin = sValue.getLength() > 0;
+ sal_Bool bAddLogin = !sValue.isEmpty();
if ( bAddLogin )
AddAttribute(XML_NAMESPACE_DB, XML_USER_NAME,sValue);
sal_Bool bValue = sal_False;
@@ -949,14 +949,14 @@ void ODBExport::exportTableName(XPropertySet* _xProp,sal_Bool _bUpdate)
{
::rtl::OUString sValue;
_xProp->getPropertyValue(_bUpdate ? PROPERTY_UPDATE_TABLENAME : PROPERTY_NAME) >>= sValue;
- if ( sValue.getLength() )
+ if ( !sValue.isEmpty() )
{
AddAttribute(XML_NAMESPACE_DB, XML_NAME,sValue);
_xProp->getPropertyValue(_bUpdate ? PROPERTY_UPDATE_SCHEMANAME : PROPERTY_SCHEMANAME) >>=
sValue;
- if ( sValue.getLength() )
+ if ( !sValue.isEmpty() )
AddAttribute(XML_NAMESPACE_DB, XML_SCHEMA_NAME,sValue);
_xProp->getPropertyValue(_bUpdate ? PROPERTY_UPDATE_CATALOGNAME : PROPERTY_CATALOGNAME)
= sValue;
- if ( sValue.getLength() )
+ if ( !sValue.isEmpty() )
AddAttribute(XML_NAMESPACE_DB, XML_CATALOG_NAME,sValue);
if ( _bUpdate )
@@ -973,7 +973,7 @@ void ODBExport::exportFilter(XPropertySet* _xProp
OSL_PRECOND(!GetAttrList().getLength(),"Invalid attribute length!");
::rtl::OUString sCommand;
_xProp->getPropertyValue(_sProp) >>= sCommand;
- if ( sCommand.getLength() )
+ if ( !sCommand.isEmpty() )
{
AddAttribute(XML_NAMESPACE_DB, XML_COMMAND,sCommand);
SvXMLElementExport aComponents(*this,XML_NAMESPACE_DB, _eStatementType, sal_True,
sal_True);
@@ -1027,13 +1027,13 @@ void ODBExport::exportColumns(const Reference<XColumnsSupplier>& _xColSup)
Any aColumnDefault;
aColumnDefault = xProp->getPropertyValue(PROPERTY_CONTROLDEFAULT);
- if ( bHidden || sValue.getLength() || aColumnDefault.hasValue() ||
pAtt->getLength() )
+ if ( bHidden || !sValue.isEmpty() || aColumnDefault.hasValue() ||
pAtt->getLength() )
{
AddAttribute(XML_NAMESPACE_DB, XML_NAME,*pIter);
if ( bHidden )
AddAttribute(XML_NAMESPACE_DB, XML_VISIBLE,XML_FALSE);
- if ( sValue.getLength() )
+ if ( !sValue.isEmpty() )
AddAttribute(XML_NAMESPACE_DB, XML_HELP_MESSAGE,sValue);
if ( aColumnDefault.hasValue() )
@@ -1068,7 +1068,7 @@ void ODBExport::exportForms()
::rtl::OUString sService;
dbtools::getDataSourceSetting(getDataSource(),"Forms",aValue);
aValue >>= sService;
- if ( !sService.getLength() )
+ if ( sService.isEmpty() )
{
Reference<XFormDocumentsSupplier> xSup(GetModel(),UNO_QUERY);
if ( xSup.is() )
@@ -1089,7 +1089,7 @@ void ODBExport::exportReports()
::rtl::OUString sService;
dbtools::getDataSourceSetting(getDataSource(),"Reports",aValue);
aValue >>= sService;
- if ( !sService.getLength() )
+ if ( sService.isEmpty() )
{
Reference<XReportDocumentsSupplier> xSup(GetModel(),UNO_QUERY);
if ( xSup.is() )
@@ -1110,7 +1110,7 @@ void ODBExport::exportQueries(sal_Bool _bExportContext)
::rtl::OUString sService;
dbtools::getDataSourceSetting(getDataSource(),"CommandDefinitions",aValue);
aValue >>= sService;
- if ( !sService.getLength() )
+ if ( sService.isEmpty() )
{
Reference<XQueryDefinitionsSupplier> xSup(getDataSource(),UNO_QUERY);
if ( xSup.is() )
diff --git a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
index 18c7b0f..c0c9fa2 100644
--- a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
@@ -87,7 +87,7 @@ OXMLFileBasedDatabase::OXMLFileBasedDatabase( ODBFilter& rImport,
sLocation = ::svt::OFileNotation( rImport.GetAbsoluteReference( sFileName
) ).get( ::svt::OFileNotation::N_SYSTEM );
}
- if ( sLocation.getLength() == 0 )
+ if ( sLocation.isEmpty() )
sLocation = sValue;
}
break;
@@ -99,14 +99,14 @@ OXMLFileBasedDatabase::OXMLFileBasedDatabase( ODBFilter& rImport,
sFileTypeExtension = sValue;
break;
}
- if ( aProperty.Name.getLength() )
+ if ( !aProperty.Name.isEmpty() )
{
if ( !aProperty.Value.hasValue() )
aProperty.Value <<= sValue;
rImport.addInfo(aProperty);
}
}
- if ( sLocation.getLength() && sMediaType.getLength() )
+ if ( !(sLocation.isEmpty() || sMediaType.isEmpty()) )
{
::dbaccess::ODsnTypeCollection aTypeCollection(rImport.getORB());
::rtl::OUString
sURL(aTypeCollection.getDatasourcePrefixFromMediaType(sMediaType,sFileTypeExtension));
diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
index a8dbcb0..db18c11 100644
--- a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
+++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
@@ -81,7 +81,7 @@ OXMLHierarchyCollection::OXMLHierarchyCollection( ODBFilter& rImport
break;
}
}
- if ( m_sName.getLength() && _xParentContainer.is() )
+ if ( !m_sName.isEmpty() && _xParentContainer.is() )
{
try
{
diff --git a/dbaccess/source/filter/xml/xmlQuery.cxx b/dbaccess/source/filter/xml/xmlQuery.cxx
index 4b43ae5..1b93b9f 100644
--- a/dbaccess/source/filter/xml/xmlQuery.cxx
+++ b/dbaccess/source/filter/xml/xmlQuery.cxx
@@ -128,11 +128,11 @@ void OXMLQuery::setProperties(Reference< XPropertySet > & _xProp )
_xProp->setPropertyValue(PROPERTY_COMMAND,makeAny(m_sCommand));
_xProp->setPropertyValue(PROPERTY_ESCAPE_PROCESSING,makeAny(m_bEscapeProcessing));
- if ( m_sTable.getLength() )
+ if ( !m_sTable.isEmpty() )
_xProp->setPropertyValue(PROPERTY_UPDATE_TABLENAME,makeAny(m_sTable));
- if ( m_sCatalog.getLength() )
+ if ( !m_sCatalog.isEmpty() )
_xProp->setPropertyValue(PROPERTY_UPDATE_CATALOGNAME,makeAny(m_sCatalog));
- if ( m_sSchema.getLength() )
+ if ( !m_sSchema.isEmpty() )
_xProp->setPropertyValue(PROPERTY_UPDATE_SCHEMANAME,makeAny(m_sSchema));
const ODBFilter::TPropertyNameMap& rSettings = GetOwnImport().getQuerySettings();
diff --git a/dbaccess/source/filter/xml/xmlServerDatabase.cxx
b/dbaccess/source/filter/xml/xmlServerDatabase.cxx
index 1a04e24..b5208f4 100644
--- a/dbaccess/source/filter/xml/xmlServerDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlServerDatabase.cxx
@@ -87,7 +87,7 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport,
break;
}
}
- if ( sType.getLength() )
+ if ( !sType.isEmpty() )
{
::rtl::OUStringBuffer sURL;
if ( sType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "sdbc:mysql:jdbc" ) )
@@ -98,12 +98,12 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport,
sURL.append( sType );
sURL.append( sal_Unicode( ':' ) );
sURL.append(sHostName);
- if ( sPortNumber.getLength() )
+ if ( !sPortNumber.isEmpty() )
{
sURL.appendAscii(":");
sURL.append(sPortNumber);
}
- if ( sDatabaseName.getLength() )
+ if ( !sDatabaseName.isEmpty() )
{
sURL.appendAscii("/");
sURL.append(sDatabaseName);
@@ -113,12 +113,12 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport,
{
sURL.appendAscii("jdbc:oracle:thin:@");
sURL.append(sHostName);
- if ( sPortNumber.getLength() )
+ if ( !sPortNumber.isEmpty() )
{
sURL.appendAscii(":");
sURL.append(sPortNumber);
}
- if ( sDatabaseName.getLength() )
+ if ( !sDatabaseName.isEmpty() )
{
sURL.appendAscii(":");
sURL.append(sDatabaseName);
@@ -128,7 +128,7 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport,
{
sURL.appendAscii("sdbc:address:ldap:");
sURL.append(sHostName);
- if ( sPortNumber.getLength() )
+ if ( !sPortNumber.isEmpty() )
{
sURL.appendAscii(":");
sURL.append(sPortNumber);
@@ -139,12 +139,12 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport,
sURL.append(sType);
sURL.appendAscii(":");
sURL.append(sHostName);
- if ( sPortNumber.getLength() )
+ if ( !sPortNumber.isEmpty() )
{
sURL.appendAscii(":");
sURL.append(sPortNumber);
}
- if ( sDatabaseName.getLength() )
+ if ( !sDatabaseName.isEmpty() )
{
sURL.appendAscii(":");
sURL.append(sDatabaseName);
diff --git a/dbaccess/source/filter/xml/xmlStyleImport.cxx
b/dbaccess/source/filter/xml/xmlStyleImport.cxx
index 5456b6b..4d44a70 100644
--- a/dbaccess/source/filter/xml/xmlStyleImport.cxx
+++ b/dbaccess/source/filter/xml/xmlStyleImport.cxx
@@ -98,7 +98,7 @@ void OTableStyleContext::FillPropertySet(
{
if ( GetFamily() == XML_STYLE_FAMILY_TABLE_TABLE )
{
- if ( sPageStyle.getLength() )
+ if ( !sPageStyle.isEmpty() )
{
uno::Any aAny;
aAny <<= sPageStyle;
@@ -107,7 +107,7 @@ void OTableStyleContext::FillPropertySet(
}
else if ( GetFamily() == XML_STYLE_FAMILY_TABLE_COLUMN )
{
- if ((m_nNumberFormat == -1) && m_sDataStyleName.getLength())
+ if ((m_nNumberFormat == -1) && !m_sDataStyleName.isEmpty())
{
SvXMLNumFormatContext* pStyle =
PTR_CAST(SvXMLNumFormatContext,pStyles->FindStyleChildContext(
XML_STYLE_FAMILY_DATA_STYLE, m_sDataStyleName, sal_True));
@@ -273,7 +273,7 @@ Reference < XNameContainer >
::rtl::OUString OTableStylesContext::GetServiceName( sal_uInt16 nFamily ) const
{
rtl::OUString sServiceName = SvXMLStylesContext::GetServiceName(nFamily);
- if (!sServiceName.getLength())
+ if (sServiceName.isEmpty())
{
switch( nFamily )
{
diff --git a/dbaccess/source/filter/xml/xmlTable.cxx b/dbaccess/source/filter/xml/xmlTable.cxx
index ae93f44..8f5ae40 100644
--- a/dbaccess/source/filter/xml/xmlTable.cxx
+++ b/dbaccess/source/filter/xml/xmlTable.cxx
@@ -199,7 +199,7 @@ void OXMLTable::EndElement()
{
setProperties(m_xTable);
- if ( m_sStyleName.getLength() )
+ if ( !m_sStyleName.isEmpty() )
{
const SvXMLStylesContext* pAutoStyles = GetOwnImport().GetAutoStyles();
if ( pAutoStyles )
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 3bc2b0d..84ef50d 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -436,11 +436,11 @@ sal_Bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
::comphelper::NamedValueCollection aMediaDescriptor( rDescriptor );
if ( aMediaDescriptor.has( "URL" ) )
sFileName = aMediaDescriptor.getOrDefault( "URL", ::rtl::OUString() );
- if ( !sFileName.getLength() && aMediaDescriptor.has( "FileName" ) )
+ if ( sFileName.isEmpty() && aMediaDescriptor.has( "FileName" ) )
sFileName = aMediaDescriptor.getOrDefault( "FileName", sFileName );
- OSL_ENSURE( sFileName.getLength(), "ODBFilter::implImport: no URL given!" );
- sal_Bool bRet = ( sFileName.getLength() != 0 );
+ OSL_ENSURE( !sFileName.isEmpty(), "ODBFilter::implImport: no URL given!" );
+ sal_Bool bRet = !sFileName.isEmpty();
if ( bRet )
{
diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx
b/dbaccess/source/sdbtools/connection/objectnames.cxx
index b3b2bae..fa80b83 100644
--- a/dbaccess/source/sdbtools/connection/objectnames.cxx
+++ b/dbaccess/source/sdbtools/connection/objectnames.cxx
@@ -159,9 +159,9 @@ namespace sdbtools
m_xConnection->getMetaData(), _rName, sCatalog, sSchema, sName,
::dbtools::eInTableDefinitions );
::rtl::OUString sExtraNameCharacters(
m_xConnection->getMetaData()->getExtraNameCharacters() );
- if ( ( sCatalog.getLength() && !::dbtools::isValidSQLName( sCatalog,
sExtraNameCharacters ) )
- || ( sSchema.getLength() && !::dbtools::isValidSQLName( sSchema,
sExtraNameCharacters ) )
- || ( sName.getLength() && !::dbtools::isValidSQLName( sName, sExtraNameCharacters
) )
+ if ( ( !sCatalog.isEmpty() && !::dbtools::isValidSQLName( sCatalog,
sExtraNameCharacters ) )
+ || ( !sSchema.isEmpty() && !::dbtools::isValidSQLName( sSchema,
sExtraNameCharacters ) )
+ || ( !sName.isEmpty() && !::dbtools::isValidSQLName( sName, sExtraNameCharacters
) )
)
return false;
diff --git a/dbaccess/source/shared/registrationhelper.cxx
b/dbaccess/source/shared/registrationhelper.cxx
index 9b73c12..bb718cf 100644
--- a/dbaccess/source/shared/registrationhelper.cxx
+++ b/dbaccess/source/shared/registrationhelper.cxx
@@ -121,7 +121,7 @@ uno::Reference< uno::XInterface > OModuleRegistration::getComponentFactory(
const uno::Reference< lang::XMultiServiceFactory >& _rxServiceManager)
{
OSL_ENSURE(_rxServiceManager.is(), "OModuleRegistration::getComponentFactory : invalid
argument (service manager) !");
- OSL_ENSURE(_rImplementationName.getLength(), "OModuleRegistration::getComponentFactory :
invalid argument (implementation name) !");
+ OSL_ENSURE(!_rImplementationName.isEmpty(), "OModuleRegistration::getComponentFactory :
invalid argument (implementation name) !");
if (!s_pImplementationNames)
{
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 216d65f..89cbc28 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -422,7 +422,7 @@ void SAL_CALL OApplicationController::disposing()
if ( m_xModel.is() )
{
::rtl::OUString sUrl = m_xModel->getURL();
- if ( sUrl.getLength() )
+ if ( !sUrl.isEmpty() )
{
::comphelper::NamedValueCollection aArgs( m_xModel->getArgs() );
if ( true == aArgs.getOrDefault( "PickListEntry", true ) )
@@ -676,7 +676,7 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const
if ( aReturn.bEnabled )
{
const ::rtl::OUString sReportEngineServiceName =
::dbtools::getDefaultReportEngineServiceName(m_xServiceFactory);
- aReturn.bEnabled = sReportEngineServiceName.getLength() != 0;
+ aReturn.bEnabled = !sReportEngineServiceName.isEmpty();
if ( aReturn.bEnabled )
{
const Reference< XEnumeration > xEnumDrivers =
xEnumAccess->createContentEnumeration(sReportEngineServiceName);
@@ -1175,7 +1175,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence<
PropertyVa
::rtl::OUString sUrl;
if ( m_xModel.is() )
sUrl = m_xModel->getURL();
- if ( !sUrl.getLength() )
+ if ( sUrl.isEmpty() )
sUrl = SvtPathOptions().GetWorkPath();
::sfx2::FileDialogHelper aFileDlg(
@@ -2507,7 +2507,7 @@ sal_Int8 OApplicationController::queryDrop( const AcceptDropEvent& _rEvt,
const
if ( pHitEntry )
{
sName = pView->getQualifiedName( pHitEntry );
- if ( sName.getLength() )
+ if ( !sName.isEmpty() )
{
Reference< XHierarchicalNameAccess >
xContainer(getElements(pView->getElementType()),UNO_QUERY);
if ( xContainer.is() && xContainer->hasByHierarchicalName(sName) )
@@ -2848,7 +2848,7 @@ void OApplicationController::containerFound( const Reference< XContainer >&
_xCo
try
{
sName = getContainer()->getQualifiedName( NULL );
- OSL_ENSURE( sName.getLength(), "OApplicationController::getCurrentlySelectedName: no
name given!" );
+ OSL_ENSURE( !sName.isEmpty(), "OApplicationController::getCurrentlySelectedName: no
name given!" );
}
catch( const Exception& )
{
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx
b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 0788433..6e8653f 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -227,7 +227,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
{
svtools::QueryDeleteDlg_Impl aDlg( getView(), *aThisRound );
- if ( sDialogPosition.getLength() )
+ if ( !sDialogPosition.isEmpty() )
aDlg.SetWindowState( sDialogPosition );
if ( nObjectsLeft > 1 )
@@ -510,7 +510,7 @@ TransferableHelper* OApplicationController::copyObject()
xMetaData = xConnection->getMetaData();
::rtl::OUString sName = getContainer()->getQualifiedName( NULL );
- if ( sName.getLength() )
+ if ( !sName.isEmpty() )
{
::rtl::OUString sDataSource = getDatabaseName();
@@ -583,7 +583,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc
if (CommandType::QUERY == nCommandType)
bValidDescriptor = sDataSourceName.getLength() && sCommand.getLength();
else if (CommandType::COMMAND == nCommandType)
- bValidDescriptor = (0 != sCommand.getLength());
+ bValidDescriptor = !sCommand.isEmpty();
if (!bValidDescriptor)
{
OSL_FAIL("OApplicationController::paste: invalid descriptor!");
@@ -597,7 +597,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc
if ( CommandType::QUERY == nCommandType )
sTargetName = sCommand;
- if ( !sTargetName.getLength() )
+ if ( sTargetName.isEmpty() )
{
String sDefaultName = String( ModuleRes( STR_QRY_TITLE ) );
sDefaultName = sDefaultName.GetToken( 0, ' ' );
@@ -658,7 +658,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc
DynamicTableOrQueryNameCheck aNameChecker( getConnection(), CommandType::QUERY );
::dbtools::SQLExceptionInfo aDummy;
- bool bNeedAskForName = ( sCommand.getLength() == 0 )
+ bool bNeedAskForName = ( sCommand.isEmpty() )
/* we did not have a source name, so the target name
was auto-generated */
|| ( !aNameChecker.isNameValid( sTargetName, aDummy ) );
/* name is invalid in the target DB (e.g. because it
already
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx
b/dbaccess/source/ui/app/AppControllerGen.cxx
index c894cd8..ef40f0f 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -239,7 +239,7 @@ void OApplicationController::openDialog( const ::rtl::OUString& _sServiceName )
::rtl::OUString sInitialSelection;
if ( getContainer() )
sInitialSelection = getDatabaseName();
- if ( sInitialSelection.getLength() )
+ if ( !sInitialSelection.isEmpty() )
{
aArgs[ nArgPos++ ] <<= PropertyValue(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InitialSelection" ) ), 0,
@@ -331,7 +331,7 @@ void SAL_CALL OApplicationController::propertyChange( const PropertyChangeEvent&
// if the old name is empty, then this is a newly inserted content. We're notified of
it via the
// elementInserted method, so there's no need to handle it here.
- if ( sOldName.getLength() )
+ if ( !sOldName.isEmpty() )
{
Reference<XChild> xChild(evt.Source,UNO_QUERY);
if ( xChild.is() )
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 4f7c95a..a68416c 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -434,7 +434,7 @@ void OAppDetailPageHelper::describeCurrentSelectionForType( const ElementType _e
break;
}
- if ( aObject.Name.getLength() )
+ if ( !aObject.Name.isEmpty() )
{
aSelected.push_back( aObject );
}
diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx
b/dbaccess/source/ui/app/subcomponentmanager.cxx
index 9b6d612..4cbd6f1 100644
--- a/dbaccess/source/ui/app/subcomponentmanager.cxx
+++ b/dbaccess/source/ui/app/subcomponentmanager.cxx
@@ -499,7 +499,7 @@ namespace dbaui
::osl::ClearableMutexGuard aGuard( m_pData->getMutex() );
#if OSL_DEBUG_LEVEL > 0
- if ( _rName.getLength() )
+ if ( !_rName.isEmpty() )
{
// check there does not already exist such a component
SubComponents::const_iterator existentPos = ::std::find_if(
@@ -561,7 +561,7 @@ namespace dbaui
bool SubComponentManager::closeSubFrames( const ::rtl::OUString& i_rName, const sal_Int32
_nComponentType )
{
::osl::MutexGuard aGuard( m_pData->getMutex() );
- ENSURE_OR_RETURN_FALSE( i_rName.getLength(), "SubComponentManager::closeSubFrames: illegal
name!" );
+ ENSURE_OR_RETURN_FALSE( !i_rName.isEmpty(), "SubComponentManager::closeSubFrames: illegal
name!" );
SubComponents aWorkingCopy( m_pData->m_aComponents );
for ( SubComponents::const_iterator comp = aWorkingCopy.begin();
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 6a29b66..f56819d 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -1760,7 +1760,7 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const
Reference< XPropertySet > xActiveSet(getRowSet(), UNO_QUERY);
::rtl::OUString aFilter =
::comphelper::getString(xActiveSet->getPropertyValue(PROPERTY_FILTER));
::rtl::OUString aHaving =
::comphelper::getString(xActiveSet->getPropertyValue(PROPERTY_HAVING_CLAUSE));
- if ( aFilter.getLength() || aHaving.getLength() )
+ if ( !(aFilter.isEmpty() && aHaving.isEmpty()) )
{
xActiveSet->getPropertyValue( PROPERTY_APPLYFILTER ) >>= aReturn.bChecked;
aReturn.bEnabled = sal_True;
@@ -1888,7 +1888,7 @@ Reference< XSingleSelectQueryComposer >
SbaXDataBrowserController::createParser_
::rtl::OUString sActiveCommand;
OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ACTIVECOMMAND ) >>= sActiveCommand );
- if ( sActiveCommand.getLength() > 0 )
+ if ( !sActiveCommand.isEmpty() )
{
xComposer->setElementaryQuery( sActiveCommand );
}
diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx
index cbf1b27..a355704 100644
--- a/dbaccess/source/ui/browser/dbloader.cxx
+++ b/dbaccess/source/ui/browser/dbloader.cxx
@@ -283,7 +283,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const ::
{
xDatabaseDocument.set( getDataSourceOrModel( xDataSource ), UNO_QUERY );
}
- else if ( sDataSourceName.getLength() )
+ else if ( !sDataSourceName.isEmpty() )
{
::dbtools::SQLExceptionInfo aError;
xDataSource.set( getDataSourceByName( sDataSourceName, NULL, m_xServiceFactory,
&aError ) );
diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx
index ce463a6..f23898f 100644
--- a/dbaccess/source/ui/browser/exsrcbrw.cxx
+++ b/dbaccess/source/ui/browser/exsrcbrw.cxx
@@ -186,7 +186,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
else
OSL_FAIL(rtl::OStringBuffer("SbaExternalSourceBrowser::dispatch(AddGridColumn) :
unknown argument (").append(rtl::OUStringToOString(pArguments->Name,
osl_getThreadTextEncoding())).append(") !").getStr());
}
- if (!sControlType.getLength())
+ if (sControlType.isEmpty())
{
OSL_FAIL("SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument
(ColumnType) !");
sControlType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextField"));
@@ -287,7 +287,7 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrows
)
)
{
- OSL_ENSURE(aURL.Mark.getLength() == 0, "SbaExternalSourceBrowser::queryDispatch : the
::com::sun::star::util::URL shouldn't have a mark !");
+ OSL_ENSURE(aURL.Mark.isEmpty(), "SbaExternalSourceBrowser::queryDispatch : the
::com::sun::star::util::URL shouldn't have a mark !");
::com::sun::star::util::URL aNewUrl = aURL;
// split the ::com::sun::star::util::URL
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx
b/dbaccess/source/ui/browser/genericcontroller.cxx
index ae7fe87..fe8f4e7 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -564,7 +564,7 @@ sal_Bool OGenericUnoController::isFeatureSupported( sal_Int32 _nId )
::std::bind2nd( CompareFeatureById(), _nId )
);
- return ( m_aSupportedFeatures.end() != aFeaturePos && aFeaturePos->first.getLength());
+ return ( m_aSupportedFeatures.end() != aFeaturePos && !aFeaturePos->first.isEmpty());
}
// -----------------------------------------------------------------------
@@ -809,7 +809,7 @@ void OGenericUnoController::removeStatusListener(const Reference< XStatusListene
{
DispatchIterator iterSearch = m_arrStatusListener.begin();
- sal_Bool bRemoveForAll = (_rURL.Complete.getLength() == 0);
+ sal_Bool bRemoveForAll = _rURL.Complete.isEmpty();
while ( iterSearch != m_arrStatusListener.end() )
{
DispatchTarget& rCurrent = *iterSearch;
@@ -996,7 +996,7 @@ URL OGenericUnoController::getURLForId(sal_Int32 _nId) const
::std::bind2nd( CompareFeatureById(), _nId )
);
- if ( m_aSupportedFeatures.end() != aIter && aIter->first.getLength() )
+ if ( m_aSupportedFeatures.end() != aIter && !aIter->first.isEmpty() )
{
aReturn.Complete = aIter->first;
m_xUrlTransformer->parseStrict( aReturn );
@@ -1487,7 +1487,7 @@ sal_Bool OGenericUnoController::isCommandEnabled(sal_uInt16 _nCommandId) const
// -----------------------------------------------------------------------------
sal_uInt16 OGenericUnoController::registerCommandURL( const ::rtl::OUString& _rCompleteCommandURL )
{
- if ( !_rCompleteCommandURL.getLength() )
+ if ( _rCompleteCommandURL.isEmpty() )
return 0;
SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( _rCompleteCommandURL );
@@ -1546,7 +1546,7 @@ sal_Bool OGenericUnoController::isCommandChecked(sal_uInt16 _nCommandId) const
// -----------------------------------------------------------------------------
sal_Bool OGenericUnoController::isCommandEnabled( const ::rtl::OUString& _rCompleteCommandURL )
const
{
- OSL_ENSURE( _rCompleteCommandURL.getLength(), "OGenericUnoController::isCommandEnabled: Empty
command url!" );
+ OSL_ENSURE( !_rCompleteCommandURL.isEmpty(), "OGenericUnoController::isCommandEnabled: Empty
command url!" );
sal_Bool bIsEnabled = sal_False;
SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( _rCompleteCommandURL );
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 4f8eb3c..9d3a539 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -1281,7 +1281,7 @@ void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos)
{
OSL_FAIL("SbaGridControl::DoColumnDrag : something went wrong while getting the column");
}
- if (0 == sField.getLength())
+ if (sField.isEmpty())
return;
OColumnTransferable* pDataTransfer = new OColumnTransferable(xDataSource, sField,
xAffectedField, xActiveConnection, CTF_FIELD_DESCRIPTOR | CTF_COLUMN_DESCRIPTOR);
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 5a8b8a1..4d980a0 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -479,7 +479,7 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow()
::rtl::OUString sColumnName;
OSL_VERIFY( xOrderColumn->getPropertyValue( PROPERTY_NAME ) >>= sColumnName );
- if ( sTableName.getLength() == 0 )
+ if ( sTableName.isEmpty() )
{
if ( !xColumnNames->hasByName( sColumnName ) )
{
@@ -789,7 +789,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
aInitialValues.push_back( NamedValue( PROPERTY_CONTROLSOURCE, makeAny( *pIter ) )
);
::rtl::OUString sLabel;
xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel;
- if ( sLabel.getLength() )
+ if ( !sLabel.isEmpty() )
aInitialValues.push_back( NamedValue( PROPERTY_LABEL, makeAny( sLabel ) ) );
else
aInitialValues.push_back( NamedValue( PROPERTY_LABEL, makeAny( *pIter ) ) );
@@ -824,7 +824,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
aDescription = xColumn->getPropertyValue( PROPERTY_HELPTEXT );
::rtl::OUString sTemp;
aDescription >>= sTemp;
- if ( !sTemp.getLength() )
+ if ( sTemp.isEmpty() )
xColumn->getPropertyValue( PROPERTY_DESCRIPTION ) >>= sTemp;
aDescription <<= sTemp;
@@ -1107,7 +1107,7 @@ void SbaTableQueryBrowser::checkDocumentDataSource()
::rtl::OUString sCommand;
m_aDocumentDataSource[daCommand] >>= sCommand;
- bKnownDocDataSource = (CommandType::COMMAND == nCommandType) && (0 !=
sCommand.getLength());
+ bKnownDocDataSource = (CommandType::COMMAND == nCommandType) &&
(!sCommand.isEmpty());
}
}
}
@@ -1934,7 +1934,7 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence<
PropertyValue
sal_Bool bFullReinit = sal_False;
// check if the query signature (if the form is based on a query) has changed
- if ( m_sQueryCommand.getLength() )
+ if ( !m_sQueryCommand.isEmpty() )
{
::rtl::OUString sNewQueryCommand;
sal_Bool bNewQueryEP;
@@ -3131,7 +3131,7 @@ namespace
Reference< XDataSource > xDataSource;
try
{
- if ( _rDataSourceName.getLength() && _rxDatabaseContext->hasByName( _rDataSourceName )
)
+ if ( !_rDataSourceName.isEmpty() && _rxDatabaseContext->hasByName( _rDataSourceName ) )
xDataSource.set( _rxDatabaseContext->getByName( _rDataSourceName ),
UNO_QUERY_THROW );
if ( !xDataSource.is() )
@@ -3265,7 +3265,7 @@ void SbaTableQueryBrowser::impl_initialize()
startConnectionListening( xConnection );
// if no initial name was given, try to obtain one from the data source
- if ( !sInitialDataSourceName.getLength() )
+ if ( sInitialDataSourceName.isEmpty() )
{
Reference< XChild > xChild( xConnection, UNO_QUERY );
Reference< XPropertySet > xDataSourceProperties;
@@ -3752,7 +3752,7 @@ void SbaTableQueryBrowser::loadMenu(const Reference< XFrame >& _xFrame)
INetURLObject aURL(sTitle);
if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
sTitle =
aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET);
- if ( sName.getLength() )
+ if ( !sName.isEmpty() )
{
sName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - "));
sName += sTitle;
@@ -3779,7 +3779,7 @@ sal_Bool SbaTableQueryBrowser::preReloadForm()
sal_Int32 nCommandType = CommandType::COMMAND;
sal_Bool bEscapeProcessing = sal_True;
extractDescriptorProps(aDesc, sDataSource, sCommand, nCommandType, bEscapeProcessing);
- if ( sDataSource.getLength() && sCommand.getLength() && (-1 != nCommandType) )
+ if ( !sDataSource.isEmpty() && !sCommand.isEmpty() && (-1 != nCommandType) )
{
SvLBoxEntry* pDataSource = NULL;
SvLBoxEntry* pCommandType = NULL;
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx
b/dbaccess/source/ui/control/FieldDescControl.cxx
index b3e307f..ecdd3b8 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1312,7 +1312,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
{
ActivateAggregate( tpLength );
pLength->SetMax(::std::max<sal_Int32>(pFieldType->nPrecision,pFieldDescr->GetPrecision()));
- pLength->SetSpecialReadOnly(pFieldType->aCreateParams.getLength()==0);
+ pLength->SetSpecialReadOnly(pFieldType->aCreateParams.isEmpty());
}
else
DeactivateAggregate( tpLength );
@@ -1323,7 +1323,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
pScale->SetMax(::std::max<sal_Int32>(pFieldType->nMaximumScale,pFieldDescr->GetScale()));
pScale->SetMin(pFieldType->nMinimumScale);
static const ::rtl::OUString s_sPRECISION(RTL_CONSTASCII_USTRINGPARAM("PRECISION"));
- pScale->SetSpecialReadOnly(pFieldType->aCreateParams.getLength() == 0 ||
pFieldType->aCreateParams == s_sPRECISION);
+ pScale->SetSpecialReadOnly(pFieldType->aCreateParams.isEmpty() ||
pFieldType->aCreateParams == s_sPRECISION);
}
else
DeactivateAggregate( tpScale );
@@ -1343,7 +1343,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
{
ActivateAggregate( tpTextLen );
pTextLen->SetMax(::std::max<sal_Int32>(pFieldType->nPrecision,pFieldDescr->GetPrecision()));
- pTextLen->SetSpecialReadOnly(pFieldType->aCreateParams.getLength()==0);
+ pTextLen->SetSpecialReadOnly(pFieldType->aCreateParams.isEmpty());
}
else
DeactivateAggregate( tpTextLen );
@@ -1359,7 +1359,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
ActivateAggregate( tpFormat );
break;
case DataType::BIT:
- if ( pFieldType->aCreateParams.getLength() )
+ if ( !pFieldType->aCreateParams.isEmpty() )
{
DeactivateAggregate( tpFormat );
DeactivateAggregate( tpTextLen );
@@ -1668,7 +1668,7 @@ void OFieldDescControl::SaveData( OFieldDescription* pFieldDescr )
sDefault = BoolStringPersistent(pBoolDefault->GetSelectEntry());
}
- if ( sDefault.getLength() )
+ if ( !sDefault.isEmpty() )
pFieldDescr->SetControlDefault(makeAny(sDefault));
else
pFieldDescr->SetControlDefault(Any());
@@ -1845,7 +1845,7 @@ String OFieldDescControl::getControlDefault( const OFieldDescription*
_pFieldDes
{
if ( !bTextFormat )
{
- if ( sDefault.getLength() )
+ if ( !sDefault.isEmpty() )
{
try
{
@@ -1886,8 +1886,8 @@ String OFieldDescControl::getControlDefault( const OFieldDescription*
_pFieldDes
OSL_ENSURE(xPreViewer.is(),"XNumberFormatPreviewer is null!");
sDefault =
xPreViewer->convertNumberToPreviewString(sFormat,nValue,aLocale,sal_True);
}
- else if ( !_bCheck || (sDefault.getLength() != 0) )
- sDefault = xNumberFormatter->formatString(nFormatKey,(sDefault.getLength() != 0 )?
sDefault : sFormat);
+ else if ( !(_bCheck && sDefault.isEmpty()) )
+ sDefault = xNumberFormatter->formatString(nFormatKey, sDefault.isEmpty() ? sFormat
: sDefault);
}
catch(const Exception&)
{
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx
b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 0a177be..cfbd311 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -482,9 +482,9 @@ namespace
else
{
::rtl::OUString sCommandURL( _pPopup->GetItemCommand( nId ) );
- bool bEnabled = ( sCommandURL.getLength() )
- ? _rController.isCommandEnabled( sCommandURL )
- : _rController.isCommandEnabled( nId );
+ bool bEnabled = sCommandURL.isEmpty()
+ ? _rController.isCommandEnabled( nId )
+ : _rController.isCommandEnabled( sCommandURL );
_pPopup->EnableItem( nId, bEnabled );
}
}
@@ -522,7 +522,7 @@ namespace
// more things to preserve:
// - the help command
::rtl::OUString sHelpURL = _rMenu.GetHelpCommand( nId );
- if ( sHelpURL.getLength() )
+ if ( !sHelpURL.isEmpty() )
_rMenu.SetHelpCommand( nCommandId, sHelpURL );
// remove the "old" item
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx
b/dbaccess/source/ui/control/opendoccontrols.cxx
index c488801..71fd695 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -247,7 +247,7 @@ namespace dbaui
INetURLObject aURL;
aURL.SetSmartURL( sURL );
// The password is set only when it is not empty.
- if ( sPassword.getLength() > 0 )
+ if ( !sPassword.isEmpty() )
aURL.SetPass( sPassword );
if ( !sTitle.Len() )
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index 84ce4b0..b48206c 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -475,7 +475,7 @@ SvLBoxEntry* OTableTreeListBox::implAddEntry(
const ::rtl::OUString& rSecondName = bCatalogAtStart ? sSchema : sCatalog;
const sal_Int32 nSecondFolderType = bCatalogAtStart ? DatabaseObjectContainer::SCHEMA :
DatabaseObjectContainer::CATALOG;
- if ( rFirstName.getLength() )
+ if ( !rFirstName.isEmpty() )
{
SvLBoxEntry* pFolder = GetEntryPosByName( rFirstName, pParentEntry );
if ( !pFolder )
@@ -483,7 +483,7 @@ SvLBoxEntry* OTableTreeListBox::implAddEntry(
pParentEntry = pFolder;
}
- if ( rSecondName.getLength() )
+ if ( !rSecondName.isEmpty() )
{
SvLBoxEntry* pFolder = GetEntryPosByName( rSecondName, pParentEntry );
if ( !pFolder )
@@ -639,14 +639,14 @@ SvLBoxEntry* OTableTreeListBox::getEntryByQualifiedName( const
::rtl::OUString&
SvLBoxEntry* pParent = getAllObjectsEntry();
SvLBoxEntry* pCat = NULL;
SvLBoxEntry* pSchema = NULL;
- if ( sCatalog.getLength() )
+ if ( !sCatalog.isEmpty() )
{
pCat = GetEntryPosByName(sCatalog, pParent);
if ( pCat )
pParent = pCat;
}
- if ( sSchema.getLength() )
+ if ( !sSchema.isEmpty() )
{
pSchema = GetEntryPosByName(sSchema, pParent);
if ( pSchema )
diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx
b/dbaccess/source/ui/control/toolboxcontroller.cxx
index 8dccea3..bbef4c8 100644
--- a/dbaccess/source/ui/control/toolboxcontroller.cxx
+++ b/dbaccess/source/ui/control/toolboxcontroller.cxx
@@ -264,7 +264,7 @@ namespace dbaui
URL aUrl;
Sequence < PropertyValue > aArgs;
aUrl.Complete = m_aCommandURL;
- OSL_ENSURE(aUrl.Complete.getLength(),"Command is empty!");
+ OSL_ENSURE(!aUrl.Complete.isEmpty(),"Command is empty!");
if ( getURLTransformer().is() )
getURLTransformer()->parseStrict(aUrl);
xDispatch->dispatch(aUrl,aArgs);
diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx
index 23e4762..8370e39 100644
--- a/dbaccess/source/ui/dlg/CollectionView.cxx
+++ b/dbaccess/source/ui/dlg/CollectionView.cxx
@@ -127,7 +127,7 @@ Reference< XContent> OCollectionView::getSelectedFolder() const
IMPL_LINK( OCollectionView, Save_Click, PushButton*, EMPTYARG )
{
::rtl::OUString sName = m_aName.GetText();
- if ( !sName.getLength() )
+ if ( sName.isEmpty() )
return 0;
try
{
@@ -155,7 +155,7 @@ IMPL_LINK( OCollectionView, Save_Click, PushButton*, EMPTYARG )
sName = sName.copy(nIndex);
Reference<XHierarchicalNameContainer> xHier(m_xContent,UNO_QUERY);
OSL_ENSURE(xHier.is(),"XHierarchicalNameContainer not supported!");
- if ( sSubFolder.getLength() && xHier.is() )
+ if ( !sSubFolder.isEmpty() && xHier.is() )
{
if ( xHier->hasByHierarchicalName(sSubFolder) )
{
@@ -275,7 +275,7 @@ IMPL_LINK( OCollectionView, Dbl_Click_FileView, SvtFileView*, EMPTYARG )
::rtl::OUString sSubFolder = m_aView.GetCurrentURL();
sal_Int32 nIndex = sSubFolder.lastIndexOf('/') + 1;
sSubFolder = sSubFolder.getToken(0,'/',nIndex);
- if ( sSubFolder.getLength() )
+ if ( !sSubFolder.isEmpty() )
{
Reference< XContent> xContent;
if ( xNameAccess->hasByName(sSubFolder) )
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 8c34de3..11c6b17 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -306,7 +306,7 @@ DBG_NAME(OConnectionHelper)
pDbVar = NULL;
}
- sal_Bool bOldFashion = sAdabasConfigDir.getLength() && sAdabasWorkDir.getLength();
+ sal_Bool bOldFashion = !(sAdabasConfigDir.isEmpty() || sAdabasWorkDir.isEmpty());
if(!bOldFashion) // we have a normal adabas installation
{ // so we check the local database names in $DBROOT/config
@@ -314,7 +314,7 @@ DBG_NAME(OConnectionHelper)
sAdabasWorkDir = sRootDir;
}
- if(sAdabasConfigDir.getLength() && sAdabasWorkDir.getLength() &&
sRootDir.getLength())
+ if(!(sAdabasConfigDir.isEmpty() || sAdabasWorkDir.isEmpty() || sRootDir.isEmpty()))
{
aInstalledDBs = getInstalledAdabasDBs(sAdabasConfigDir,sAdabasWorkDir);
@@ -349,7 +349,7 @@ DBG_NAME(OConnectionHelper)
// collect all ODBC data source names
::rtl::OUString sCurrDatasource = getURLNoPrefix();
::rtl::OUString sDataSource;
- if ( getSelectedDataSource(sDataSource,sCurrDatasource) && sDataSource.getLength()
)
+ if ( getSelectedDataSource(sDataSource,sCurrDatasource) && !sDataSource.isEmpty() )
{
setURLNoPrefix(sDataSource);
SetRoadmapStateValue(sal_True);
@@ -366,7 +366,7 @@ DBG_NAME(OConnectionHelper)
::rtl::OUString sNewDataSource;
HWND hWnd = GetParent()->GetSystemData()->hWnd;
sNewDataSource = getAdoDatalink((long)hWnd,sOldDataSource);
- if ( sNewDataSource.getLength() )
+ if ( !sNewDataSource.isEmpty() )
{
setURLNoPrefix(sNewDataSource);
SetRoadmapStateValue(sal_True);
@@ -411,7 +411,7 @@ DBG_NAME(OConnectionHelper)
ODatasourceSelectDialog aSelector(GetParent(), aProfiles, eType);
::rtl::OUString sOldProfile=getURLNoPrefix();
- if (sOldProfile.getLength())
+ if (!sOldProfile.isEmpty())
aSelector.Select(sOldProfile);
else
aSelector.Select(xMozillaBootstrap->getDefaultProfile(profileType));
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 3280c80..a38c26ee 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -458,7 +458,7 @@ Reference< XPropertySet > ODbDataSourceAdministrationHelper::getCurrentDataSourc
{
::rtl::OUString sCurrentDatasource;
m_aDataSourceOrName >>= sCurrentDatasource;
- OSL_ENSURE(sCurrentDatasource.getLength(),"No datasource name given!");
+ OSL_ENSURE(!sCurrentDatasource.isEmpty(),"No datasource name given!");
try
{
if ( m_xDatabaseContext.is() )
@@ -793,7 +793,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
{
::rtl::OUString sCharSet;
implTranslateProperty(pCurrent) >>= sCharSet;
- if ( sCharSet.getLength() )
+ if ( !sCharSet.isEmpty() )
aRelevantSettings.insert(PropertyValue(aTranslation->second, 0,
makeAny(sCharSet), PropertyState_DIRECT_VALUE));
}
else
@@ -904,7 +904,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
{
::rtl::OUString sCharSet;
aLoop->Value >>= sCharSet;
- if ( sCharSet.getLength() )
+ if ( !sCharSet.isEmpty() )
*pAppendValues = *aLoop;
}
else
diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx
index 357aea8..8155dbe 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.cxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.cxx
@@ -257,7 +257,7 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton )
sNewPassword = aDlg.GetNewPassword();
sOldPassword = aDlg.GetOldPassword();
- if(sNewPassword.getLength())
+ if(!sNewPassword.isEmpty())
xUser->changePassword(sOldPassword,sNewPassword);
}
}
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index ae2032e..a10e93a 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -163,7 +163,7 @@ namespace dbaui
aEnumeration.getDatasourceNames(aOdbcDatasources);
// execute the select dialog
ODatasourceSelectDialog aSelector(GetParent(), aOdbcDatasources, false);
- if (_sCurr.getLength())
+ if (!_sCurr.isEmpty())
aSelector.Select(_sCurr);
if ( RET_OK == aSelector.Execute() )
_sReturn = aSelector.GetSelected();
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index 7fa80c1..1678969 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -131,8 +131,8 @@ String TableListFacade::getSelectedName( String& _out_rAliasName ) const
try
{
Reference< XDatabaseMetaData > xMeta( m_xConnection->getMetaData(), UNO_QUERY_THROW );
- if ( !aCatalog.getLength()
- && aSchema.getLength()
+ if ( aCatalog.isEmpty()
+ && !aSchema.isEmpty()
&& xMeta->supportsCatalogsInDataManipulation()
&& !xMeta->supportsSchemasInDataManipulation() )
{
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index a17d60a..31ef7be 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -831,7 +831,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
::connectivity::DriversConfig aDriverConfig(getORB());
try
{
- if ( !aDriverConfig.getDriverFactoryName(sEmbeddedURL).getLength() ||
!m_pImpl->getDriver(sEmbeddedURL).is() )
+ if ( aDriverConfig.getDriverFactoryName(sEmbeddedURL).isEmpty() ||
!m_pImpl->getDriver(sEmbeddedURL).is() )
sEmbeddedURL = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:dbase:"));
}
catch(const Exception&)
diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx
index 7e221a3..33d0ea6 100644
--- a/dbaccess/source/ui/dlg/dlgsave.cxx
+++ b/dbaccess/source/ui/dlg/dlgsave.cxx
@@ -271,7 +271,7 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent,
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
m_pImpl->m_aCatalog.SelectEntryPos(nPos);
- if ( sSchema.getLength() )
+ if ( !sSchema.isEmpty() )
{
nPos = m_pImpl->m_aSchema.GetEntryPos(String(sSchema));
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
diff --git a/dbaccess/source/ui/dlg/dsselect.cxx b/dbaccess/source/ui/dlg/dsselect.cxx
index 301701c..a314601 100644
--- a/dbaccess/source/ui/dlg/dsselect.cxx
+++ b/dbaccess/source/ui/dlg/dsselect.cxx
@@ -263,7 +263,7 @@ void ODatasourceSelectDialog::fillListBox(const StringBag& _rDatasources)
if (m_aDatasource.GetEntryCount())
{
- if (sSelected.getLength())
+ if (!sSelected.isEmpty())
m_aDatasource.SelectEntry(sSelected);
else // select the first entry
m_aDatasource.SelectEntryPos(0);
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 6f1ed9b..6433aa0 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -197,7 +197,7 @@ namespace dbaui
)
{
const ::rtl::OUString sURLPrefix = aTypeLoop.getURLPrefix();
- if ( sURLPrefix.getLength() )
+ if ( !sURLPrefix.isEmpty() )
{
String sDisplayName = aTypeLoop.getDisplayName();
if ( m_pDatasourceType->GetEntryPos( sDisplayName ) ==
LISTBOX_ENTRY_NOTFOUND
@@ -260,7 +260,7 @@ namespace dbaui
void OGeneralPage::switchMessage(const ::rtl::OUString& _sURLPrefix)
{
SPECIAL_MESSAGE eMessage = smNone;
- if ( !_sURLPrefix.getLength()/*_eType == m_eNotSupportedKnownType*/ )
+ if ( _sURLPrefix.isEmpty()/*_eType == m_eNotSupportedKnownType*/ )
{
eMessage = smUnsupportedType;
}
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index b11ce3a..6293772 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -246,7 +246,7 @@ DBG_NAME(DbaIndexDialog)
++aCheck
)
{
- if (aCheck->sDescription.getLength())
+ if (!aCheck->sDescription.isEmpty())
break;
}
diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx
index c9449ab..40f3624 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -333,7 +333,7 @@ sal_Bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rCom
if ( xInfo->hasPropertyByName(PROPERTY_TABLENAME) )
{
xColumn->getPropertyValue(PROPERTY_TABLENAME) >>= sTableName;
- if ( sTableName.getLength() )
+ if ( !sTableName.isEmpty() )
{
// properly quote all parts of the table name, so e.g. <schema>.<table>
becomes "<schema>"."<table>"
::rtl::OUString aCatlog,aSchema,aTable;
@@ -353,7 +353,7 @@ sal_Bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rCom
{
const ::rtl::OUString aQuote = m_xMetaData.is() ?
m_xMetaData->getIdentifierQuoteString() : ::rtl::OUString();
_rFilter.Name = ::dbtools::quoteName(aQuote,_rFilter.Name);
- if ( sTableName.getLength() )
+ if ( !sTableName.isEmpty() )
{
static ::rtl::OUString sSep(RTL_CONSTASCII_USTRINGPARAM("."));
sTableName += sSep;
diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx
index caed832..f0b8a79 100644
--- a/dbaccess/source/ui/dlg/queryorder.cxx
+++ b/dbaccess/source/ui/dlg/queryorder.cxx
@@ -255,7 +255,7 @@ void DlgOrderCrit::EnableLines()
{
if(m_aColumnList[i]->GetSelectEntryPos() != 0)
{
- if(sOrder.getLength())
+ if(!sOrder.isEmpty())
sOrder += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
String sName = m_aColumnList[i]->GetSelectEntry();
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 61e80ac..bc12312 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -286,7 +286,7 @@ namespace
if ( aCurrentElement.getType() == SQLExceptionInfo::SQL_CONTEXT )
{
const SQLContext* pContext = (const SQLContext*)aCurrentElement;
- if ( pContext->Details.getLength() )
+ if ( !pContext->Details.isEmpty() )
{
ExceptionDisplayInfo aSubInfo( aCurrentElement.getType() );
@@ -634,7 +634,7 @@ void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle )
AddButton( BUTTON_OK, BUTTONID_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON );
}
- if ( m_sHelpURL.getLength() )
+ if ( !m_sHelpURL.isEmpty() )
{
lcl_addButton( *this, BUTTON_HELP, false );
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index 160f9b4..e0681a5 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -199,7 +199,7 @@ DBG_NAME(OTableSubscriptionPage)
// the catalog entry
SvLBoxEntry* pCatalog = m_aTablesList.GetEntryPosByName(sCatalog, pRootEntry);
- if (!pCatalog && sCatalog.getLength())
+ if (!(pCatalog || sCatalog.isEmpty()))
// the table (resp. its catalog) refered in this filter entry does not exist
anymore
continue;
@@ -211,7 +211,7 @@ DBG_NAME(OTableSubscriptionPage)
// the schema entry
SvLBoxEntry* pSchema = m_aTablesList.GetEntryPosByName(sSchema, (pCatalog ? pCatalog :
pRootEntry));
- if (!pSchema && sSchema.getLength())
+ if (!(pSchema || sSchema.isEmpty()))
// the table (resp. its schema) refered in this filter entry does not exist anymore
continue;
diff --git a/dbaccess/source/ui/inc/TableFieldDescription.hxx
b/dbaccess/source/ui/inc/TableFieldDescription.hxx
index 6f716e3..f90b09f 100644
--- a/dbaccess/source/ui/inc/TableFieldDescription.hxx
+++ b/dbaccess/source/ui/inc/TableFieldDescription.hxx
@@ -132,7 +132,7 @@ namespace dbaui
::std::vector< ::rtl::OUString>::const_iterator aIter = m_aCriteria.begin();
::std::vector< ::rtl::OUString>::const_iterator aEnd = m_aCriteria.end();
for(;aIter != aEnd;++aIter)
- if(aIter->getLength())
+ if(!aIter->isEmpty())
break;
return aIter != aEnd;
}
@@ -146,12 +146,12 @@ namespace dbaui
//------------------------------------------------------------------
inline sal_Bool OTableFieldDesc::IsEmpty() const
{
- sal_Bool bEmpty = (!m_aTableName.getLength() &&
- !m_aAliasName.getLength() &&
- !m_aFieldName.getLength() &&
- !m_aFieldAlias.getLength() &&
- !m_aFunctionName.getLength() &&
- !HasCriteria());
+ sal_Bool bEmpty = (m_aTableName.isEmpty() &&
+ m_aAliasName.isEmpty() &&
+ m_aFieldName.isEmpty() &&
+ m_aFieldAlias.isEmpty() &&
+ m_aFunctionName.isEmpty() &&
+ !HasCriteria());
return bEmpty;
}
//------------------------------------------------------------------
diff --git a/dbaccess/source/ui/inc/indexes.hxx b/dbaccess/source/ui/inc/indexes.hxx
index 18e8f4f..bba0d20 100644
--- a/dbaccess/source/ui/inc/indexes.hxx
+++ b/dbaccess/source/ui/inc/indexes.hxx
@@ -85,7 +85,7 @@ namespace dbaui
void setModified(sal_Bool _bModified) { bModified = _bModified; }
void clearModified() { setModified(sal_False); }
- sal_Bool isNew() const { return 0 == getOriginalName().getLength(); }
+ sal_Bool isNew() const { return getOriginalName().isEmpty(); }
void flagAsNew(const GrantIndexAccess&) { sOriginalName = ::rtl::OUString(); }
void flagAsCommitted(const GrantIndexAccess&) { sOriginalName = sName; }
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index 7ea3296..4850a32 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -711,7 +711,7 @@ sal_Bool ODatabaseExport::executeWizard(const ::rtl::OUString& _rTableName,const
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com",
"ODatabaseExport::executeWizard" );
DBG_CHKTHIS(ODatabaseExport,NULL);
- bool bHaveDefaultTable = ( m_sDefaultTableName.getLength() != 0 );
+ bool bHaveDefaultTable = !m_sDefaultTableName.isEmpty();
::rtl::OUString sTableName( bHaveDefaultTable ? m_sDefaultTableName : _rTableName );
OCopyTableWizard aWizard(
NULL,
@@ -882,7 +882,7 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R
::std::vector< ::rtl::OUString>::iterator aInsertEnd = aInsertList.end();
for (::std::vector< ::rtl::OUString>::iterator aInsertIter = aInsertList.begin(); aInsertIter
!= aInsertEnd; ++aInsertIter)
{
- if ( aInsertIter->getLength() )
+ if ( !aInsertIter->isEmpty() )
{
aSql += *aInsertIter;
aSql += aComma;
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx
b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index 2986655..baf2116 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -133,7 +133,7 @@ void OTableCopyHelper::insertTable( const ::rtl::OUString& i_rSourceDataSource,
::rtl::OUString sTableNameForAppend( GetTableNameForAppend() );
xWizard->setDestinationTableName( GetTableNameForAppend() );
- bool bAppendToExisting = ( sTableNameForAppend.getLength() != 0 );
+ bool bAppendToExisting = !sTableNameForAppend.isEmpty();
xWizard->setOperation( bAppendToExisting ? CopyTableOperation::AppendData :
CopyTableOperation::CopyDefinitionAndData );
xWizard->execute();
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index dab0dce6..ef1ec82 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -283,7 +283,7 @@ void ODatabaseImportExport::initialize()
if ( !m_xConnection.is() )
{ // we need a connection
- OSL_ENSURE(m_sDataSourceName.getLength(),"There must be a datsource name!");
+ OSL_ENSURE(!m_sDataSourceName.isEmpty(),"There must be a datsource name!");
Reference<XNameAccess> xDatabaseContext = Reference< XNameAccess
(m_xFactory->createInstance(SERVICE_SDB_DATABASECONTEXT), UNO_QUERY);
Reference< XEventListener> xEvt((::cppu::OWeakObject*)this,UNO_QUERY);
@@ -348,7 +348,7 @@ void ODatabaseImportExport::initialize()
throw;
}
}
- if ( !m_aFont.Name.getLength() )
+ if ( m_aFont.Name.isEmpty() )
{
Font aApplicationFont = OutputDevice::GetDefaultFont(
DEFAULTFONT_SANS_UNICODE,
@@ -618,7 +618,7 @@ void ORTFImportExport::appendRow(::rtl::OString* pHorzChar,sal_Int32 _nColumnCou
Reference<XPropertySet> xColumn(m_xRowSetColumns->getByIndex(i-1),UNO_QUERY_THROW);
dbtools::FormattedColumnValue aFormatedValue(aContext,xRowSet,xColumn);
::rtl::OUString sValue = aFormatedValue.getFormattedValue();
- if ( sValue.getLength() )
+ if ( !sValue.isEmpty() )
RTFOutFuncs::Out_String(*m_pStream,sValue,m_eDestEnc);
}
catch (Exception&)
@@ -936,7 +936,7 @@ void OHTMLImportExport::WriteTables()
Reference<XPropertySet>
xColumn(m_xRowSetColumns->getByIndex(i-1),UNO_QUERY_THROW);
dbtools::FormattedColumnValue aFormatedValue(aContext,xRowSet,xColumn);
::rtl::OUString sValue = aFormatedValue.getFormattedValue();
- if (sValue.getLength())
+ if (!sValue.isEmpty())
{
aValue = sValue;
}
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index e549387..54eae79 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -196,7 +196,7 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
try
{
- if(bPwdReq && !sPwd.getLength())
+ if(bPwdReq && sPwd.isEmpty())
{ // password required, but empty -> connect using an interaction handler
Reference<XCompletedConnection> xConnectionCompletion(_xDataSource, UNO_QUERY);
if (!xConnectionCompletion.is())
@@ -367,13 +367,13 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo,
sal_Bool bDBAutoIncrement = aIter->second->bAutoIncrement;
(void)bDBAutoIncrement;
#endif
if ( (
- !_sTypeName.getLength()
+ _sTypeName.isEmpty()
|| (aIter->second->aTypeName.equalsIgnoreAsciiCase(_sTypeName))
)
&& (
(
!aIter->second->aCreateParams.getLength()
- && !_sCreateParams.getLength()
+ && _sCreateParams.isEmpty()
)
|| (
(aIter->second->nPrecision >= _nPrecision)
@@ -621,7 +621,7 @@ void fillTypeInfo( const Reference< ::com::sun::star::sdbc::XConnection>& _rxCo
aName = _rsTypeNames.GetToken(TYPE_DATETIME);
break;
case DataType::BIT:
- if ( pInfo->aCreateParams.getLength() )
+ if ( !pInfo->aCreateParams.isEmpty() )
{
aName = _rsTypeNames.GetToken(TYPE_BIT);
break;
@@ -715,7 +715,7 @@ void setColumnProperties(const Reference<XPropertySet>& _rxColumn,const OFieldDe
_rxColumn->setPropertyValue(PROPERTY_ISCURRENCY,::cppu::bool2any(_pFieldDesc->IsCurrency()));
// set autoincrement value when available
// and only set when the entry is not empty, that lets the value in the column untouched
- if ( _pFieldDesc->IsAutoIncrement() && _pFieldDesc->GetAutoIncrementValue().getLength() &&
_rxColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_AUTOINCREMENTCREATION) )
+ if ( _pFieldDesc->IsAutoIncrement() && !_pFieldDesc->GetAutoIncrementValue().isEmpty() &&
_rxColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_AUTOINCREMENTCREATION) )
_rxColumn->setPropertyValue(PROPERTY_AUTOINCREMENTCREATION,makeAny(_pFieldDesc->GetAutoIncrementValue()));
}
// -----------------------------------------------------------------------------
@@ -733,7 +733,7 @@ void setColumnProperties(const Reference<XPropertySet>& _rxColumn,const OFieldDe
Reference< XConnection> xCon = _xMetaData->getConnection();
if ( xCon.is() )
sCatalog = xCon->getCatalog();
- if ( !sCatalog.getLength() )
+ if ( sCatalog.isEmpty() )
{
Reference<XResultSet> xRes = _xMetaData->getCatalogs();
Reference<XRow> xRow(xRes,UNO_QUERY);
@@ -1224,7 +1224,7 @@ void fillAutoIncrementValue(const Reference<XConnection>& _xConnection,
// -----------------------------------------------------------------------------
::rtl::OUString getStrippedDatabaseName(const Reference<XPropertySet>&
_xDataSource,::rtl::OUString& _rsDatabaseName)
{
- if ( !_rsDatabaseName.getLength() && _xDataSource.is() )
+ if ( _rsDatabaseName.isEmpty() && _xDataSource.is() )
{
try
{
@@ -1275,7 +1275,7 @@ namespace
if ( ( aCnt.getPropertyValue(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AnchorName")) ) >>= sAnchor ) )
{
- if ( sAnchor.getLength() > 0 )
+ if ( !sAnchor.isEmpty() )
{
_rAnchor = sAnchor;
bRet = sal_True;
@@ -1581,12 +1581,12 @@ sal_Bool insertHierachyElement( Window* _pParent, const Reference<
XMultiService
if ( xProp.is() )
xProp->getPropertyValue(PROPERTY_NAME) >>= sNewName;
- if ( !_bMove || !sNewName.getLength() )
+ if ( !_bMove || sNewName.isEmpty() )
{
String sTargetName,sLabel;
- if ( !sNewName.getLength() || xNameAccess->hasByName(sNewName) )
+ if ( sNewName.isEmpty() || xNameAccess->hasByName(sNewName) )
{
- if ( sNewName.getLength() )
+ if ( !sNewName.isEmpty() )
sTargetName = sNewName;
else
sTargetName = String(ModuleRes( _bCollection ? STR_NEW_FOLDER : ((_bForm) ?
RID_STR_FORM : RID_STR_REPORT)));
diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx
index 2806d0d..48e6ab5 100644
--- a/dbaccess/source/ui/misc/WCPage.cxx
+++ b/dbaccess/source/ui/misc/WCPage.cxx
@@ -248,7 +248,7 @@ sal_Bool OCopyTable::LeavePage()
m_pParent->m_sName = m_edTableName.GetText();
m_edTableName.SaveValue();
- if(!m_pParent->m_sName.getLength())
+ if(m_pParent->m_sName.isEmpty())
{
String sError(ModuleRes(STR_INVALID_TABLE_NAME));
m_pParent->showError(sError);
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 0adea97..c1d943c 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -200,7 +200,7 @@ void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _
{
::rtl::OUString sFilter;
m_xObject->getPropertyValue( aProperties[i].first ) >>= sFilter;
- if ( sFilter.getLength() )
+ if ( !sFilter.isEmpty() )
{
sStatement += aProperties[i].second;
String sReplace = sFilter;
@@ -589,12 +589,12 @@ OCopyTableWizard::OCopyTableWizard( Window * pParent, const ::rtl::OUString&
_rD
try
{
m_sSourceName = m_rSourceObject.getQualifiedObjectName();
- OSL_ENSURE( m_sSourceName.getLength() > 0, "OCopyTableWizard::OCopyTableWizard: unable to
retrieve the source object's name!" );
+ OSL_ENSURE( !m_sSourceName.isEmpty(), "OCopyTableWizard::OCopyTableWizard: unable to
retrieve the source object's name!" );
- if ( !sInitialTableName.getLength() )
+ if ( sInitialTableName.isEmpty() )
sInitialTableName = m_sSourceName;
- if ( !m_sName.getLength() )
+ if ( m_sName.isEmpty() )
{
if ( _xSourceConnection == m_xDestConnection )
{
@@ -951,7 +951,7 @@ IMPL_LINK( OCopyTableWizard, ImplOKHdl, OKButton*, EMPTYARG )
OCopyTable* pPage = static_cast<OCopyTable*>(GetPage(0));
m_bCreatePrimaryKeyColumn = sal_True;
m_aKeyName = pPage->GetKeyName();
- if ( !m_aKeyName.getLength() )
+ if ( m_aKeyName.isEmpty() )
m_aKeyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"ID" ) );
m_aKeyName = createUniqueName( m_aKeyName );
sal_Int32 nBreakPos2 = 0;
@@ -992,7 +992,7 @@ void OCopyTableWizard::setCreatePrimaryKey( bool _bDoCreate, const ::rtl::OUStri
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com",
"OCopyTableWizard::setCreatePrimaryKey" );
m_bCreatePrimaryKeyColumn = _bDoCreate;
- if ( _rSuggestedName.getLength() )
+ if ( !_rSuggestedName.isEmpty() )
m_aKeyName = _rSuggestedName;
OCopyTable* pSettingsPage = dynamic_cast< OCopyTable* >( GetPage( 0 ) );
@@ -1266,7 +1266,7 @@ Reference< XPropertySet > OCopyTableWizard::createView() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com",
"OCopyTableWizard::createView" );
::rtl::OUString sCommand( m_rSourceObject.getSelectStatement() );
- OSL_ENSURE( sCommand.getLength(), "OCopyTableWizard::createView: no statement in the source
object!" );
+ OSL_ENSURE( !sCommand.isEmpty(), "OCopyTableWizard::createView: no statement in the source
object!" );
// there are legitimate cases in which getSelectStatement does not provide a statement,
// but in all those cases, this method here should never be called.
return ::dbaui::createView( m_sName, m_xDestConnection, sCommand );
@@ -1302,12 +1302,12 @@ Reference< XPropertySet > OCopyTableWizard::createTable()
sTable,
::dbtools::eInDataManipulation);
- if ( !sCatalog.getLength() && xMetaData->supportsCatalogsInTableDefinitions() )
+ if ( sCatalog.isEmpty() && xMetaData->supportsCatalogsInTableDefinitions() )
{
sCatalog = m_xDestConnection->getCatalog();
}
- if ( !sSchema.getLength() && xMetaData->supportsSchemasInTableDefinitions() )
+ if ( sSchema.isEmpty() && xMetaData->supportsSchemasInTableDefinitions() )
{
sSchema = xMetaData->getUserName();
}
diff --git a/dbaccess/source/ui/misc/charsets.cxx b/dbaccess/source/ui/misc/charsets.cxx
index 05f2577..55f3eaa 100644
--- a/dbaccess/source/ui/misc/charsets.cxx
+++ b/dbaccess/source/ui/misc/charsets.cxx
@@ -120,7 +120,7 @@ namespace dbaui
:CharsetDisplayDerefHelper_Base(_rBase)
,m_sDisplayName(_rDisplayName)
{
- OSL_ENSURE( m_sDisplayName.getLength(),
"CharsetDisplayDerefHelper::CharsetDisplayDerefHelper: invalid display name!" );
+ OSL_ENSURE( !m_sDisplayName.isEmpty(),
"CharsetDisplayDerefHelper::CharsetDisplayDerefHelper: invalid display name!" );
}
//=========================================================================
diff --git a/dbaccess/source/ui/misc/databaseobjectview.cxx
b/dbaccess/source/ui/misc/databaseobjectview.cxx
index f2d7d8a..60597f3 100644
--- a/dbaccess/source/ui/misc/databaseobjectview.cxx
+++ b/dbaccess/source/ui/misc/databaseobjectview.cxx
@@ -208,7 +208,7 @@ namespace dbaui
{
DatabaseObjectView::fillDispatchArgs( i_rDispatchArgs, _aDataSource, _rObjectName );
- const bool bIncludeQueryName = 0 != _rObjectName.getLength();
+ const bool bIncludeQueryName = !_rObjectName.isEmpty();
const bool bGraphicalDesign = i_rDispatchArgs.getOrDefault(
(::rtl::OUString)PROPERTY_GRAPHICAL_DESIGN, sal_True );
const bool bEditViewAsSQLCommand = ( m_nCommandType == CommandType::TABLE ) &&
!bGraphicalDesign;
@@ -240,7 +240,7 @@ namespace dbaui
{
DatabaseObjectView::fillDispatchArgs( i_rDispatchArgs, _aDataSource, _rObjectName );
- if ( 0 != _rObjectName.getLength() )
+ if ( !_rObjectName.isEmpty() )
{
i_rDispatchArgs.put( (::rtl::OUString)PROPERTY_CURRENTTABLE, _rObjectName );
}
@@ -250,7 +250,7 @@ namespace dbaui
Reference< XComponent > TableDesigner::doCreateView( const Any& _rDataSource, const
::rtl::OUString& _rObjectName,
const ::comphelper::NamedValueCollection& i_rCreationArgs )
{
- bool bIsNewDesign = ( _rObjectName.getLength() == 0 );
+ bool bIsNewDesign = _rObjectName.isEmpty();
// let's see whether the connection can provide a dedicated table desginer
Reference< XInterface > xDesigner;
@@ -307,7 +307,7 @@ namespace dbaui
const ::rtl::OUString& _rQualifiedName)
{
DatabaseObjectView::fillDispatchArgs( i_rDispatchArgs, _aDataSource, _rQualifiedName );
- OSL_ENSURE( 0 != _rQualifiedName.getLength(),"A Table name must be set");
+ OSL_ENSURE( !_rQualifiedName.isEmpty(),"A Table name must be set");
::rtl::OUString sCatalog;
::rtl::OUString sSchema;
::rtl::OUString sTable;
diff --git a/dbaccess/source/ui/misc/datasourceconnector.cxx
b/dbaccess/source/ui/misc/datasourceconnector.cxx
index 5f46edf..7b87ccf 100644
--- a/dbaccess/source/ui/misc/datasourceconnector.cxx
+++ b/dbaccess/source/ui/misc/datasourceconnector.cxx
@@ -136,7 +136,7 @@ namespace dbaui
SQLExceptionInfo aInfo;
try
{
- if (bPwdRequired && !sPassword.getLength())
+ if (bPwdRequired && sPassword.isEmpty())
{ // password required, but empty -> connect using an interaction handler
Reference< XCompletedConnection > xConnectionCompletion( _xDataSource,
UNO_QUERY_THROW );
@@ -201,7 +201,7 @@ namespace dbaui
}
else
{
- if ( m_sContextInformation.getLength() )
+ if ( !m_sContextInformation.isEmpty() )
{
SQLException aError;
aError.Message = m_sContextInformation;
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index 4d8e4fb..96f6807 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -302,7 +302,7 @@ namespace dbaui
// get a number formatter
Reference< XPropertySet > xDataSourceProps(
m_pImpl->m_aDataSource.getDataSourceProps(), UNO_SET_THROW );
xDataSourceProps->getPropertyValue( PROPERTY_NAME ) >>= m_pImpl->m_sDataSourceName;
- DBG_ASSERT( m_pImpl->m_sDataSourceName.getLength(),
"DBSubComponentController::initializeConnection: invalid data source name!" );
+ DBG_ASSERT( !m_pImpl->m_sDataSourceName.isEmpty(),
"DBSubComponentController::initializeConnection: invalid data source name!" );
Reference< XNumberFormatsSupplier> xSupplier =
::dbtools::getNumberFormats(m_pImpl->m_xConnection);
if(xSupplier.is())
{
diff --git a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
index f1eb723..a874614 100644
--- a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
+++ b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
@@ -130,7 +130,7 @@ namespace dbaui
try
{
::rtl::OUStringBuffer aCompleteName;
- if ( m_pImpl->sRelativeRoot.getLength() )
+ if ( !m_pImpl->sRelativeRoot.isEmpty() )
{
aCompleteName.append( m_pImpl->sRelativeRoot );
aCompleteName.appendAscii( "/" );
diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx
b/dbaccess/source/ui/misc/linkeddocuments.cxx
index 9e6aa61..9692b90 100644
--- a/dbaccess/source/ui/misc/linkeddocuments.cxx
+++ b/dbaccess/source/ui/misc/linkeddocuments.cxx
@@ -206,7 +206,7 @@ namespace dbaui
if ( m_xConnection.is() )
aArgs.put( "ActiveConnection", m_xConnection );
- if ( _rObjectName.getLength() && ( _nCommandType != -1 ) )
+ if ( !_rObjectName.isEmpty() && ( _nCommandType != -1 ) )
{
aArgs.put( "CommandType", _nCommandType );
aArgs.put( "Command", _rObjectName );
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx
b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index 39d0fa2..60e8e7c 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -336,7 +336,7 @@ OTableWindowData* OJoinTableView::CreateImpl(const ::rtl::OUString& _rComposedNa
void OJoinTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString&
rWinName, sal_Bool /*bNewTable*/)
{
DBG_CHKTHIS(OJoinTableView,NULL);
- OSL_ENSURE(_rComposedName.getLength(),"There must be a table name supplied!");
+ OSL_ENSURE(!_rComposedName.isEmpty(),"There must be a table name supplied!");
TTableWindowData::value_type pNewTabWinData(createTableWindowData( _rComposedName,
rWinName,rWinName ));
diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx
b/dbaccess/source/ui/querydesign/QTableWindow.cxx
index 027cac1..f77aba6 100644
--- a/dbaccess/source/ui/querydesign/QTableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx
@@ -100,7 +100,7 @@ sal_Bool OQueryTableWindow::Init()
TTableWindowData::value_type pWinData = GetData();
- if (m_strInitialAlias.getLength() )
+ if (!m_strInitialAlias.isEmpty() )
// Der Alias wurde explizit mit angegeben
sAliasName = m_strInitialAlias;
else if ( GetTable().is() )
@@ -125,7 +125,7 @@ sal_Bool OQueryTableWindow::Init()
if (!bSuccess)
{ // es soll nur ein Dummy-Window aufgemacht werden ...
- OSL_ENSURE(GetAliasName().getLength(), "OQueryTableWindow::Init : kein Alias- UND kein
Tabellenname geht nicht !");
+ OSL_ENSURE(!GetAliasName().isEmpty(), "OQueryTableWindow::Init : kein Alias- UND kein
Tabellenname geht nicht !");
// .. aber das braucht wenigstens einen Alias
// ::com::sun::star::form::ListBox anlegen
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 3f500b7..d253d13 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -113,7 +113,7 @@ namespace
::rtl::OUString quoteTableAlias(sal_Bool _bQuote, const ::rtl::OUString& _sAliasName, const
::rtl::OUString& _sQuote)
{
::rtl::OUString sRet;
- if ( _bQuote && _sAliasName.getLength() )
+ if ( _bQuote && !_sAliasName.isEmpty() )
{
sRet = ::dbtools::quoteName(_sQuote,_sAliasName);
const static ::rtl::OUString sTableSeparater('.');
@@ -129,7 +129,7 @@ namespace
if ( _pTableRef )
{
sTableRange = ::connectivity::OSQLParseNode::getTableRange(_pTableRef);
- if ( !sTableRange.getLength() )
+ if ( sTableRange.isEmpty() )
_pTableRef->parseNodeToStr(sTableRange,xConnection,NULL,sal_False,sal_False);
}
return sTableRange;
@@ -266,7 +266,7 @@ namespace
::connectivity::OSQLParseTreeIterator& rParseIter =
static_cast<OQueryController&>(_pView->getController()).getParseIterator();
rParseIter.getColumnRange( pColumnRef, aColumnName, aTableRange );
- if ( aTableRange.getLength() )
+ if ( !aTableRange.isEmpty() )
{
OQueryTableWindow* pSTW =
static_cast<OQueryTableView*>(_pView->getTableView())->FindTable( aTableRange );
bErg = (pSTW && pSTW->ExistsField( aColumnName, _rDragInfo ) );
@@ -351,7 +351,7 @@ namespace
if ( pData->GetJoinType() != INNER_JOIN && _pEntryTabTo->ExistsAVisitedConn() )
{
sal_Bool bBrace = sal_False;
- if(_rJoin.getLength() && _rJoin.lastIndexOf(')') == (_rJoin.getLength()-1))
+ if(!_rJoin.isEmpty() && _rJoin.lastIndexOf(')') == (_rJoin.getLength()-1))
{
bBrace = sal_True;
_rJoin = _rJoin.replaceAt(_rJoin.getLength()-1,1,::rtl::OUString(' '));
@@ -475,7 +475,7 @@ namespace
if ( pEntryConnData->GetJoinType() == INNER_JOIN && !pEntryConnData->isNatural() )
return;
- if(!aJoin.getLength())
+ if(aJoin.isEmpty())
{
OQueryTableWindow* pEntryTabFrom =
static_cast<OQueryTableWindow*>(pEntryConn->GetSourceWin());
aJoin = BuildJoin(_xConnection,pEntryTabFrom,pEntryTabTo,pEntryConnData);
@@ -544,7 +544,7 @@ namespace
else if (SQL_ISRULEOR2(pNode,search_condition,boolean_term) && //
AND/OR-Verknuepfung:
pNode->count() == 3)
{
- // nur AND Verknüpfung zulassen
+ // nur AND Verkn�pfung zulassen
if (!SQL_ISTOKEN(pNode->getChild(1),AND))
eErrorCode = eIllegalJoinCondition;
else if ( eOk == (eErrorCode = InsertJoinConnection(_pView,pNode->getChild(0),
_eJoinType,pLeftTable,pRightTable)) )
@@ -633,7 +633,7 @@ namespace
{
OTableFieldDescRef pEntryField = *aIter;
::rtl::OUString rFieldName = pEntryField->GetField();
- if ( rFieldName.getLength() && pEntryField->IsVisible() )
+ if ( !rFieldName.isEmpty() && pEntryField->IsVisible() )
{
aTmpStr = ::rtl::OUString();
const ::rtl::OUString rAlias = pEntryField->GetAlias();
@@ -661,7 +661,7 @@ namespace
}
if ( ( rFieldName.toChar() != '*' ) && ( rFieldName.indexOf( aQuote ) ==
-1 ) )
{
- OSL_ENSURE(pEntryField->GetTable().getLength(),"No table field name!");
+ OSL_ENSURE(!pEntryField->GetTable().isEmpty(),"No table field name!");
aTmpStr.append(::dbtools::quoteName(aQuote, rFieldName));
}
else
@@ -672,7 +672,7 @@ namespace
if ( pEntryField->isAggreateFunction() )
{
- OSL_ENSURE(pEntryField->GetFunction().getLength(),"Functionname darf hier
nicht leer sein! ;-(");
+ OSL_ENSURE(!pEntryField->GetFunction().isEmpty(),"Functionname darf hier
nicht leer sein! ;-(");
::rtl::OUStringBuffer aTmpStr2( pEntryField->GetFunction());
aTmpStr2.appendAscii("(");
aTmpStr2.append(aTmpStr.makeStringAndClear());
@@ -680,7 +680,7 @@ namespace
aTmpStr = aTmpStr2;
}
- if (rFieldAlias.getLength() &&
+ if (!rFieldAlias.isEmpty() &&
(rFieldName.toChar() != '*' ||
pEntryField->isNumericOrAggreateFunction() ||
pEntryField->isOtherFunction()))
@@ -738,10 +738,10 @@ namespace
OTableFieldDescRef pEntryField = *aIter;
aFieldName = pEntryField->GetField();
- if (!aFieldName.getLength())
+ if (aFieldName.isEmpty())
continue;
aCriteria = pEntryField->GetCriteria( i );
- if ( aCriteria.getLength() )
+ if ( !aCriteria.isEmpty() )
{
// * is not allowed to contain any filter, only when used in combination
an aggregate function
if ( aFieldName.toChar() == '*' && pEntryField->isNoneFunction() )
@@ -764,14 +764,14 @@ namespace
if ( pEntryField->isAggreateFunction() || pEntryField->IsGroupBy() )
{
- if (!aHavingStr.getLength()) // noch keine Kriterien
+ if (aHavingStr.isEmpty()) // noch keine Kriterien
aHavingStr += ::rtl::OUString('('); // Klammern
else
aHavingStr += C_AND;
if ( pEntryField->isAggreateFunction() )
{
- OSL_ENSURE(pEntryField->GetFunction().getLength(),"No function
name for aggregate given!");
+ OSL_ENSURE(!pEntryField->GetFunction().isEmpty(),"No function name
for aggregate given!");
aHavingStr += pEntryField->GetFunction();
aHavingStr += ::rtl::OUString('('); // Klammern
aHavingStr += aWork;
@@ -806,7 +806,7 @@ namespace
}
else
{
- if ( !aWhereStr.getLength() ) // noch keine Kriterien
+ if ( aWhereStr.isEmpty() ) // noch keine Kriterien
aWhereStr += ::rtl::OUString('('); // Klammern
else
aWhereStr += C_AND;
@@ -839,17 +839,17 @@ namespace
}
}
}
- // nur einmal für jedes Feld
+ // nur einmal f�r jedes Feld
else if ( !i && pEntryField->isCondition() )
{
- if (!aWhereStr.getLength()) // noch keine Kriterien
+ if (aWhereStr.isEmpty()) // noch keine Kriterien
aWhereStr += ::rtl::OUString('('); // Klammern
else
aWhereStr += C_AND;
aWhereStr += pEntryField->GetField();
}
}
- if (aWhereStr.getLength())
+ if (!aWhereStr.isEmpty())
{
aWhereStr += ::rtl::OUString(')'); // Klammern zu fuer
'AND' Zweig
if (rRetStr.getLength()) // schon Feldbedingungen ?
@@ -858,7 +858,7 @@ namespace
rRetStr.append(sal_Unicode('('));
rRetStr.append(aWhereStr);
}
- if (aHavingStr.getLength())
+ if (!aHavingStr.isEmpty())
{
aHavingStr += ::rtl::OUString(')'); // Klammern zu fuer
'AND' Zweig
if (rHavingStr.getLength()) // schon Feldbedingungen ?
@@ -923,13 +923,13 @@ namespace
continue;
}
- if ( bColumnAliasInOrderBy && pEntryField->GetFieldAlias().getLength() )
+ if ( bColumnAliasInOrderBy && !pEntryField->GetFieldAlias().isEmpty() )
{
aWorkStr += ::dbtools::quoteName(aQuote, pEntryField->GetFieldAlias());
}
else if ( pEntryField->isNumericOrAggreateFunction() )
{
- OSL_ENSURE(pEntryField->GetFunction().getLength(),"Functionname darf hier
nicht leer sein! ;-(");
+ OSL_ENSURE(!pEntryField->GetFunction().isEmpty(),"Functionname darf hier
nicht leer sein! ;-(");
aWorkStr += pEntryField->GetFunction();
aWorkStr += ::rtl::OUString('(');
aWorkStr += quoteTableAlias(bMulti,pEntryField->GetAlias(),aQuote);
@@ -962,7 +962,7 @@ namespace
aWorkStr = sTemp;
}
- if ( aWorkStr.getLength() )
+ if ( !aWorkStr.isEmpty() )
{
const sal_Int32 nMaxOrder = xMetaData->getMaxColumnsInOrderBy();
String sToken(aWorkStr);
@@ -996,7 +996,7 @@ namespace
OQueryTableConnectionData* pEntryConnData =
static_cast<OQueryTableConnectionData*>(pEntryConn->GetData().get());
if ( pEntryConnData->GetJoinType() == INNER_JOIN && !pEntryConnData->isNatural() )
{
- if(_rJoinCrit.getLength())
+ if(!_rJoinCrit.isEmpty())
_rJoinCrit += C_AND;
_rJoinCrit +=
BuildJoinCriteria(_xConnection,pEntryConnData->GetConnLineDataList(),pEntryConnData);
}
@@ -1069,7 +1069,7 @@ namespace
::rtl::OUString aJoin;
GetNextJoin(_xConnection,pEntryConn,static_cast<OQueryTableWindow*>(pEntryConn->GetDestWin()),aJoin);
- if(aJoin.getLength())
+ if(!aJoin.isEmpty())
{
// insert tables into table list to avoid double entries
OQueryTableWindow* pEntryTabFrom =
static_cast<OQueryTableWindow*>(pEntryConn->GetSourceWin());
@@ -1140,7 +1140,7 @@ namespace
}
}
- if(aTableListStr.getLength())
+ if(!aTableListStr.isEmpty())
aTableListStr = aTableListStr.replaceAt(aTableListStr.getLength()-1,1,
::rtl::OUString() );
return aTableListStr;
}
@@ -1167,7 +1167,7 @@ namespace
OTableFieldDescRef pEntryField = *aIter;
if ( pEntryField->IsGroupBy() )
{
- OSL_ENSURE(pEntryField->GetField().getLength(),"Kein FieldName vorhanden!;-(");
+ OSL_ENSURE(!pEntryField->GetField().isEmpty(),"Kein FieldName vorhanden!;-(");
::rtl::OUString sGroupByPart =
quoteTableAlias(bMulti,pEntryField->GetAlias(),aQuote);
// only quote the field name when it isn't calculated
@@ -1204,7 +1204,7 @@ namespace
}
}
}
- if ( aGroupByStr.getLength() )
+ if ( !aGroupByStr.isEmpty() )
{
aGroupByStr = aGroupByStr.replaceAt(aGroupByStr.getLength()-1,1, ::rtl::OUString('
') );
::rtl::OUString aGroupByStr2(RTL_CONSTASCII_USTRINGPARAM(" GROUP BY "));
@@ -1797,8 +1797,8 @@ namespace
rParseIter.getColumnRange( pColumnRef, aColumnName, aTableRange );
sal_Bool bFound(sal_False);
- OSL_ENSURE(aColumnName.getLength(),"Columnname darf nicht leer sein");
- if (!aTableRange.getLength())
+ OSL_ENSURE(!aColumnName.isEmpty(),"Columnname darf nicht leer sein");
+ if (aTableRange.isEmpty())
{
// SELECT column, ...
bFound = NULL != lcl_findColumnInTables( aColumnName, *pTabList, _raInfo );
@@ -1864,7 +1864,7 @@ namespace
if ( !checkJoinConditions(_pView,pNode->getChild(0)) ||
!checkJoinConditions(_pView,pRightTableRef))
return sal_False;
- // named column join wird später vieleicht noch implementiert
+ // named column join wird sp�ter vieleicht noch implementiert
// SQL_ISRULE(pNode->getChild(4),named_columns_join)
EJoinType eJoinType = INNER_JOIN;
bool bNatural = false;
@@ -2143,7 +2143,7 @@ namespace
return eNoSelectStatement;
::connectivity::OSQLParseNode* pParseTree = pNode->getChild(2); // selection
- sal_Bool bFirstField = sal_True; // bei der Initialisierung muß auf alle Faelle das
erste Feld neu aktiviert werden
+ sal_Bool bFirstField = sal_True; // bei der Initialisierung mu� auf alle Faelle das
erste Feld neu aktiviert werden
SqlParseError eErrorCode = eOk;
@@ -2767,7 +2767,7 @@ void OQueryDesignView::fillValidFields(const ::rtl::OUString& sAliasName,
ComboB
OSL_ENSURE(pFieldList != NULL, "OQueryDesignView::FillValidFields : What the hell do you think
I can do with a NULL-ptr ? This will crash !");
pFieldList->Clear();
- sal_Bool bAllTables = sAliasName.getLength() == 0;
+ sal_Bool bAllTables = sAliasName.isEmpty();
OJoinTableView::OTableWindowMap* pTabWins = m_pTableView->GetTabWinMap();
::rtl::OUString strCurrentPrefix;
@@ -2852,14 +2852,14 @@ sal_Bool OQueryDesignView::checkStatement()
for(;aIter != aEnd;++aIter)
{
OTableFieldDescRef pEntryField = *aIter;
- if ( pEntryField->GetField().getLength() && pEntryField->IsVisible() )
+ if (!pEntryField->GetField().isEmpty() && pEntryField->IsVisible() )
++nFieldcount;
- else if (pEntryField->GetField().getLength() &&
+ else if (!pEntryField->GetField().isEmpty() &&
!pEntryField->HasCriteria() &&
pEntryField->isNoneFunction() &&
pEntryField->GetOrderDir() == ORDER_NONE &&
!pEntryField->IsGroupBy() &&
- !pEntryField->GetFunction().getLength() )
+ pEntryField->GetFunction().isEmpty() )
rUnUsedFields.push_back(pEntryField);
}
if ( !nFieldcount ) // keine Felder sichtbar also zur"uck
@@ -2872,7 +2872,7 @@ sal_Bool OQueryDesignView::checkStatement()
sal_uInt32 nTabcount = pTabList->size();
::rtl::OUString aFieldListStr(GenerateSelectList(this,rFieldList,nTabcount>1));
- if( !aFieldListStr.getLength() )
+ if( aFieldListStr.isEmpty() )
return ::rtl::OUString();
// Ausnahmebehandlung, wenn keine Felder angegeben worden sind
// Dann darf die Tabpage nicht gewechselt werden
@@ -2883,7 +2883,7 @@ sal_Bool OQueryDesignView::checkStatement()
const ::std::vector<OTableConnection*>* pConnList = m_pTableView->getTableConnections();
Reference< XConnection> xConnection = rController.getConnection();
::rtl::OUString aTableListStr(GenerateFromClause(xConnection,pTabList,pConnList));
- OSL_ENSURE(aTableListStr.getLength(), "OQueryDesignView::getStatement() : unerwartet : habe
Felder, aber keine Tabellen !");
+ OSL_ENSURE(!aTableListStr.isEmpty(), "OQueryDesignView::getStatement() : unerwartet : habe
Felder, aber keine Tabellen !");
// wenn es Felder gibt, koennen die nur durch Einfuegen aus einer schon existenten Tabelle
entstanden sein; wenn andererseits
// eine Tabelle geloescht wird, verschwinden auch die zugehoerigen Felder -> ergo KANN es das
nicht geben, dass Felder
// existieren, aber keine Tabellen (und aFieldListStr hat schon eine Laenge, das stelle ich
oben sicher)
@@ -2894,7 +2894,7 @@ sal_Bool OQueryDesignView::checkStatement()
::rtl::OUString aJoinCrit;
GenerateInnerJoinCriterias(xConnection,aJoinCrit,pConnList);
- if(aJoinCrit.getLength())
+ if(!aJoinCrit.isEmpty())
{
::rtl::OUString aTmp(RTL_CONSTASCII_USTRINGPARAM("( "));
aTmp += aJoinCrit;
@@ -3455,7 +3455,7 @@ void OQueryDesignView::fillFunctionInfo( const
::connectivity::OSQLParseNode* p
pFunctionName = pFunctionName->getChild(0);
::rtl::OUString sFunctionName = pFunctionName->getTokenValue();
- if ( !sFunctionName.getLength() )
+ if ( sFunctionName.isEmpty() )
sFunctionName =
::rtl::OStringToOUString(OSQLParser::TokenIDToStr(pFunctionName->getTokenID()),RTL_TEXTENCODING_UTF8);
nDataType = OSQLParser::getFunctionReturnType(
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx
b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 5266418..0d9b4c7 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -429,7 +429,7 @@ void OQueryTableView::AddTabWin(const ::rtl::OUString& _rTableName, const ::rtl:
sTable,
::dbtools::eInDataManipulation);
::rtl::OUString sRealName(sSchema);
- if (sRealName.getLength())
+ if (!sRealName.isEmpty())
sRealName+= ::rtl::OUString('.');
sRealName += sTable;
@@ -474,7 +474,7 @@ Reference<XPropertySet> getKeyReferencedTo(const Reference<XIndexAccess>& _rxKey
void OQueryTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString&
_rTableName, const ::rtl::OUString& strAlias, sal_Bool bNewTable)
{
DBG_CHKTHIS(OQueryTableView,NULL);
- OSL_ENSURE(_rTableName.getLength() || strAlias.getLength(), "OQueryTableView::AddTabWin : kein
Tabellen- und kein Aliasname !");
+ OSL_ENSURE(!_rTableName.isEmpty() || !strAlias.isEmpty(), "OQueryTableView::AddTabWin : kein
Tabellen- und kein Aliasname !");
// wenn der Tabellenname nicht gesetzt ist, steht das fuer ein Dummy-Fenster, das braucht
aber wenigstens einen Alias-Namen
// neue Datenstruktur erzeugen
@@ -516,7 +516,7 @@ void OQueryTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::r
// Relationen zwischen den einzelnen Tabellen anzeigen
OTableWindowMap* pTabWins = GetTabWinMap();
- if(bNewTable && !pTabWins->empty() && _rTableName.getLength())
+ if(bNewTable && !pTabWins->empty() && !_rTableName.isEmpty())
{
modified();
if ( m_pAccessible )
@@ -558,7 +558,7 @@ void OQueryTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::r
{ // our new table has a foreign key
// so look if the referenced table is already in our list
xProp->getPropertyValue(PROPERTY_REFERENCEDTABLE) >>= aReferencedTable;
- OSL_ENSURE(aReferencedTable.getLength(),"Foreign key without
referencedTableName");
+ OSL_ENSURE(!aReferencedTable.isEmpty(),"Foreign key without
referencedTableName");
OTableWindowMap::const_iterator aIter = pTabWins->find(aReferencedTable);
OTableWindowMap::const_iterator aEnd = pTabWins->end();
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index ff46e81..8aefc3d 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -74,7 +74,7 @@ namespace
{
sal_Bool isFieldNameAsterix(const ::rtl::OUString& _sFieldName )
{
- sal_Bool bAsterix = !(_sFieldName.getLength() && _sFieldName.toChar() != '*');
+ sal_Bool bAsterix = !(!_sFieldName.isEmpty() && _sFieldName.toChar() != '*');
if ( !bAsterix )
{
String sName = _sFieldName;
@@ -520,7 +520,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
m_pTableCell->InsertEntry(static_cast<OQueryTableWindow*>(aIter->second)->GetAliasName());
m_pTableCell->InsertEntry(String(ModuleRes(STR_QUERY_NOTABLE)), 0);
- if (pEntry->GetAlias().getLength())
+ if (!pEntry->GetAlias().isEmpty())
m_pTableCell->SelectEntry(pEntry->GetAlias());
else
m_pTableCell->SelectEntry(String(ModuleRes(STR_QUERY_NOTABLE)));
@@ -613,7 +613,7 @@ sal_Bool OSelectionBrowseBox::fillColumnRef(const ::rtl::OUString& _sColumnName,
sal_Bool bError = sal_False;
::comphelper::UStringMixEqual bCase(_xMetaData->supportsMixedCaseQuotedIdentifiers());
// check if the table name is the same
- if ( _sTableRange.getLength() && (bCase(_pEntry->GetTable(),_sTableRange) ||
bCase(_pEntry->GetAlias(),_sTableRange)) )
+ if ( !_sTableRange.isEmpty() && (bCase(_pEntry->GetTable(),_sTableRange) ||
bCase(_pEntry->GetAlias(),_sTableRange)) )
{ // a table was already inserted and the tables contains that column name
if ( !_pEntry->GetTabWindow() )
@@ -705,7 +705,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
if ( _pEntry->isAggreateFunction() )
{
- OSL_ENSURE(_pEntry->GetFunction().getLength(),"Functionname darf hier nicht leer sein!
;-(");
+ OSL_ENSURE(!_pEntry->GetFunction().isEmpty(),"Functionname darf hier nicht leer sein!
;-(");
::rtl::OUStringBuffer aTmpStr2( _pEntry->GetFunction());
aTmpStr2.appendAscii("(");
aTmpStr2.append(sSql);
@@ -714,7 +714,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
}
sSql = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT ")) + sSql;
- if ( sFieldAlias.getLength() )
+ if ( !sFieldAlias.isEmpty() )
{ // always quote the alias name there canbe no function in it
sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" "));
sSql += ::dbtools::quoteName( xMetaData->getIdentifierQuoteString(), sFieldAlias );
@@ -769,7 +769,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
OSL_ENSURE(SQL_ISRULE(pChild,derived_column), "No derived column found!");
// get the column alias
::rtl::OUString sColumnAlias = OSQLParseTreeIterator::getColumnAlias(pChild);
- if ( sColumnAlias.getLength() ) // we found an as clause
+ if ( !sColumnAlias.isEmpty() ) // we found an as clause
{
String aSelectionAlias = aSelEntry->GetFieldAlias();
aSelEntry->SetFieldAlias( sColumnAlias );
@@ -1175,7 +1175,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
strOldCellContents = pEntry->GetCriteria(nIdx);
pEntry->SetCriteria(nIdx, aCrit);
sNewValue = pEntry->GetCriteria(nIdx);
- if(aCrit.getLength() && nRow >= (GetRowCount()-1))
+ if(!aCrit.isEmpty() && nRow >= (GetRowCount()-1))
bAppendRow = sal_True;
}
}
@@ -1764,7 +1764,7 @@ void OSelectionBrowseBox::DuplicateConditionLevel( const sal_uInt16 nLevel)
OTableFieldDescRef pEntry = *aIter;
::rtl::OUString sValue = pEntry->GetCriteria(nLevel);
- if ( sValue.getLength() )
+ if ( !sValue.isEmpty() )
{
pEntry->SetCriteria( nNewLevel, sValue);
if ( nNewLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1) )
@@ -1812,7 +1812,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo,
const S
if(!m_bGroupByUnRelated && pEntry->IsGroupBy())
pEntry->SetVisible(sal_True);
}
- if (!pEntry->GetCriteria(nLevel).getLength() )
+ if (pEntry->GetCriteria(nLevel).isEmpty() )
{
pEntry->SetCriteria( nLevel, rValue);
if(nLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1))
diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx
b/dbaccess/source/ui/querydesign/TableConnectionData.cxx
index f7d0a50..539c2e4 100644
--- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx
+++ b/dbaccess/source/ui/querydesign/TableConnectionData.cxx
@@ -177,7 +177,7 @@ void OTableConnectionData::normalizeLines()
sal_Int32 nCount = m_vConnLineData.size();
for(sal_Int32 i=0;i<nCount;)
{
- if(!m_vConnLineData[i]->GetSourceFieldName().getLength() ||
!m_vConnLineData[i]->GetDestFieldName().getLength())
+ if(m_vConnLineData[i]->GetSourceFieldName().isEmpty() ||
m_vConnLineData[i]->GetDestFieldName().isEmpty())
{
OConnectionLineDataRef pData = m_vConnLineData[i];
m_vConnLineData.erase(m_vConnLineData.begin()+i);
diff --git a/dbaccess/source/ui/querydesign/TableWindowData.cxx
b/dbaccess/source/ui/querydesign/TableWindowData.cxx
index db85e36..c6a4fac 100644
--- a/dbaccess/source/ui/querydesign/TableWindowData.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowData.cxx
@@ -64,7 +64,7 @@ OTableWindowData::OTableWindowData( const Reference< XPropertySet>& _xTable
,m_bIsValid(true)
{
DBG_CTOR(OTableWindowData,NULL);
- if( !m_aWinName.getLength() )
+ if( m_aWinName.isEmpty() )
m_aWinName = m_aTableName;
listen();
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx
b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 53082cd..ddf8636 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -532,7 +532,7 @@ FeatureState OQueryController::GetState(sal_uInt16 _nId) const
aReturn.bChecked = m_bGraphicalDesign;
break;
case SID_BROWSER_CLEAR_QUERY:
- aReturn.bEnabled = isEditable() && (m_sStatement.getLength() || !m_vTableData.empty());
+ aReturn.bEnabled = isEditable() && (!m_sStatement.isEmpty() || !m_vTableData.empty());
break;
case SID_QUERY_VIEW_FUNCTIONS:
case SID_QUERY_VIEW_TABLES:
@@ -612,7 +612,7 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
{
::rtl::OUString aErrorMsg;
setStatement_fireEvent( getContainer()->getStatement() );
- if(!m_sStatement.getLength() && m_pSqlIterator)
+ if(m_sStatement.isEmpty() && m_pSqlIterator)
{
// change the view of the data
delete m_pSqlIterator->getParseTree();
@@ -856,9 +856,9 @@ void OQueryController::impl_initialize()
::rtl::OUString sCommand;
m_nCommandType = CommandType::QUERY;
- //
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
- // ° reading parameters
- //
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
+ //
�����������������������������������������������������������������������������������������������������������������
+ // � reading parameters
+ //
�����������������������������������������������������������������������������������������������������������������
// legacy parameters first (later overwritten by regular parameters)
::rtl::OUString sIndependentSQLCommand;
if ( rArguments.get_ensureType( "IndependentSQLCommand", sIndependentSQLCommand ) )
@@ -958,7 +958,7 @@ void OQueryController::impl_initialize()
bForceInitialDesign = true;
}
- //
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
+ //
�����������������������������������������������������������������������������������������������������������������
if ( !ensureConnected( sal_False ) )
{ // we have no connection so what else should we do
m_bGraphicalDesign = sal_False;
@@ -993,7 +993,7 @@ void OQueryController::impl_initialize()
}
// now if we are to edit an existing view, check whether this is possible
- if ( m_sName.getLength() )
+ if ( !m_sName.isEmpty() )
{
Any aView( xViews->getByName( m_sName ) );
// will throw if there is no such view
@@ -1040,8 +1040,8 @@ void OQueryController::impl_initialize()
ClearUndoManager();
if ( ( m_bGraphicalDesign )
- && ( ( !m_sName.getLength() && !editingCommand() )
- || ( !m_sStatement.getLength() && editingCommand() )
+ && ( ( m_sName.isEmpty() && !editingCommand() )
+ || ( m_sStatement.isEmpty() && editingCommand() )
)
)
{
@@ -1074,7 +1074,7 @@ void OQueryController::onLoadedMenu(const Reference<
::com::sun::star::frame::XL
::rtl::OUString OQueryController::getPrivateTitle( ) const
{
::rtl::OUString sName = m_sName;
- if ( !sName.getLength() )
+ if ( sName.isEmpty() )
{
if ( !editingCommand() )
{
@@ -1281,7 +1281,7 @@ void OQueryController::executeQuery()
::rtl::OUString sTranslatedStmt = translateStatement( false );
::rtl::OUString sDataSourceName = getDataSourceName();
- if ( sDataSourceName.getLength() && sTranslatedStmt.getLength() )
+ if ( !(sDataSourceName.isEmpty() || sTranslatedStmt.isEmpty()) )
{
try
{
@@ -1375,7 +1375,7 @@ sal_Bool OQueryController::askForNewName(const Reference<XNameAccess>&
_xElement
if(bNew)
{
String aDefaultName;
- if ( ( _bSaveAs && !bNew ) || ( bNew && m_sName.getLength() ) )
+ if ( ( _bSaveAs && !bNew ) || ( bNew && !m_sName.isEmpty() ) )
aDefaultName = String( m_sName );
else
{
@@ -1434,13 +1434,13 @@ bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs)
return true;
}
- if ( !sTranslatedStmt.getLength() )
+ if ( sTranslatedStmt.isEmpty() )
return false;
// first we need a name for our query so ask the user
// did we get a name
::rtl::OUString sOriginalName( m_sName );
- if ( !askForNewName( xElements, _bSaveAs ) || !m_sName.getLength() )
+ if ( !askForNewName( xElements, _bSaveAs ) || m_sName.isEmpty() )
return false;
SQLExceptionInfo aInfo;
@@ -1738,7 +1738,7 @@ static ::rtl::OUString concatComment( const ::rtl::OUString& rQuery, const
::std
// now set the properties
setStatement_fireEvent( getContainer()->getStatement(), _bFireStatementChange );
::rtl::OUString sTranslatedStmt;
- if(m_sStatement.getLength() && m_xComposer.is() && m_bEscapeProcessing)
+ if(!m_sStatement.isEmpty() && m_xComposer.is() && m_bEscapeProcessing)
{
try
{
@@ -1765,7 +1765,7 @@ static ::rtl::OUString concatComment( const ::rtl::OUString& rQuery, const
::std
sTranslatedStmt = ::rtl::OUString();
}
}
- else if(!m_sStatement.getLength())
+ else if(m_sStatement.isEmpty())
{
ModuleRes aModuleRes(STR_QRY_NOSELECT);
String sTmpStr(aModuleRes);
@@ -1814,7 +1814,7 @@ void OQueryController::impl_reset( const bool
i_bForceCurrentControllerSettings
// get command from the query if a query name was supplied
if ( !i_bForceCurrentControllerSettings && !editingCommand() )
{
- if ( m_sName.getLength() )
+ if ( !m_sName.isEmpty() )
{
Reference< XNameAccess > xQueries = getObjectContainer();
if ( xQueries.is() )
@@ -1870,7 +1870,7 @@ void OQueryController::impl_reset( const bool
i_bForceCurrentControllerSettings
}
}
- if ( m_sStatement.getLength() )
+ if ( !m_sStatement.isEmpty() )
{
setQueryComposer();
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
index cb66b1a..c312c59 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx
@@ -334,7 +334,7 @@ sal_Bool ORelationTableConnectionData::Update()
OConnectionLineDataVec::iterator aEnd = m_vConnLineData.end();
for(;aIter != aEnd;++aIter)
{
- if((*aIter)->GetSourceFieldName().getLength() &&
(*aIter)->GetDestFieldName().getLength())
+ if(!((*aIter)->GetSourceFieldName().isEmpty() ||
(*aIter)->GetDestFieldName().isEmpty()))
{
Reference<XPropertySet> xColumn;
xColumn = xColumnFactory->createDataDescriptor();
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx
b/dbaccess/source/ui/relationdesign/RelationController.cxx
index ca71bc3..61b63f9 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -334,7 +334,7 @@ namespace
sTable,
::dbtools::eInDataManipulation);
Any aCatalog;
- if ( sCatalog.getLength() )
+ if ( !sCatalog.isEmpty() )
aCatalog <<= sCatalog;
try
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index 6c5e8ec..7a46d96 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -308,7 +308,7 @@ bool ORelationTableView::RemoveConnection( OTableConnection* pConn ,sal_Bool /*_
void ORelationTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString&
rWinName, sal_Bool /*bNewTable*/)
{
DBG_CHKTHIS(ORelationTableView,NULL);
- OSL_ENSURE(_rComposedName.getLength(),"There must be a table name supplied!");
+ OSL_ENSURE(!_rComposedName.isEmpty(),"There must be a table name supplied!");
OJoinTableView::OTableWindowMap::iterator aIter = GetTabWinMap()->find(_rComposedName);
if(aIter != GetTabWinMap()->end())
diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
index 2880cad..294e494 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
@@ -240,7 +240,7 @@ void OFieldDescription::FillFromTypeInfo(const TOTypeInfoSP& _pType,sal_Bool _bF
SetScale(::std::min<sal_Int32>(GetScale() ? GetScale() :
DEFAULT_NUMERIC_SCALE,_pType->nMaximumScale));
}
}
- if ( !_pType->aCreateParams.getLength() )
+ if ( _pType->aCreateParams.isEmpty() )
{
SetPrecision(_pType->nPrecision);
SetScale(_pType->nMinimumScale);
@@ -663,7 +663,7 @@ void OFieldDescription::copyColumnSettingsTo(const Reference< XPropertySet >& _r
_rxColumn->setPropertyValue(PROPERTY_FORMATKEY,makeAny(GetFormatKey()));
if ( GetHorJustify() != SVX_HOR_JUSTIFY_STANDARD &&
xInfo->hasPropertyByName(PROPERTY_ALIGN) )
_rxColumn->setPropertyValue(PROPERTY_ALIGN,makeAny(dbaui::mapTextAllign(GetHorJustify())));
- if ( GetHelpText().getLength() && xInfo->hasPropertyByName(PROPERTY_HELPTEXT) )
+ if ( !GetHelpText().isEmpty() && xInfo->hasPropertyByName(PROPERTY_HELPTEXT) )
_rxColumn->setPropertyValue(PROPERTY_HELPTEXT,makeAny(GetHelpText()));
if ( GetControlDefault().hasValue() && xInfo->hasPropertyByName(PROPERTY_CONTROLDEFAULT) )
_rxColumn->setPropertyValue(PROPERTY_CONTROLDEFAULT,GetControlDefault());
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx
b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 1972071..13abd86 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -419,16 +419,16 @@ CellController* OTableEditorCtrl::GetController(long nRow, sal_uInt16
nColumnId)
case FIELD_NAME:
return new EditCellController( pNameCell );
case FIELD_TYPE:
- if (pActFieldDescr && (pActFieldDescr->GetName().getLength() != 0))
+ if (pActFieldDescr && !pActFieldDescr->GetName().isEmpty())
return new ListBoxCellController( pTypeCell );
else return NULL;
case HELP_TEXT:
- if (pActFieldDescr && (pActFieldDescr->GetName().getLength() != 0))
+ if (pActFieldDescr && !pActFieldDescr->GetName().isEmpty())
return new EditCellController( pHelpTextCell );
else
return NULL;
case COLUMN_DESCRIPTION:
- if (pActFieldDescr && (pActFieldDescr->GetName().getLength() != 0))
+ if (pActFieldDescr && !pActFieldDescr->GetName().isEmpty())
return new EditCellController( pDescrCell );
else
return NULL;
@@ -1704,7 +1704,7 @@ IMPL_LINK( OTableEditorCtrl, DelayedPaste, void*, /*EMPTYTAG*/ )
sal_Int32 nFreeFromPos; // ab da nur freie Zeilen
::std::vector< ::boost::shared_ptr<OTableRow> >::reverse_iterator aIter =
m_pRowList->rbegin();
for(nFreeFromPos = m_pRowList->size();
- aIter != m_pRowList->rend() && (!(*aIter) || !(*aIter)->GetActFieldDescr() ||
!(*aIter)->GetActFieldDescr()->GetName().getLength());
+ aIter != m_pRowList->rend() && (!(*aIter) || !(*aIter)->GetActFieldDescr() ||
(*aIter)->GetActFieldDescr()->GetName().isEmpty());
--nFreeFromPos, ++aIter)
;
if (nPastePosition < nFreeFromPos) // es gibt mindestens eine belegte hinter
PastePosition -> ganz nach hinten
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx
b/dbaccess/source/ui/tabledesign/TableController.cxx
index 7fa62d1..210e09d 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -328,7 +328,7 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs)
Reference<XNameAccess> xTables;
::rtl::OUString sCatalog, sSchema;
- sal_Bool bNew = (0 == m_sName.getLength());
+ sal_Bool bNew = m_sName.isEmpty();
bNew = bNew || m_bNew || _bSaveAs;
try
@@ -361,7 +361,7 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs)
}
// did we get a name
- if(!m_sName.getLength())
+ if(m_sName.isEmpty())
return sal_False;
}
catch(Exception&)
@@ -972,7 +972,7 @@ sal_Bool OTableController::checkColumns(sal_Bool _bNew) throw(::com::sun::star::
for(;aIter != aEnd;++aIter)
{
OFieldDescription* pFieldDesc = (*aIter)->GetActFieldDescr();
- if (pFieldDesc && pFieldDesc->GetName().getLength())
+ if (pFieldDesc && !pFieldDesc->GetName().isEmpty())
{
bFoundPKey |= (*aIter)->IsPrimaryKey();
// first check for duplicate names
@@ -1413,7 +1413,7 @@ void OTableController::assignTable()
{
::rtl::OUString sComposedName;
// get the table
- if(m_sName.getLength())
+ if(!m_sName.isEmpty())
{
Reference<XNameAccess> xNameAccess;
Reference<XTablesSupplier> xSup(getConnection(),UNO_QUERY);
@@ -1520,7 +1520,7 @@ void OTableController::reSyncRows()
for(sal_Int32 i=0;aIter != aEnd;++aIter)
{
OFieldDescription* pFieldDesc = (*aIter)->GetActFieldDescr();
- if (pFieldDesc && pFieldDesc->GetName().getLength() && bCase(sName,pFieldDesc->GetName()))
+ if (pFieldDesc && !pFieldDesc->GetName().isEmpty() && bCase(sName,pFieldDesc->GetName()))
{ // found a second name of _rName so we need another
sName = _rName + ::rtl::OUString::valueOf(++i);
aIter = m_vRowList.begin(); // and retry
@@ -1535,14 +1535,14 @@ void OTableController::reSyncRows()
try
{
// get the table
- if ( m_sName.getLength() && getConnection().is() )
+ if ( !m_sName.isEmpty() && getConnection().is() )
{
if ( m_xTable.is() )
sTitle = ::dbtools::composeTableName( getConnection()->getMetaData(), m_xTable,
::dbtools::eInDataManipulation, false, false, false );
else
sTitle = m_sName;
}
- if ( !sTitle.getLength() )
+ if ( sTitle.isEmpty() )
{
String aName = String(ModuleRes(STR_TBL_TITLE));
sTitle = aName.GetToken(0,' ');
@@ -1572,7 +1572,7 @@ sal_Int32 OTableController::getFirstEmptyRowPosition()
::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aEnd = m_vRowList.end();
for(;aIter != aEnd;++aIter)
{
- if ( !*aIter || !(*aIter)->GetActFieldDescr() ||
!(*aIter)->GetActFieldDescr()->GetName().getLength() )
+ if ( !*aIter || !(*aIter)->GetActFieldDescr() ||
(*aIter)->GetActFieldDescr()->GetName().isEmpty() )
{
nRet = aIter - m_vRowList.begin();
break;
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index e58110e..129721b 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -737,7 +737,7 @@ namespace
{
OSL_VERIFY( _rxDescriptor->getPropertyValue( _rPropertyName ) >>= sValue );
}
- return sValue.getLength() > 0;
+ return !sValue.isEmpty();
}
}
@@ -760,7 +760,7 @@ void CopyTableWizard::impl_checkForUnsupportedSettings_throw( const Reference< X
}
}
- if ( sUnsupportedSetting.getLength() != 0 )
+ if ( !sUnsupportedSetting.isEmpty() )
{
::rtl::OUString sMessage( String(ModuleRes( STR_CTW_ERROR_UNSUPPORTED_SETTING )) );
::comphelper::string::searchAndReplaceAsciiI( sMessage, "$name$", sUnsupportedSetting );
@@ -924,9 +924,9 @@ SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference<
// need a DatabaseContext for loading the data source
Reference< XNameAccess > xDatabaseContext( m_aContext.createComponent(
"com.sun.star.sdb.DatabaseContext" ), UNO_QUERY_THROW );
Reference< XDataSource > xDataSource;
- if ( sDataSource.getLength() )
+ if ( !sDataSource.isEmpty() )
xDataSource.set( xDatabaseContext->getByName( sDataSource ), UNO_QUERY_THROW );
- if ( !xDataSource.is() && sDatabaseLocation.getLength() )
+ if ( !xDataSource.is() && !sDatabaseLocation.isEmpty() )
xDataSource.set( xDatabaseContext->getByName( sDatabaseLocation ), UNO_QUERY_THROW );
if ( xDataSource.is() )
--
1.7.5.4
Context
- [Libreoffice] [PATCH] Fix for fdo43460 Part XII 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.