[Libreoffice-commits] .: 2 commits - dbaccess/source desktop/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Wed Dec 21 00:53:55 PST 2011
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
dbaccess/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
dbaccess/source/core/dataaccess/ComponentDefinition.cxx | 2
dbaccess/source/core/dataaccess/ContentHelper.cxx | 4
dbaccess/source/core/dataaccess/ModelImpl.cxx | 20 +-
dbaccess/source/core/dataaccess/bookmarkcontainer.cxx | 6
dbaccess/source/core/dataaccess/connection.cxx | 2
dbaccess/source/core/dataaccess/databasecontext.cxx | 12 -
dbaccess/source/core/dataaccess/databasedocument.cxx | 26 +--
dbaccess/source/core/dataaccess/databaseregistrations.cxx | 4
dbaccess/source/core/dataaccess/datasource.cxx | 22 +-
dbaccess/source/core/dataaccess/definitioncontainer.cxx | 4
dbaccess/source/core/dataaccess/documentcontainer.cxx | 16 +-
dbaccess/source/core/dataaccess/documentdefinition.cxx | 20 +-
dbaccess/source/core/dataaccess/documenteventexecutor.cxx | 2
dbaccess/source/core/dataaccess/documentevents.cxx | 8 -
dbaccess/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
dbaccess/source/core/recovery/subcomponentrecovery.cxx | 4
dbaccess/source/ext/adabas/Acomponentmodule.cxx | 2
dbaccess/source/ext/macromigration/docinteraction.cxx | 2
dbaccess/source/ext/macromigration/migrationengine.cxx | 14 -
dbaccess/source/ext/macromigration/migrationerror.hxx | 6
dbaccess/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
dbaccess/source/filter/xml/xmlConnectionResource.cxx | 2
dbaccess/source/filter/xml/xmlDataSource.cxx | 2
dbaccess/source/filter/xml/xmlDataSourceInfo.cxx | 2
dbaccess/source/filter/xml/xmlDataSourceSetting.cxx | 2
dbaccess/source/filter/xml/xmlDatabase.cxx | 6
dbaccess/source/filter/xml/xmlExport.cxx | 28 +--
dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx | 6
dbaccess/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
dbaccess/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
dbaccess/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 -
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 18 +-
dbaccess/source/ui/querydesign/TableConnectionData.cxx | 2
dbaccess/source/ui/querydesign/TableWindowData.cxx | 2
dbaccess/source/ui/querydesign/querycontroller.cxx | 36 ++--
dbaccess/source/ui/relationdesign/RTableConnectionData.cxx | 2
dbaccess/source/ui/relationdesign/RelationController.cxx | 2
dbaccess/source/ui/relationdesign/RelationTableView.cxx | 2
dbaccess/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 -
desktop/source/app/app.cxx | 32 ++--
desktop/source/app/appinit.cxx | 6
desktop/source/app/cmdlineargs.cxx | 4
desktop/source/app/dispatchwatcher.cxx | 10 -
desktop/source/app/langselect.cxx | 18 +-
desktop/source/app/officeipcthread.cxx | 16 +-
desktop/source/deployment/gui/dp_gui_dialog2.cxx | 4
desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 12 -
desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 2
desktop/source/deployment/gui/dp_gui_service.cxx | 2
desktop/source/deployment/gui/dp_gui_theextmgr.cxx | 6
desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 20 +-
desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx | 14 -
desktop/source/deployment/manager/dp_activepackages.cxx | 2
desktop/source/deployment/manager/dp_extensionmanager.cxx | 2
desktop/source/deployment/manager/dp_informationprovider.cxx | 10 -
desktop/source/deployment/manager/dp_manager.cxx | 28 +--
desktop/source/deployment/misc/dp_descriptioninfoset.cxx | 12 -
desktop/source/deployment/misc/dp_misc.cxx | 8 -
desktop/source/deployment/misc/dp_resource.cxx | 8 -
desktop/source/deployment/misc/dp_update.cxx | 10 -
desktop/source/deployment/registry/component/dp_component.cxx | 34 ++--
desktop/source/deployment/registry/configuration/dp_configuration.cxx | 12 -
desktop/source/deployment/registry/dp_backend.cxx | 4
desktop/source/deployment/registry/dp_backenddb.cxx | 4
desktop/source/deployment/registry/dp_registry.cxx | 15 -
desktop/source/deployment/registry/executable/dp_executable.cxx | 2
desktop/source/deployment/registry/help/dp_help.cxx | 4
desktop/source/deployment/registry/inc/dp_backend.h | 2
desktop/source/deployment/registry/package/dp_package.cxx | 37 ++--
desktop/source/deployment/registry/script/dp_lib_container.cxx | 2
desktop/source/deployment/registry/script/dp_script.cxx | 14 -
desktop/source/deployment/registry/sfwk/dp_sfwk.cxx | 8 -
desktop/source/migration/migration.cxx | 36 ++--
desktop/source/migration/services/jvmfwk.cxx | 4
desktop/source/migration/services/oo3extensionmigration.cxx | 4
desktop/source/pkgchk/unopkg/unopkg_app.cxx | 6
desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx | 2
desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 4
desktop/source/splash/splash.cxx | 20 +-
161 files changed, 655 insertions(+), 657 deletions(-)
New commits:
commit 545921f914ec172bcd6712cce54847131a49afb6
Author: Olivier Hallot <olivier.hallot at alta.org.br>
Date: Mon Dec 19 18:10:37 2011 -0200
Fix for fdo43460 Part XII getLength() to isEmpty()
Part XII
Module
dbaccess
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 at 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 at 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..5f6a40d 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() );
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list