summaryrefslogtreecommitdiff
path: root/ucb
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
parent3e04e08d371532960917afbcd59307fbd6c1f313 (diff)
Fix for fdo43460 Part L getLength() to isEmpty()
Part L Modules ucb
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/cacher/cachedcontentresultset.cxx2
-rw-r--r--ucb/source/cacher/contentresultsetwrapper.cxx8
-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
-rw-r--r--ucb/source/inc/regexp.hxx2
-rw-r--r--ucb/source/regexp/regexp.cxx18
-rw-r--r--ucb/source/ucp/cmis/cmis_url.cxx2
-rw-r--r--ucb/source/ucp/ext/ucpext_content.cxx6
-rw-r--r--ucb/source/ucp/ext/ucpext_datasupplier.cxx8
-rw-r--r--ucb/source/ucp/ext/ucpext_provider.cxx6
-rw-r--r--ucb/source/ucp/file/bc.cxx12
-rw-r--r--ucb/source/ucp/file/shell.cxx2
-rw-r--r--ucb/source/ucp/ftp/ftpcontent.cxx2
-rw-r--r--ucb/source/ucp/ftp/ftpdirp.cxx8
-rw-r--r--ucb/source/ucp/ftp/ftpresultsetbase.cxx2
-rw-r--r--ucb/source/ucp/ftp/ftpurl.cxx10
-rw-r--r--ucb/source/ucp/gvfs/gvfs_content.cxx14
-rw-r--r--ucb/source/ucp/gvfs/gvfs_directory.cxx4
-rw-r--r--ucb/source/ucp/hierarchy/hierarchycontent.cxx16
-rw-r--r--ucb/source/ucp/hierarchy/hierarchydata.cxx10
-rw-r--r--ucb/source/ucp/hierarchy/hierarchydatasource.cxx2
-rw-r--r--ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx4
-rw-r--r--ucb/source/ucp/hierarchy/hierarchyuri.cxx2
-rw-r--r--ucb/source/ucp/inc/urihelper.hxx4
-rw-r--r--ucb/source/ucp/package/pkgcontent.cxx18
-rw-r--r--ucb/source/ucp/package/pkgdatasupplier.cxx8
-rw-r--r--ucb/source/ucp/package/pkgprovider.cxx2
-rw-r--r--ucb/source/ucp/package/pkguri.cxx4
-rw-r--r--ucb/source/ucp/tdoc/tdoc_content.cxx18
-rw-r--r--ucb/source/ucp/tdoc/tdoc_datasupplier.cxx8
-rw-r--r--ucb/source/ucp/tdoc/tdoc_docmgr.cxx6
-rw-r--r--ucb/source/ucp/tdoc/tdoc_provider.cxx4
-rw-r--r--ucb/source/ucp/tdoc/tdoc_storage.cxx2
-rw-r--r--ucb/source/ucp/tdoc/tdoc_uri.cxx2
-rw-r--r--ucb/source/ucp/tdoc/tdoc_uri.hxx2
-rw-r--r--ucb/source/ucp/webdav/ContentProperties.cxx2
-rw-r--r--ucb/source/ucp/webdav/DAVProperties.cxx2
-rw-r--r--ucb/source/ucp/webdav/DAVResourceAccess.cxx10
-rw-r--r--ucb/source/ucp/webdav/NeonPropFindRequest.cxx2
-rw-r--r--ucb/source/ucp/webdav/NeonSession.cxx12
-rw-r--r--ucb/source/ucp/webdav/NeonUri.cxx4
-rw-r--r--ucb/source/ucp/webdav/webdavcontent.cxx18
-rw-r--r--ucb/source/ucp/webdav/webdavdatasupplier.cxx4
45 files changed, 155 insertions, 155 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index 019e2ea59cec..4c66b382dbe0 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -558,7 +558,7 @@ Property SAL_CALL CCRS_PropertySetInfo
::getPropertyByName( const OUString& aName )
throw( UnknownPropertyException, RuntimeException )
{
- if ( !aName.getLength() )
+ if ( aName.isEmpty() )
throw UnknownPropertyException();
Property aProp;
diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx b/ucb/source/cacher/contentresultsetwrapper.cxx
index c720ef3ab068..d6cbbfc02377 100644
--- a/ucb/source/cacher/contentresultsetwrapper.cxx
+++ b/ucb/source/cacher/contentresultsetwrapper.cxx
@@ -585,7 +585,7 @@ void SAL_CALL ContentResultSetWrapper
throw UnknownPropertyException();
}
- if( aPropertyName.getLength() )
+ if( !aPropertyName.isEmpty() )
{
m_xPropertySetInfo->getPropertyByName( aPropertyName );
//throws UnknownPropertyException, if so
@@ -636,7 +636,7 @@ void SAL_CALL ContentResultSetWrapper
OSL_FAIL( "broadcaster was disposed already" );
throw UnknownPropertyException();
}
- if( rPropertyName.getLength() )
+ if( !rPropertyName.isEmpty() )
{
m_xPropertySetInfo->getPropertyByName( rPropertyName );
//throws UnknownPropertyException, if so
@@ -693,7 +693,7 @@ void SAL_CALL ContentResultSetWrapper
if( !pContainer )
{
- if( rPropertyName.getLength() )
+ if( !rPropertyName.isEmpty() )
{
if( !getPropertySetInfo().is() )
throw UnknownPropertyException();
@@ -752,7 +752,7 @@ void SAL_CALL ContentResultSetWrapper
if( !pContainer )
{
- if( rPropertyName.getLength() )
+ if( !rPropertyName.isEmpty() )
{
if( !getPropertySetInfo().is() )
throw UnknownPropertyException();
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 );
diff --git a/ucb/source/inc/regexp.hxx b/ucb/source/inc/regexp.hxx
index f115afa35c31..faed20e2de32 100644
--- a/ucb/source/inc/regexp.hxx
+++ b/ucb/source/inc/regexp.hxx
@@ -47,7 +47,7 @@ public:
inline bool operator ==(Regexp const & rOther) const;
inline bool isDefault() const
- { return m_eKind == KIND_PREFIX && m_aPrefix.getLength() == 0; }
+ { return m_eKind == KIND_PREFIX && m_aPrefix.isEmpty(); }
inline Kind getKind() const { return m_eKind; }
diff --git a/ucb/source/regexp/regexp.cxx b/ucb/source/regexp/regexp.cxx
index 87b88c95656a..69e5b7afaba7 100644
--- a/ucb/source/regexp/regexp.cxx
+++ b/ucb/source/regexp/regexp.cxx
@@ -60,8 +60,8 @@ inline Regexp::Regexp(Kind eTheKind, rtl::OUString const & rThePrefix,
m_bTranslation(bTheTranslation)
{
OSL_ASSERT(m_eKind == KIND_DOMAIN
- || (!m_bEmptyDomain && m_aInfix.getLength() == 0));
- OSL_ASSERT(m_bTranslation || m_aReversePrefix.getLength() == 0);
+ || (!m_bEmptyDomain && m_aInfix.isEmpty()));
+ OSL_ASSERT(m_bTranslation || m_aReversePrefix.isEmpty());
}
//============================================================================
@@ -233,12 +233,12 @@ rtl::OUString Regexp::getRegexp(bool bReverse) const
rtl::OUStringBuffer aBuffer;
if (bReverse)
{
- if (m_aReversePrefix.getLength() != 0)
+ if (!m_aReversePrefix.isEmpty())
appendStringLiteral(&aBuffer, m_aReversePrefix);
}
else
{
- if (m_aPrefix.getLength() != 0)
+ if (!m_aPrefix.isEmpty())
appendStringLiteral(&aBuffer, m_aPrefix);
}
switch (m_eKind)
@@ -255,7 +255,7 @@ rtl::OUString Regexp::getRegexp(bool bReverse) const
case KIND_DOMAIN:
aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("([^/?#]"));
aBuffer.append(sal_Unicode(m_bEmptyDomain ? '*' : '+'));
- if (m_aInfix.getLength() != 0)
+ if (!m_aInfix.isEmpty())
appendStringLiteral(&aBuffer, m_aInfix);
aBuffer.
appendAscii(RTL_CONSTASCII_STRINGPARAM("([/?#].*)?)"));
@@ -264,12 +264,12 @@ rtl::OUString Regexp::getRegexp(bool bReverse) const
aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("->"));
if (bReverse)
{
- if (m_aPrefix.getLength() != 0)
+ if (!m_aPrefix.isEmpty())
appendStringLiteral(&aBuffer, m_aPrefix);
}
else
{
- if (m_aReversePrefix.getLength() != 0)
+ if (!m_aReversePrefix.isEmpty())
appendStringLiteral(&aBuffer, m_aReversePrefix);
}
aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("\\1"));
@@ -280,7 +280,7 @@ rtl::OUString Regexp::getRegexp(bool bReverse) const
else
{
rtl::OUStringBuffer aBuffer;
- if (m_aPrefix.getLength() != 0)
+ if (!m_aPrefix.isEmpty())
appendStringLiteral(&aBuffer, m_aPrefix);
switch (m_eKind)
{
@@ -295,7 +295,7 @@ rtl::OUString Regexp::getRegexp(bool bReverse) const
case KIND_DOMAIN:
aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("[^/?#]"));
aBuffer.append(sal_Unicode(m_bEmptyDomain ? '*' : '+'));
- if (m_aInfix.getLength() != 0)
+ if (!m_aInfix.isEmpty())
appendStringLiteral(&aBuffer, m_aInfix);
aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("([/?#].*)?"));
break;
diff --git a/ucb/source/ucp/cmis/cmis_url.cxx b/ucb/source/ucp/cmis/cmis_url.cxx
index 2942d8c144e1..92a6f7e24435 100644
--- a/ucb/source/ucp/cmis/cmis_url.cxx
+++ b/ucb/source/ucp/cmis/cmis_url.cxx
@@ -49,7 +49,7 @@ namespace cmis
// Split the query into bits and locate the repo-id key
rtl::OUString query = url.GetParam( );
- while ( query.getLength() > 0 )
+ while ( !query.isEmpty() )
{
sal_Int32 nPos = query.indexOfAsciiL( "&", 1 );
rtl::OUString segment;
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index 45c35c5572dd..d9989edb1311 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -118,7 +118,7 @@ namespace ucb { namespace ucp { namespace ext
//--------------------------------------------------------------------------------------------------------------
::rtl::OUString lcl_compose( const ::rtl::OUString& i_rBaseURL, const ::rtl::OUString& i_rRelativeURL )
{
- ENSURE_OR_RETURN( i_rBaseURL.getLength(), "illegal base URL", i_rRelativeURL );
+ ENSURE_OR_RETURN( !i_rBaseURL.isEmpty(), "illegal base URL", i_rRelativeURL );
::rtl::OUStringBuffer aComposer( i_rBaseURL );
if ( i_rBaseURL.getStr()[ i_rBaseURL.getLength() - 1 ] != '/' )
@@ -368,7 +368,7 @@ namespace ucb { namespace ucp { namespace ext
sRelativeURL = sRelativeURL.copy( sSeparatedExtensionId.getLength() );
// cut the final slash (if any)
- ENSURE_OR_BREAK( sRelativeURL.getLength(), "illegal URL structure - ExtensionContent should have a level below the extension ID" );
+ ENSURE_OR_BREAK( !sRelativeURL.isEmpty(), "illegal URL structure - ExtensionContent should have a level below the extension ID" );
if ( sRelativeURL.getStr()[ sRelativeURL.getLength() - 1 ] == '/' )
sRelativeURL = sRelativeURL.copy( 0, sRelativeURL.getLength() - 1 );
@@ -470,7 +470,7 @@ namespace ucb { namespace ucp { namespace ext
aContext.getSingleton( "com.sun.star.deployment.PackageInformationProvider" ), UNO_QUERY_THROW );
const ::rtl::OUString sPackageLocation( xPackageInfo->getPackageLocation( m_sExtensionId ) );
- if ( m_sPathIntoExtension.getLength() == 0 )
+ if ( m_sPathIntoExtension.isEmpty() )
return sPackageLocation;
return lcl_compose( sPackageLocation, m_sPathIntoExtension );
}
diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
index ff4034581b9d..507d2676a637 100644
--- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx
+++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
@@ -120,7 +120,7 @@ namespace ucb { namespace ucp { namespace ext
{
::rtl::OUString lcl_compose( const ::rtl::OUString& i_rBaseURL, const ::rtl::OUString& i_rRelativeURL )
{
- ENSURE_OR_RETURN( i_rBaseURL.getLength(), "illegal base URL", i_rRelativeURL );
+ ENSURE_OR_RETURN( !i_rBaseURL.isEmpty(), "illegal base URL", i_rRelativeURL );
::rtl::OUStringBuffer aComposer( i_rBaseURL );
if ( i_rBaseURL.getStr()[ i_rBaseURL.getLength() - 1 ] != '/' )
@@ -216,7 +216,7 @@ namespace ucb { namespace ucp { namespace ext
if ( i_nIndex < m_pImpl->m_aResults.size() )
{
const ::rtl::OUString sId = m_pImpl->m_aResults[ i_nIndex ].sId;
- if ( sId.getLength() )
+ if ( !sId.isEmpty() )
return sId;
}
@@ -237,7 +237,7 @@ namespace ucb { namespace ucp { namespace ext
}
::rtl::OUString sId = queryContentIdentifierString( i_nIndex );
- if ( sId.getLength() )
+ if ( !sId.isEmpty() )
{
Reference< XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( sId );
m_pImpl->m_aResults[ i_nIndex ].xId = xId;
@@ -329,7 +329,7 @@ namespace ucb { namespace ucp { namespace ext
const ::rtl::OUString& rId( m_pImpl->m_aResults[ i_nIndex ].sId );
const ::rtl::OUString sRootURL( ContentProvider::getRootURL() );
::rtl::OUString sTitle = Content::decodeIdentifier( rId.copy( sRootURL.getLength() ) );
- if ( ( sTitle.getLength() > 0 ) && ( sTitle[ sTitle.getLength() - 1 ] == '/' ) )
+ if ( !sTitle.isEmpty() && ( sTitle[ sTitle.getLength() - 1 ] == '/' ) )
sTitle = sTitle.copy( 0, sTitle.getLength() - 1 );
xRow = Content::getArtificialNodePropertyValues( m_pImpl->m_xSMgr, getResultSet()->getProperties(), sTitle );
}
diff --git a/ucb/source/ucp/ext/ucpext_provider.cxx b/ucb/source/ucp/ext/ucpext_provider.cxx
index e5a110895072..746f37bd917a 100644
--- a/ucb/source/ucp/ext/ucpext_provider.cxx
+++ b/ucb/source/ucp/ext/ucpext_provider.cxx
@@ -127,7 +127,7 @@ namespace ucb { namespace ucp { namespace ext
{
void lcl_ensureAndTransfer( ::rtl::OUString& io_rIdentifierFragment, ::rtl::OUStringBuffer& o_rNormalization, const sal_Unicode i_nLeadingChar )
{
- if ( ( io_rIdentifierFragment.getLength() == 0 ) || ( io_rIdentifierFragment[0] != i_nLeadingChar ) )
+ if ( ( io_rIdentifierFragment.isEmpty() ) || ( io_rIdentifierFragment[0] != i_nLeadingChar ) )
throw IllegalIdentifierException();
io_rIdentifierFragment = io_rIdentifierFragment.copy( 1 );
o_rNormalization.append( i_nLeadingChar );
@@ -158,7 +158,7 @@ namespace ucb { namespace ucp { namespace ext
lcl_ensureAndTransfer( sRemaining, aComposer, '/' );
// the normalized form requires one additional /, but we also accept identifiers which don't have it
- if ( sRemaining.getLength() == 0 )
+ if ( sRemaining.isEmpty() )
{
// the root content is a special case, it requires ///
aComposer.appendAscii( "//" );
@@ -174,7 +174,7 @@ namespace ucb { namespace ucp { namespace ext
{
lcl_ensureAndTransfer( sRemaining, aComposer, '/' );
// by now, we moved "vnd.sun.star.extension://" from the URL to aComposer
- if ( sRemaining.getLength() == 0 )
+ if ( sRemaining.isEmpty() )
{
// again, it's the root content, but one / is missing
aComposer.append( sal_Unicode( '/' ) );
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index 313e73b35e0d..38271ac4d90b 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -645,7 +645,7 @@ BaseContent::createNewContent(
throw( RuntimeException )
{
// Check type.
- if ( !Info.Type.getLength() )
+ if ( Info.Type.isEmpty() )
return Reference< XContent >();
sal_Bool bFolder
@@ -899,7 +899,7 @@ BaseContent::setPropertyValues(
rtl::OUStringBuffer aBuf(
m_aUncPath.copy( 0, nLastSlash + 1 ) );
- if ( NewTitle.getLength() > 0 )
+ if ( !NewTitle.isEmpty() )
{
aBuf.append( NewTitle );
if ( bTrailingSlash )
@@ -914,7 +914,7 @@ BaseContent::setPropertyValues(
}
else
{
- if ( NewTitle.getLength() > 0 )
+ if ( !NewTitle.isEmpty() )
{
// Initial Title before "insert".
// m_aUncPath contains parent's URI.
@@ -952,7 +952,7 @@ BaseContent::setPropertyValues(
ret[i] <<= beans::IllegalTypeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() );
break;
}
- else if( ! NewTitle.getLength() )
+ else if( NewTitle.isEmpty() )
{
ret[i] <<= lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 );
break;
@@ -1113,7 +1113,7 @@ BaseContent::transfer( sal_Int32 nMyCommandIdentifier,
// Determine the new title !
rtl::OUString NewTitle;
- if( aTransferInfo.NewTitle.getLength() )
+ if( !aTransferInfo.NewTitle.isEmpty() )
NewTitle = rtl::Uri::encode( aTransferInfo.NewTitle,
rtl_UriCharClassPchar,
rtl_UriEncodeIgnoreEscapes,
@@ -1249,7 +1249,7 @@ void SAL_CALL BaseContent::insert( sal_Int32 nMyCommandIdentifier,
m_pMyShell->handleTask( nMyCommandIdentifier,aReq );
if( aRequestImpl->aborted() ||
- !aRequestImpl->newName().getLength() )
+ aRequestImpl->newName().isEmpty() )
// means aborting
break;
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx
index deb00e08a985..a54d4dd232bd 100644
--- a/ucb/source/ucp/file/shell.cxx
+++ b/ucb/source/ucp/file/shell.cxx
@@ -2090,7 +2090,7 @@ sal_Bool SAL_CALL shell::ensuredir( sal_Int32 CommandId,
{
rtl::OUString aPath;
- if ( rUnqPath.getLength() < 1 )
+ if ( rUnqPath.isEmpty() )
return sal_False;
if ( rUnqPath[ rUnqPath.getLength() - 1 ] == sal_Unicode( '/' ) )
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index 41d1c761f9c9..02da7ac7b859 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -898,7 +898,7 @@ Sequence<Any> FTPContent::setPropertyValues(
if(!(seqPropVal[i].Value >>= Title)) {
ret[i] <<= IllegalTypeException();
continue;
- } else if(!Title.getLength()) {
+ } else if(Title.isEmpty()) {
ret[i] <<= IllegalArgumentException();
continue;
}
diff --git a/ucb/source/ucp/ftp/ftpdirp.cxx b/ucb/source/ucp/ftp/ftpdirp.cxx
index b4dc4682d1d4..f611a3283c08 100644
--- a/ucb/source/ucp/ftp/ftpdirp.cxx
+++ b/ucb/source/ucp/ftp/ftpdirp.cxx
@@ -599,7 +599,7 @@ sal_Bool FTPDirectoryParser::parseVMS (
if (*p != '.' || p == pFileName || p - pFileName > 39)
{
- if (aFirstLineName.getLength())
+ if (!aFirstLineName.isEmpty())
continue;
else
return sal_False;
@@ -615,7 +615,7 @@ sal_Bool FTPDirectoryParser::parseVMS (
if (*p != ';' || p == pFileName || p - pFileName > 39)
{
- if (aFirstLineName.getLength())
+ if (!aFirstLineName.isEmpty())
continue;
else
return sal_False;
@@ -640,7 +640,7 @@ sal_Bool FTPDirectoryParser::parseVMS (
// Skip <version> part:
if (*p < '1' || *p > '9')
{
- if (aFirstLineName.getLength())
+ if (!aFirstLineName.isEmpty())
continue;
else
return sal_False;
@@ -660,7 +660,7 @@ sal_Bool FTPDirectoryParser::parseVMS (
{
if (!bLWS)
{
- if (aFirstLineName.getLength())
+ if (!aFirstLineName.isEmpty())
continue;
else
return sal_False;
diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.cxx b/ucb/source/ucp/ftp/ftpresultsetbase.cxx
index 63b449b7fbab..641701600399 100644
--- a/ucb/source/ucp/ftp/ftpresultsetbase.cxx
+++ b/ucb/source/ucp/ftp/ftpresultsetbase.cxx
@@ -414,7 +414,7 @@ ResultSetBase::queryContentIdentifier(
{
if(!m_aIdents[m_nRow].is()) {
rtl::OUString url = queryContentIdentifierString();
- if(url.getLength() )
+ if(!url.isEmpty() )
m_aIdents[m_nRow] =
uno::Reference< ucb::XContentIdentifier >(
new ::ucbhelper::ContentIdentifier(m_xMSF,url) );
diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx
index 8369d944be08..324d820ba42c 100644
--- a/ucb/source/ucp/ftp/ftpurl.cxx
+++ b/ucb/source/ucp/ftp/ftpurl.cxx
@@ -186,13 +186,13 @@ void FTPURL::parse(const rtl::OUString& url)
l = aExpr.indexOf(sal_Unicode(':'));
if(l != -1) {
aPassword = aExpr.copy(1+l);
- if(aPassword.getLength())
+ if(!aPassword.isEmpty())
m_bShowPassword = true;
}
if(l > 0)
// Overwritte only if the username is not empty.
m_aUsername = aExpr.copy(0,l);
- else if(aExpr.getLength())
+ else if(!aExpr.isEmpty())
m_aUsername = aExpr;
}
@@ -268,7 +268,7 @@ rtl::OUString FTPURL::ident(bool withslash,bool internal) const
aAccount);
if((m_bShowPassword || internal) &&
- aPassword.getLength() )
+ !aPassword.isEmpty() )
bff.append(sal_Unicode(':'))
.append(aPassword);
@@ -313,7 +313,7 @@ rtl::OUString FTPURL::parent(bool internal) const
aPassword,
aAccount);
- if((internal || m_bShowPassword) && aPassword.getLength())
+ if((internal || m_bShowPassword) && !aPassword.isEmpty())
bff.append(sal_Unicode(':'))
.append(aPassword);
@@ -339,7 +339,7 @@ rtl::OUString FTPURL::parent(bool internal) const
else
bff.append(sal_Unicode('/')).append(m_aPathSegmentVec[i]);
- if(!last.getLength())
+ if(last.isEmpty())
bff.appendAscii("..");
else if(last.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("..")))
bff.append(last).appendAscii("/..");
diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx
index 588a51a2c036..af5a698ac460 100644
--- a/ucb/source/ucp/gvfs/gvfs_content.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_content.cxx
@@ -806,7 +806,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) ) {
if ( rValue.Value >>= aNewTitle ) {
- if ( aNewTitle.getLength() <= 0 )
+ if ( aNewTitle.isEmpty() )
aRet[ n ] <<= lang::IllegalArgumentException
( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty title not allowed!")),
static_cast< cppu::OWeakObject * >( this ), -1 );
@@ -1592,18 +1592,18 @@ extern "C" {
{
aDomain = GnomeToOUString( in->domain );
eDomain = ucbhelper::SimpleAuthenticationRequest::ENTITY_MODIFY;
- if (!aDomain.getLength())
+ if (aDomain.isEmpty())
aDomain = GnomeToOUString( in->default_domain );
}
else // no underlying capability to display realm otherwise
eDomain = ucbhelper::SimpleAuthenticationRequest::ENTITY_NA;
aUserName = GnomeToOUString( in->username );
- if (!aUserName.getLength())
+ if (aUserName.isEmpty())
aUserName = GnomeToOUString( in->default_user );
eUserName = (in->flags & GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_NEED_USERNAME) ?
ucbhelper::SimpleAuthenticationRequest::ENTITY_MODIFY :
- (aUserName.getLength() ?
+ (!aUserName.isEmpty() ?
ucbhelper::SimpleAuthenticationRequest::ENTITY_FIXED :
ucbhelper::SimpleAuthenticationRequest::ENTITY_NA);
@@ -1646,13 +1646,13 @@ extern "C" {
::rtl::OUString aNewDomain, aNewUserName, aNewPassword;
aNewUserName = xSupp->getUserName();
- if ( aNewUserName.getLength() )
+ if ( !aNewUserName.isEmpty() )
aUserName = aNewUserName;
aNewDomain = xSupp->getRealm();
- if ( aNewDomain.getLength() )
+ if ( !aNewDomain.isEmpty() )
aDomain = aNewDomain;
aNewPassword = xSupp->getPassword();
- if ( aNewPassword.getLength() )
+ if ( !aNewPassword.isEmpty() )
aPassword = aNewPassword;
{
diff --git a/ucb/source/ucp/gvfs/gvfs_directory.cxx b/ucb/source/ucp/gvfs/gvfs_directory.cxx
index b7831a85bdfe..7d8976ba34b9 100644
--- a/ucb/source/ucp/gvfs/gvfs_directory.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_directory.cxx
@@ -162,7 +162,7 @@ rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
if ( nIndex < m_pImpl->m_aResults.size() ) {
rtl::OUString aId = m_pImpl->m_aResults[ nIndex ]->aId;
- if ( aId.getLength() ) // cached
+ if ( !aId.isEmpty() ) // cached
return aId;
}
@@ -200,7 +200,7 @@ DataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
}
rtl::OUString aId = queryContentIdentifierString( nIndex );
- if ( aId.getLength() ) {
+ if ( !aId.isEmpty() ) {
uno::Reference< ucb::XContentIdentifier > xId
= new ::ucbhelper::ContentIdentifier( aId );
m_pImpl->m_aResults[ nIndex ]->xId = xId;
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index b37c76c6c639..81ac70b94f3c 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
@@ -111,7 +111,7 @@ HierarchyContent* HierarchyContent::create(
const uno::Reference< ucb::XContentIdentifier >& Identifier,
const ucb::ContentInfo& Info )
{
- if ( !Info.Type.getLength() )
+ if ( Info.Type.isEmpty() )
return 0;
if ( !Info.Type.equalsAsciiL(
@@ -635,7 +635,7 @@ HierarchyContent::createNewContent( const ucb::ContentInfo& Info )
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
- if ( !Info.Type.getLength() )
+ if ( Info.Type.isEmpty() )
return uno::Reference< ucb::XContent >();
sal_Bool bCreateFolder =
@@ -649,7 +649,7 @@ HierarchyContent::createNewContent( const ucb::ContentInfo& Info )
rtl::OUString aURL = m_xIdentifier->getContentIdentifier();
- OSL_ENSURE( aURL.getLength() > 0,
+ OSL_ENSURE( !aURL.isEmpty(),
"HierarchyContent::createNewContent - empty identifier!" );
if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() )
@@ -1214,7 +1214,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
if ( rValue.Value >>= aNewValue )
{
// No empty titles!
- if ( aNewValue.getLength() > 0 )
+ if ( !aNewValue.isEmpty() )
{
if ( aNewValue != m_aProps.getTitle() )
{
@@ -1275,7 +1275,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
if ( rValue.Value >>= aNewValue )
{
// No empty target URL's!
- if ( aNewValue.getLength() > 0 )
+ if ( !aNewValue.isEmpty() )
{
if ( aNewValue != m_aProps.getTargetURL() )
{
@@ -1406,7 +1406,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
}
}
- if ( aOldTitle.getLength() )
+ if ( !aOldTitle.isEmpty() )
{
aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title"));
aEvent.OldValue = uno::makeAny( aOldTitle );
@@ -1473,7 +1473,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve,
}
// Check, if all required properties were set.
- if ( m_aProps.getTitle().getLength() == 0 )
+ if ( m_aProps.getTitle().isEmpty() )
{
uno::Sequence< rtl::OUString > aProps( 1 );
aProps[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title"));
@@ -1812,7 +1812,7 @@ void HierarchyContent::transfer(
if ( nCount )
{
- sal_Bool bHadTitle = ( rInfo.NewTitle.getLength() == 0 );
+ sal_Bool bHadTitle = rInfo.NewTitle.isEmpty();
// Get all source values.
uno::Reference< sdbc::XRow > xRow
diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx
index e58281ba3077..164cde310045 100644
--- a/ucb/source/ucp/hierarchy/hierarchydata.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx
@@ -217,7 +217,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData )
// installation, the path to the office installtion directory must
// never be stored directly. A placeholder is used instead. Replace
// it by actual installation directory.
- if ( m_xOfficeInstDirs.is() && ( aValue.getLength() > 0 ) )
+ if ( m_xOfficeInstDirs.is() && !aValue.isEmpty() )
aValue = m_xOfficeInstDirs->makeAbsoluteURL( aValue );
rData.setTargetURL( aValue );
@@ -434,7 +434,7 @@ sal_Bool HierarchyEntry::setData(
// directory must never be stored directly. Use a
// placeholder instead.
rtl::OUString aValue( rData.getTargetURL() );
- if ( m_xOfficeInstDirs.is() && ( aValue.getLength() > 0 ) )
+ if ( m_xOfficeInstDirs.is() && !aValue.isEmpty() )
aValue
= m_xOfficeInstDirs->makeRelocatableURL( aValue );
@@ -755,7 +755,7 @@ sal_Bool HierarchyEntry::move(
// directory must never be stored directly. Use a placeholder
// instead.
rtl::OUString aValue( rData.getTargetURL() );
- if ( m_xOfficeInstDirs.is() && ( aValue.getLength() > 0 ) )
+ if ( m_xOfficeInstDirs.is() && !aValue.isEmpty() )
aValue = m_xOfficeInstDirs->makeRelocatableURL( aValue );
xNewNameReplace->replaceByName(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")),
@@ -936,7 +936,7 @@ sal_Bool HierarchyEntry::first( iterator& it )
{
uno::Reference< container::XNameAccess > xNameAccess;
- if ( m_aPath.getLength() > 0 )
+ if ( !m_aPath.isEmpty() )
{
rtl::OUString aPath = m_aPath;
aPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Children"));
@@ -1162,7 +1162,7 @@ const HierarchyEntryData& HierarchyEntry::iterator::operator*() const
// installation, the path to the office installtion directory must
// never be stored directly. A placeholder is used instead. Replace
// it by actual installation directory.
- if ( m_pImpl->officeDirs.is() && ( aValue.getLength() > 0 ) )
+ if ( m_pImpl->officeDirs.is() && !aValue.isEmpty() )
aValue = m_pImpl->officeDirs->makeAbsoluteURL( aValue );
m_pImpl->entry.setTargetURL( aValue );
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
index 5608cd53d176..b1a0354c6ea4 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
@@ -576,7 +576,7 @@ HierarchyDataSource::getConfigProvider()
bool HierarchyDataSource::createConfigPath(
const rtl::OUString & rInPath, rtl::OUString & rOutPath )
{
- if ( rInPath.getLength() )
+ if ( !rInPath.isEmpty() )
{
if ( rInPath.indexOf( '/' ) == 0 )
{
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx
index 14eaa59550fa..b17433f80230 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx
@@ -148,7 +148,7 @@ rtl::OUString HierarchyResultSetDataSupplier::queryContentIdentifierString(
if ( 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;
@@ -190,7 +190,7 @@ HierarchyResultSetDataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
}
rtl::OUString aId = queryContentIdentifierString( nIndex );
- if ( aId.getLength() )
+ if ( !aId.isEmpty() )
{
uno::Reference< ucb::XContentIdentifier > xId
= new ::ucbhelper::ContentIdentifier( aId );
diff --git a/ucb/source/ucp/hierarchy/hierarchyuri.cxx b/ucb/source/ucp/hierarchy/hierarchyuri.cxx
index 4e3b1ec1776d..83b74babf48b 100644
--- a/ucb/source/ucp/hierarchy/hierarchyuri.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchyuri.cxx
@@ -56,7 +56,7 @@ using namespace hierarchy_ucp;
void HierarchyUri::init() const
{
// Already inited?
- if ( m_aUri.getLength() && !m_aPath.getLength() )
+ if ( !m_aUri.isEmpty() && m_aPath.isEmpty() )
{
// Note: Maybe it's a re-init, setUri only resets m_aPath!
m_aService = m_aParentUri = m_aName = rtl::OUString();
diff --git a/ucb/source/ucp/inc/urihelper.hxx b/ucb/source/ucp/inc/urihelper.hxx
index 5e86ccab97ea..ea317b90a44c 100644
--- a/ucb/source/ucp/inc/urihelper.hxx
+++ b/ucb/source/ucp/inc/urihelper.hxx
@@ -104,13 +104,13 @@ namespace ucb_impl { namespace urihelper {
}
while ( nIndex >= 0 );
- if ( aParams.getLength() > 0 )
+ if ( !aParams.isEmpty() )
{
aResult.append( sal_Unicode( '?' ) );
aResult.append( aParams );
}
- if ( aFragment.getLength() > 0 )
+ if ( !aFragment.isEmpty() )
{
aResult.append( sal_Unicode( '#' ) );
aResult.append( aFragment );
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx
index 75680eefd7dd..1d323c062e0d 100644
--- a/ucb/source/ucp/package/pkgcontent.cxx
+++ b/ucb/source/ucp/package/pkgcontent.cxx
@@ -219,7 +219,7 @@ Content* Content::create(
const uno::Reference< ucb::XContentIdentifier >& Identifier,
const ucb::ContentInfo& Info )
{
- if ( !Info.Type.getLength() )
+ if ( Info.Type.isEmpty() )
return 0;
PackageUri aURI( Identifier->getContentIdentifier() );
@@ -762,7 +762,7 @@ Content::createNewContent( const ucb::ContentInfo& Info )
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
- if ( !Info.Type.getLength() )
+ if ( Info.Type.isEmpty() )
return uno::Reference< ucb::XContent >();
if ( !Info.Type.equalsIgnoreAsciiCase(
@@ -1178,7 +1178,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
if ( rValue.Value >>= aNewValue )
{
// No empty titles!
- if ( aNewValue.getLength() > 0 )
+ if ( !aNewValue.isEmpty() )
{
if ( aNewValue != m_aProps.aTitle )
{
@@ -1464,7 +1464,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
}
}
- if ( aNewTitle.getLength() )
+ if ( !aNewTitle.isEmpty() )
{
aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title"));
aEvent.OldValue = uno::makeAny( m_aProps.aTitle );
@@ -1678,7 +1678,7 @@ void Content::insert(
{
// Required: Title
- if ( !m_aProps.aTitle.getLength() )
+ if ( m_aProps.aTitle.isEmpty() )
m_aProps.aTitle = m_aUri.getName();
}
else
@@ -1697,7 +1697,7 @@ void Content::insert(
// Required: Title
- if ( !m_aProps.aTitle.getLength() )
+ if ( m_aProps.aTitle.isEmpty() )
m_aProps.aTitle = m_aUri.getName();
}
@@ -1893,7 +1893,7 @@ void Content::transfer(
}
// Is source a package content?
- if ( ( rInfo.SourceURL.getLength() == 0 ) ||
+ if ( ( rInfo.SourceURL.isEmpty() ) ||
( rInfo.SourceURL.compareTo(
m_aUri.getUri(), PACKAGE_URL_SCHEME_LENGTH + 3 ) != 0 ) )
{
@@ -2016,7 +2016,7 @@ void Content::transfer(
if ( nCount )
{
- sal_Bool bHadTitle = ( rInfo.NewTitle.getLength() == 0 );
+ sal_Bool bHadTitle = rInfo.NewTitle.isEmpty();
// Get all source values.
uno::Reference< sdbc::XRow > xRow
@@ -2105,7 +2105,7 @@ void Content::transfer(
rtl::OUString aName = xNamed->getName();
- if ( !aName.getLength() )
+ if ( aName.isEmpty() )
{
OSL_FAIL( "Content::transfer - Empty name!" );
break;
diff --git a/ucb/source/ucp/package/pkgdatasupplier.cxx b/ucb/source/ucp/package/pkgdatasupplier.cxx
index 2a3474001563..500c14cf6058 100644
--- a/ucb/source/ucp/package/pkgdatasupplier.cxx
+++ b/ucb/source/ucp/package/pkgdatasupplier.cxx
@@ -150,7 +150,7 @@ rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
if ( nIndex < m_pImpl->m_aResults.size() )
{
rtl::OUString aId = m_pImpl->m_aResults[ nIndex ]->aURL;
- if ( aId.getLength() )
+ if ( !aId.isEmpty() )
{
// Already cached.
return aId;
@@ -184,7 +184,7 @@ DataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
}
rtl::OUString aId = queryContentIdentifierString( nIndex );
- if ( aId.getLength() )
+ if ( !aId.isEmpty() )
{
uno::Reference< ucb::XContentIdentifier > xId
= new ::ucbhelper::ContentIdentifier( aId );
@@ -269,7 +269,7 @@ sal_Bool DataSupplier::getResult( sal_uInt32 nIndex )
rtl::OUString aName = xNamed->getName();
- if ( !aName.getLength() )
+ if ( aName.isEmpty() )
{
OSL_FAIL( "DataSupplier::getResult - Empty name!" );
break;
@@ -347,7 +347,7 @@ sal_uInt32 DataSupplier::totalCount()
rtl::OUString aName = xNamed->getName();
- if ( !aName.getLength() )
+ if ( aName.isEmpty() )
{
OSL_FAIL( "DataSupplier::getResult - Empty name!" );
break;
diff --git a/ucb/source/ucp/package/pkgprovider.cxx b/ucb/source/ucp/package/pkgprovider.cxx
index dfe2b9aa2e69..fbaa9fdddb52 100644
--- a/ucb/source/ucp/package/pkgprovider.cxx
+++ b/ucb/source/ucp/package/pkgprovider.cxx
@@ -247,7 +247,7 @@ ContentProvider::createPackage( const rtl::OUString & rName, const rtl::OUString
{
osl::MutexGuard aGuard( m_aMutex );
- if ( !rName.getLength() )
+ if ( rName.isEmpty() )
{
OSL_FAIL( "ContentProvider::createPackage - Invalid URL!" );
return uno::Reference< container::XHierarchicalNameAccess >();
diff --git a/ucb/source/ucp/package/pkguri.cxx b/ucb/source/ucp/package/pkguri.cxx
index d5f2f6001b3b..3f69681ee5ff 100644
--- a/ucb/source/ucp/package/pkguri.cxx
+++ b/ucb/source/ucp/package/pkguri.cxx
@@ -76,7 +76,7 @@ static void normalize( OUString& rURL )
void PackageUri::init() const
{
// Already inited?
- if ( m_aUri.getLength() && !m_aPath.getLength() )
+ if ( !m_aUri.isEmpty() && m_aPath.isEmpty() )
{
// Note: Maybe it's a re-init, setUri only resets m_aPath!
m_aPackage = m_aParentUri = m_aName = m_aParam = m_aScheme
@@ -128,7 +128,7 @@ void PackageUri::init() const
RTL_CONSTASCII_STRINGPARAM( PACKAGE_ZIP_URL_SCHEME ) ) )
{
m_aParam +=
- ( m_aParam.getLength()
+ ( !m_aParam.isEmpty()
? ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "&purezip" ) )
: ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "?purezip" ) ) );
}
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index 19400a6e7ce9..a8634a6d1f87 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -132,7 +132,7 @@ Content* Content::create(
const uno::Reference< ucb::XContentIdentifier >& Identifier,
const ucb::ContentInfo& Info )
{
- if ( !Info.Type.getLength() )
+ if ( Info.Type.isEmpty() )
return 0;
if ( !Info.Type.equalsAsciiL(
@@ -739,7 +739,7 @@ Content::createNewContent( const ucb::ContentInfo& Info )
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
- if ( !Info.Type.getLength() )
+ if ( Info.Type.isEmpty() )
return uno::Reference< ucb::XContent >();
sal_Bool bCreateFolder =
@@ -765,7 +765,7 @@ Content::createNewContent( const ucb::ContentInfo& Info )
rtl::OUString aURL = m_xIdentifier->getContentIdentifier();
- OSL_ENSURE( aURL.getLength() > 0,
+ OSL_ENSURE( !aURL.isEmpty(),
"Content::createNewContent - empty identifier!" );
if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() )
@@ -1275,7 +1275,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
if ( rValue.Value >>= aNewValue )
{
// No empty titles!
- if ( aNewValue.getLength() > 0 )
+ if ( !aNewValue.isEmpty() )
{
if ( aNewValue != m_aProps.getTitle() )
{
@@ -1439,7 +1439,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
}
}
- if ( aOldTitle.getLength() )
+ if ( !aOldTitle.isEmpty() )
{
aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title"));
aEvent.OldValue = uno::makeAny( aOldTitle );
@@ -1708,7 +1708,7 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData,
{
// Required: Title
- if ( m_aProps.getTitle().getLength() == 0 )
+ if ( m_aProps.getTitle().isEmpty() )
m_aProps.setTitle( aUri.getDecodedName() );
}
else // stream
@@ -1727,7 +1727,7 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData,
// Required: Title
- if ( m_aProps.getTitle().getLength() == 0 )
+ if ( m_aProps.getTitle().isEmpty() )
m_aProps.setTitle( aUri.getDecodedName() );
}
@@ -2169,7 +2169,7 @@ void Content::transfer(
// Copy data.
/////////////////////////////////////////////////////////////////////////
- rtl::OUString aNewName( rInfo.NewTitle.getLength() > 0
+ rtl::OUString aNewName( !rInfo.NewTitle.isEmpty()
? rInfo.NewTitle
: aSourceUri.getDecodedName() );
@@ -2201,7 +2201,7 @@ void Content::transfer(
if ( ( aTargetUri.lastIndexOf( '/' ) + 1 ) != aTargetUri.getLength() )
aTargetUri += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- if ( rInfo.NewTitle.getLength() > 0 )
+ if ( !rInfo.NewTitle.isEmpty() )
aTargetUri += ::ucb_impl::urihelper::encodeSegment( rInfo.NewTitle );
else
aTargetUri += aSourceUri.getName();
diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx
index 8e545b9f1750..87dc380412af 100644
--- a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx
@@ -149,7 +149,7 @@ ResultSetDataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
if ( nIndex < m_pImpl->m_aResults.size() )
{
rtl::OUString aId = m_pImpl->m_aResults[ nIndex ]->aURL;
- if ( aId.getLength() )
+ if ( !aId.isEmpty() )
{
// Already cached.
return aId;
@@ -183,7 +183,7 @@ ResultSetDataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
}
rtl::OUString aId = queryContentIdentifierString( nIndex );
- if ( aId.getLength() )
+ if ( !aId.isEmpty() )
{
uno::Reference< ucb::XContentIdentifier > xId
= new ::ucbhelper::ContentIdentifier( aId );
@@ -262,7 +262,7 @@ sal_Bool ResultSetDataSupplier::getResult( sal_uInt32 nIndex )
const rtl::OUString & rName
= m_pImpl->m_pNamesOfChildren->getConstArray()[ n ];
- if ( !rName.getLength() )
+ if ( rName.isEmpty() )
{
OSL_FAIL( "ResultDataSupplier::getResult - Empty name!" );
break;
@@ -322,7 +322,7 @@ sal_uInt32 ResultSetDataSupplier::totalCount()
const rtl::OUString & rName
= m_pImpl->m_pNamesOfChildren->getConstArray()[ n ];
- if ( !rName.getLength() )
+ if ( rName.isEmpty() )
{
OSL_FAIL( "ResultDataSupplier::getResult - Empty name!" );
break;
diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
index 78dd66fd2bfd..e9f064e26519 100644
--- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
@@ -170,7 +170,7 @@ getDocumentId( const uno::Reference< uno::XInterface > & xDoc )
}
}
- if ( aId.getLength() == 0 )
+ if ( aId.isEmpty() )
{
// fallback: generate UID from document's this pointer.
// normalize the interface pointer first. Else, calls with different
@@ -181,7 +181,7 @@ getDocumentId( const uno::Reference< uno::XInterface > & xDoc )
aId = rtl::OUString::valueOf( nId );
}
- OSL_ENSURE( aId.getLength() > 0, "getDocumentId - Empty id!" );
+ OSL_ENSURE( !aId.isEmpty(), "getDocumentId - Empty id!" );
return aId;
}
@@ -741,7 +741,7 @@ bool OfficeDocumentsManager::isBasicIDE(
OSL_FAIL( "Caught UnknownModuleException!" );
}
- if ( aModule.getLength() > 0 )
+ if ( !aModule.isEmpty() )
{
// Filter unwanted items, that are no real documents.
if ( aModule.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
diff --git a/ucb/source/ucp/tdoc/tdoc_provider.cxx b/ucb/source/ucp/tdoc/tdoc_provider.cxx
index 9b983d5111e3..be5a4f1920fb 100644
--- a/ucb/source/ucp/tdoc/tdoc_provider.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_provider.cxx
@@ -172,7 +172,7 @@ ContentProvider::createDocumentContent(
if ( m_xDocsMgr.is() )
{
rtl::OUString aDocId = m_xDocsMgr->queryDocumentId( Model );
- if ( aDocId.getLength() > 0 )
+ if ( !aDocId.isEmpty() )
{
rtl::OUStringBuffer aBuffer;
aBuffer.appendAscii( TDOC_URL_SCHEME ":/" );
@@ -603,7 +603,7 @@ ContentProvider::queryStorageTitle( const rtl::OUString & rUri ) const
aTitle = aUri.getDecodedName();
}
- OSL_ENSURE( ( aTitle.getLength() > 0 ) || aUri.isRoot(),
+ OSL_ENSURE( !aTitle.isEmpty() || aUri.isRoot(),
"ContentProvider::queryStorageTitle - empty title!" );
return aTitle;
}
diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx
index 8d1f1f71ab95..a395bf548008 100644
--- a/ucb/source/ucp/tdoc/tdoc_storage.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx
@@ -648,7 +648,7 @@ StorageElementFactory::queryStream(
// No object re-usage mechanism; streams are seekable => not stateless.
uno::Reference< io::XStream > xStream;
- if ( rPassword.getLength() > 0 )
+ if ( !rPassword.isEmpty() )
{
if ( eMode == READ )
{
diff --git a/ucb/source/ucp/tdoc/tdoc_uri.cxx b/ucb/source/ucp/tdoc/tdoc_uri.cxx
index cf7097cee42d..5da084d9de41 100644
--- a/ucb/source/ucp/tdoc/tdoc_uri.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_uri.cxx
@@ -120,7 +120,7 @@ void Uri::init() const
m_aDocId = m_aPath.copy( 1, nSlash - 1 );
}
- if ( m_aDocId.getLength() > 0 )
+ if ( !m_aDocId.isEmpty() )
{
sal_Int32 nSlash = m_aPath.indexOf( '/', 1 );
if ( nSlash != - 1 )
diff --git a/ucb/source/ucp/tdoc/tdoc_uri.hxx b/ucb/source/ucp/tdoc/tdoc_uri.hxx
index 363fb2746127..7bd8aa595170 100644
--- a/ucb/source/ucp/tdoc/tdoc_uri.hxx
+++ b/ucb/source/ucp/tdoc/tdoc_uri.hxx
@@ -117,7 +117,7 @@ inline sal_Bool Uri::isRoot() const
inline sal_Bool Uri::isDocument() const
{
init();
- return ( ( m_aDocId.getLength() > 0 ) /* not root */
+ return ( ( !m_aDocId.isEmpty() ) /* not root */
&& ( m_aPath.copy( m_aDocId.getLength() + 1 ).getLength() < 2 ) );
}
diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx
index b2822819ba7c..21c59b306c06 100644
--- a/ucb/source/ucp/webdav/ContentProperties.cxx
+++ b/ucb/source/ucp/webdav/ContentProperties.cxx
@@ -94,7 +94,7 @@ ContentProperties::ContentProperties( const DAVResource& rResource )
: m_xProps( new PropertyValueMap ),
m_bTrailingSlash( false )
{
- OSL_ENSURE( rResource.uri.getLength(),
+ OSL_ENSURE( !rResource.uri.isEmpty(),
"ContentProperties ctor - Empty resource URI!" );
// Title
diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx
index 42e326391ff2..40c6638c81bf 100644
--- a/ucb/source/ucp/webdav/DAVProperties.cxx
+++ b/ucb/source/ucp/webdav/DAVProperties.cxx
@@ -120,7 +120,7 @@ void DAVProperties::createUCBPropName( const char * nspace,
rtl::OUString aName
= rtl::OStringToOUString( name, RTL_TEXTENCODING_UTF8 );
- if ( !aNameSpace.getLength() )
+ if ( aNameSpace.isEmpty() )
{
// Some servers send XML without proper namespaces. Assume "DAV:"
// in this case, if name is a well-known dav property name.
diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
index ce76e198d1b3..4f9d4c6531a8 100644
--- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
@@ -67,10 +67,10 @@ int DAVAuthListener_Impl::authenticate(
{
// #102871# - Supply username and password from previous try.
// Password container service depends on this!
- if ( inoutUserName.getLength() == 0 )
+ if ( inoutUserName.isEmpty() )
inoutUserName = m_aPrevUsername;
- if ( outPassWord.getLength() == 0 )
+ if ( outPassWord.isEmpty() )
outPassWord = m_aPrevPassword;
rtl::Reference< ucbhelper::SimpleAuthenticationRequest > xRequest
@@ -1067,17 +1067,17 @@ void DAVResourceAccess::initialize()
throw ( DAVException )
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
- if ( m_aPath.getLength() == 0 )
+ if ( m_aPath.isEmpty() )
{
NeonUri aURI( m_aURL );
rtl::OUString aPath( aURI.GetPath() );
/* #134089# - Check URI */
- if ( !aPath.getLength() )
+ if ( aPath.isEmpty() )
throw DAVException( DAVException::DAV_INVALID_ARG );
/* #134089# - Check URI */
- if ( !aURI.GetHost().getLength() )
+ if ( aURI.GetHost().isEmpty() )
throw DAVException( DAVException::DAV_INVALID_ARG );
if ( !m_xSession.is() || !m_xSession->CanUse( m_aURL, m_aFlags ) )
diff --git a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx
index ea9f319fd570..c8d29f5149d1 100644
--- a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx
+++ b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx
@@ -137,7 +137,7 @@ extern "C" int NPFR_propfind_iter( void* userdata,
{
OString aValue( value );
aValue = aValue.trim(); // #107358# remove leading/trailing spaces
- if ( aValue.getLength() )
+ if ( !aValue.isEmpty() )
{
aValue = stripDavNamespace( aValue ).toAsciiLowerCase();
if ( aValue.compareTo(
diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx
index 2ed00dcf047a..3ab4d3924108 100644
--- a/ucb/source/ucp/webdav/NeonSession.cxx
+++ b/ucb/source/ucp/webdav/NeonSession.cxx
@@ -302,7 +302,7 @@ extern "C" int NeonSession_NeonAuth( void * inUserData,
{
NeonUri uri( theSession->getRequestEnvironment().m_aRequestURI );
rtl::OUString aUserInfo( uri.GetUserInfo() );
- if ( aUserInfo.getLength() )
+ if ( !aUserInfo.isEmpty() )
{
sal_Int32 nPos = aUserInfo.indexOf( '@' );
if ( nPos == -1 )
@@ -577,7 +577,7 @@ extern "C" void NeonSession_PreSendRequest( ne_request * req,
RequestDataMap::const_iterator it = pRequestData->find( req );
if ( it != pRequestData->end() )
{
- if ( (*it).second.aContentType.getLength() )
+ if ( !(*it).second.aContentType.isEmpty() )
{
char * pData = headers->data;
if ( strstr( pData, "Content-Type:" ) == NULL )
@@ -590,7 +590,7 @@ extern "C" void NeonSession_PreSendRequest( ne_request * req,
}
}
- if ( (*it).second.aReferer.getLength() )
+ if ( !(*it).second.aReferer.isEmpty() )
{
char * pData = headers->data;
if ( strstr( pData, "Referer:" ) == NULL )
@@ -825,7 +825,7 @@ void NeonSession::Init()
ne_hook_destroy_session( m_pHttpSession, destroy_sess_hook_fn, this );
#endif
- if ( m_aProxyName.getLength() )
+ if ( !m_aProxyName.isEmpty() )
{
ne_session_proxy( m_pHttpSession,
rtl::OUStringToOString(
@@ -878,7 +878,7 @@ sal_Bool NeonSession::CanUse( const rtl::OUString & inUri,
sal_Bool NeonSession::UsesProxy()
{
Init();
- return ( m_aProxyName.getLength() > 0 );
+ return !m_aProxyName.isEmpty() ;
}
// -------------------------------------------------------------------
@@ -2026,7 +2026,7 @@ int NeonSession::POST( ne_session * sess,
RequestDataMap * pData = 0;
- if ( rContentType.getLength() || rReferer.getLength() )
+ if ( !rContentType.isEmpty() || !rReferer.isEmpty() )
{
// Remember contenttype and referer. Data will be added to HTTP request
// header in in 'PreSendRequest' callback.
diff --git a/ucb/source/ucp/webdav/NeonUri.cxx b/ucb/source/ucp/webdav/NeonUri.cxx
index bbbbbbb60c73..6acfb4e51bf1 100644
--- a/ucb/source/ucp/webdav/NeonUri.cxx
+++ b/ucb/source/ucp/webdav/NeonUri.cxx
@@ -123,7 +123,7 @@ NeonUri::NeonUri( const ne_uri * inUri )
NeonUri::NeonUri( const rtl::OUString & inUri )
throw ( DAVException )
{
- if ( inUri.getLength() <= 0 )
+ if ( inUri.isEmpty() )
throw DAVException( DAVException::DAV_INVALID_ARG );
// #i77023#
@@ -197,7 +197,7 @@ void NeonUri::calculateURI ()
{
rtl::OUStringBuffer aBuf( mScheme );
aBuf.appendAscii( "://" );
- if ( mUserInfo.getLength() > 0 )
+ if ( !mUserInfo.isEmpty() )
{
//TODO! differentiate between empty and missing userinfo
aBuf.append( mUserInfo );
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index ff820f882aa8..fab721ef35a8 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -737,7 +737,7 @@ void SAL_CALL Content::addProperty( const rtl::OUString& Name,
// if ( m_bTransient )
// @@@ ???
- if ( !Name.getLength() )
+ if ( Name.isEmpty() )
throw lang::IllegalArgumentException();
// Check property type.
@@ -994,7 +994,7 @@ Content::createNewContent( const ucb::ContentInfo& Info )
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
- if ( !Info.Type.getLength() )
+ if ( Info.Type.isEmpty() )
return uno::Reference< ucb::XContent >();
if ( ( !Info.Type.equalsAsciiL(
@@ -1006,7 +1006,7 @@ Content::createNewContent( const ucb::ContentInfo& Info )
rtl::OUString aURL = m_xIdentifier->getContentIdentifier();
- OSL_ENSURE( aURL.getLength() > 0,
+ OSL_ENSURE( !aURL.isEmpty(),
"WebdavContent::createNewContent - empty identifier!" );
if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() )
@@ -1584,7 +1584,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
if ( rValue.Value >>= aNewValue )
{
// No empty titles!
- if ( aNewValue.getLength() > 0 )
+ if ( !aNewValue.isEmpty() )
{
try
{
@@ -1881,7 +1881,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
}
}
- if ( aNewTitle.getLength() )
+ if ( !aNewTitle.isEmpty() )
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
@@ -2258,7 +2258,7 @@ void Content::insert(
// Check, if all required properties are present.
- if ( aEscapedTitle.getLength() == 0 )
+ if ( aEscapedTitle.isEmpty() )
{
OSL_FAIL( "Content::insert - Title missing!" );
@@ -2564,7 +2564,7 @@ void Content::transfer(
// Check for same host
//
- if ( sourceURI.GetHost().getLength() &&
+ if ( !sourceURI.GetHost().isEmpty() &&
( sourceURI.GetHost() != targetURI.GetHost() ) )
{
ucbhelper::cancelCommandExecution(
@@ -2578,7 +2578,7 @@ void Content::transfer(
rtl::OUString aTitle = rArgs.NewTitle;
- if ( !aTitle.getLength() )
+ if ( aTitle.isEmpty() )
aTitle = sourceURI.GetPathBaseNameUnescaped();
if ( aTitle.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "/" ) ) )
@@ -3169,7 +3169,7 @@ Content::getBaseURI( const std::auto_ptr< DAVResourceAccess > & rResAccess )
m_xCachedProps->getValue( rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
"Content-Location" ) ) ) >>= aLocation;
- if ( aLocation.getLength() )
+ if ( !aLocation.isEmpty() )
{
try
{
diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.cxx b/ucb/source/ucp/webdav/webdavdatasupplier.cxx
index a2817ebc7297..6c672f6c355a 100644
--- a/ucb/source/ucp/webdav/webdavdatasupplier.cxx
+++ b/ucb/source/ucp/webdav/webdavdatasupplier.cxx
@@ -146,7 +146,7 @@ rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
if ( 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;
@@ -193,7 +193,7 @@ DataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
}
rtl::OUString aId = queryContentIdentifierString( nIndex );
- if ( aId.getLength() )
+ if ( !aId.isEmpty() )
{
uno::Reference< ucb::XContentIdentifier > xId
= new ::ucbhelper::ContentIdentifier( aId );