summaryrefslogtreecommitdiff
path: root/ucb/source/core
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2012-01-18 23:47:02 -0200
committerOlivier Hallot <olivier.hallot@alta.org.br>2012-01-18 23:48:47 -0200
commit80fb2e397a60550de72b378215c2e305b29257a9 (patch)
treebefc5cc4cd89e129597247dd0e3d80a7fb8cc35f /ucb/source/core
parent3e04e08d371532960917afbcd59307fbd6c1f313 (diff)
Fix for fdo43460 Part L getLength() to isEmpty()
Part L Modules ucb
Diffstat (limited to 'ucb/source/core')
-rw-r--r--ucb/source/core/identify.cxx2
-rw-r--r--ucb/source/core/ucb.cxx2
-rw-r--r--ucb/source/core/ucbcmds.cxx14
-rw-r--r--ucb/source/core/ucbstore.cxx20
4 files changed, 19 insertions, 19 deletions
diff --git a/ucb/source/core/identify.cxx b/ucb/source/core/identify.cxx
index 27e9f99477a5..51402c8b2cd6 100644
--- a/ucb/source/core/identify.cxx
+++ b/ucb/source/core/identify.cxx
@@ -99,7 +99,7 @@ OUString SAL_CALL ContentIdentifier::getContentIdentifier()
OUString SAL_CALL ContentIdentifier::getContentProviderScheme()
throw( RuntimeException )
{
- if ( !m_aProviderScheme.getLength() && m_aContentId.getLength() )
+ if ( m_aProviderScheme.isEmpty() && !m_aContentId.isEmpty() )
{
// The content provider scheme is the part before the first ':'
// within the content id.
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index 3489890396da..cbe7b2ba7669 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -828,7 +828,7 @@ bool UniversalContentBroker::getContentProviderData(
const OUString & rKey2,
ContentProviderDataList & rListToFill )
{
- if ( !m_xSMgr.is() || !rKey1.getLength() || !rKey2.getLength() )
+ if ( !m_xSMgr.is() || rKey1.isEmpty() || rKey2.isEmpty() )
{
OSL_FAIL( "UniversalContentBroker::getContentProviderData - Invalid argument!" );
return false;
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index d667f7075ae7..e8eeb483daa5 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -342,7 +342,7 @@ rtl::OUString createDesiredName(
const rtl::OUString & rSourceURL, const rtl::OUString & rNewTitle )
{
rtl::OUString aName( rNewTitle );
- if ( aName.getLength() == 0 )
+ if ( aName.isEmpty() )
{
// calculate name using source URL
@@ -830,7 +830,7 @@ void transferProperties(
uno::Sequence< beans::PropertyValue > aPropValues(
aAllProps.getLength() + 2 );
- sal_Bool bHasTitle = ( rContext.aArg.NewTitle.getLength() == 0 );
+ sal_Bool bHasTitle = rContext.aArg.NewTitle.isEmpty();
sal_Bool bHasTargetURL = ( rContext.aArg.Operation
!= ucb::TransferCommandOperation_LINK );
@@ -887,7 +887,7 @@ void transferProperties(
}
// Title needed, but not set yet?
- if ( !bHasTitle && ( rContext.aArg.NewTitle.getLength() > 0 ) )
+ if ( !bHasTitle && !rContext.aArg.NewTitle.isEmpty() )
{
aPropValues[ nWritePos ].Name
= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title"));
@@ -1105,7 +1105,7 @@ void handleNameClashRename(
}
rtl::OUString aOldTitle = xRow->getString( 1 );
- if ( !aOldTitle.getLength() )
+ if ( aOldTitle.isEmpty() )
{
ucbhelper::cancelCommandExecution(
uno::makeAny( beans::UnknownPropertyException(
@@ -1274,7 +1274,7 @@ void globalTransfer_(
}
// TargetURL: property is optional.
- sal_Bool bSourceIsLink = ( xSourceProps->getString( 3 ).getLength() > 0 );
+ sal_Bool bSourceIsLink = !xSourceProps->getString( 3 ).isEmpty();
//////////////////////////////////////////////////////////////////////
//
@@ -2047,11 +2047,11 @@ void UniversalContentBroker::globalTransfer(
TransferCommandContext aTransferCtx(
m_xSMgr, this, xLocalEnv, xEnv, rArg );
- if ( rArg.NewTitle.getLength() == 0 )
+ if ( rArg.NewTitle.isEmpty() )
{
// BaseURI: property is optional.
rtl::OUString aBaseURI( xRow->getString( 4 ) );
- if ( aBaseURI.getLength() )
+ if ( !aBaseURI.isEmpty() )
{
aTransferCtx.aArg.NewTitle
= createDesiredName( aBaseURI, rtl::OUString() );
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 87a2489be6e8..38b498095507 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -399,7 +399,7 @@ Reference< XPersistentPropertySet > SAL_CALL
PropertySetRegistry::openPropertySet( const OUString& key, sal_Bool create )
throw( RuntimeException )
{
- if ( key.getLength() )
+ if ( !key.isEmpty() )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -529,7 +529,7 @@ PropertySetRegistry::openPropertySet( const OUString& key, sal_Bool create )
void SAL_CALL PropertySetRegistry::removePropertySet( const OUString& key )
throw( RuntimeException )
{
- if ( !key.getLength() )
+ if ( key.isEmpty() )
return;
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -681,7 +681,7 @@ void PropertySetRegistry::add( PersistentPropertySet* pSet )
{
OUString key( pSet->getKey() );
- if ( key.getLength() )
+ if ( !key.isEmpty() )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
m_pImpl->m_aPropSets[ key ] = pSet;
@@ -693,7 +693,7 @@ void PropertySetRegistry::remove( PersistentPropertySet* pSet )
{
OUString key( pSet->getKey() );
- if ( key.getLength() )
+ if ( !key.isEmpty() )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -1184,7 +1184,7 @@ Reference< XInterface > PropertySetRegistry::getConfigWriteAccess(
if ( m_pImpl->m_xRootWriteAccess.is() )
{
- if ( rPath.getLength() )
+ if ( !rPath.isEmpty() )
{
Reference< XHierarchicalNameAccess > xNA(
m_pImpl->m_xRootWriteAccess, UNO_QUERY );
@@ -1445,7 +1445,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValue(
WrappedTargetException,
RuntimeException )
{
- if ( !aPropertyName.getLength() )
+ if ( aPropertyName.isEmpty() )
throw UnknownPropertyException();
osl::ClearableGuard< osl::Mutex > aCGuard( m_pImpl->m_aMutex );
@@ -1551,7 +1551,7 @@ Any SAL_CALL PersistentPropertySet::getPropertyValue(
WrappedTargetException,
RuntimeException )
{
- if ( !PropertyName.getLength() )
+ if ( PropertyName.isEmpty() )
throw UnknownPropertyException();
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -1698,7 +1698,7 @@ void SAL_CALL PersistentPropertySet::addProperty(
IllegalArgumentException,
RuntimeException )
{
- if ( !Name.getLength() )
+ if ( Name.isEmpty() )
throw IllegalArgumentException();
// @@@ What other types can't be written to config server?
@@ -2359,10 +2359,10 @@ void PersistentPropertySet::notifyPropertySetInfoChange(
//=========================================================================
const OUString& PersistentPropertySet::getFullKey()
{
- if ( !m_pImpl->m_aFullKey.getLength() )
+ if ( m_pImpl->m_aFullKey.isEmpty() )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
- if ( !m_pImpl->m_aFullKey.getLength() )
+ if ( m_pImpl->m_aFullKey.isEmpty() )
{
m_pImpl->m_aFullKey
= makeHierarchalNameSegment( m_pImpl->m_aKey );