summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/ext
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/ucp/ext
parent3e04e08d371532960917afbcd59307fbd6c1f313 (diff)
Fix for fdo43460 Part L getLength() to isEmpty()
Part L Modules ucb
Diffstat (limited to 'ucb/source/ucp/ext')
-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
3 files changed, 10 insertions, 10 deletions
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( '/' ) );