summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2011-12-15 17:29:53 -0200
committerIvan Timofeev <timofeev.i.s@gmail.com>2011-12-17 17:15:53 +0400
commit1b99d8800e399f45404ab62827163a873d2a1aec (patch)
tree647c91cd0af1e671e490d369bba8d8a2efde46da /cppuhelper
parentf26635c3869a85ae03dba3dfb833276f13ffc478 (diff)
Fix for fdo43460 Part X getLength() to isEmpty()
Part X Module cppu cppuhelper cpputools
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/bootstrap.cxx8
-rw-r--r--cppuhelper/source/component_context.cxx2
-rw-r--r--cppuhelper/source/factory.cxx2
-rw-r--r--cppuhelper/source/propertysetmixin.cxx2
-rw-r--r--cppuhelper/source/propshlp.cxx8
-rw-r--r--cppuhelper/source/servicefactory.cxx14
-rw-r--r--cppuhelper/source/shlib.cxx4
7 files changed, 20 insertions, 20 deletions
diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx
index 399af07a5b9b..2fb8ccde427d 100644
--- a/cppuhelper/source/bootstrap.cxx
+++ b/cppuhelper/source/bootstrap.cxx
@@ -81,13 +81,13 @@ namespace cppu
OUString const & get_this_libpath()
{
static OUString s_path;
- if (0 == s_path.getLength())
+ if (s_path.isEmpty())
{
OUString path;
Module::getUrlFromAddress( reinterpret_cast<oslGenericFunction>(get_this_libpath), path );
path = path.copy( 0, path.lastIndexOf( '/' ) );
MutexGuard guard( Mutex::getGlobalMutex() );
- if (0 == s_path.getLength())
+ if (s_path.isEmpty())
s_path = path;
}
return s_path;
@@ -317,7 +317,7 @@ Reference< registry::XSimpleRegistry > nestRegistries(
sal_Int32 index;
Reference< registry::XSimpleRegistry > lastRegistry;
- if(write_rdb.getLength()) // is there a write registry given?
+ if(!write_rdb.isEmpty()) // is there a write registry given?
{
lastRegistry.set(xSimRegFac->createInstance(), UNO_QUERY);
@@ -533,7 +533,7 @@ Reference< XComponentContext > SAL_CALL bootstrap()
throw BootstrapException(
OUSTR("cannot convert soffice installation path to URL!"));
}
- if (path.getLength() > 0 && path[path.getLength() - 1] != '/') {
+ if (!path.isEmpty() && path[path.getLength() - 1] != '/') {
path += OUSTR("/");
}
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index 97a1f7222d97..da60e39152b7 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -593,7 +593,7 @@ Any ComponentContext::lookupMap( OUString const & rName )
{
OUString serviceName;
if ((usesService >>= serviceName) &&
- serviceName.getLength())
+ !serviceName.isEmpty())
{
xInstance = args.getLength()
? m_xSMgr->createInstanceWithArgumentsAndContext(
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx
index 573f7b443b46..cab323a17d4b 100644
--- a/cppuhelper/source/factory.cxx
+++ b/cppuhelper/source/factory.cxx
@@ -876,7 +876,7 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory()
}
Reference< XInterface > xFactory;
- if( aActivatorName.getLength() != 0 )
+ if( !aActivatorName.isEmpty() )
{
Reference<XInterface > x = xSMgr->createInstance( aActivatorName );
Reference<XImplementationLoader > xLoader( x, UNO_QUERY );
diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx
index 7d2b83225f6f..e4cddeb2add4 100644
--- a/cppuhelper/source/propertysetmixin.cxx
+++ b/cppuhelper/source/propertysetmixin.cxx
@@ -1022,7 +1022,7 @@ PropertySetMixinImpl::~PropertySetMixinImpl() {
}
void PropertySetMixinImpl::checkUnknown(rtl::OUString const & propertyName) {
- if (propertyName.getLength() != 0) {
+ if (!propertyName.isEmpty()) {
m_impl->get(
static_cast< css::beans::XPropertySet * >(this), propertyName);
}
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx
index 31210956cffa..338d9c184b24 100644
--- a/cppuhelper/source/propshlp.cxx
+++ b/cppuhelper/source/propshlp.cxx
@@ -311,7 +311,7 @@ void OPropertySetHelper::addPropertyChangeListener(
{
// only add listeners if you are not disposed
// a listener with no name means all properties
- if( rPropertyName.getLength() )
+ if( !rPropertyName.isEmpty() )
{
// get the map table
IPropertyArrayHelper & rPH = getInfoHelper();
@@ -357,7 +357,7 @@ void OPropertySetHelper::removePropertyChangeListener(
// all listeners are automaticly released in a dispose call
if( !rBHelper.bInDispose && !rBHelper.bDisposed )
{
- if( rPropertyName.getLength() )
+ if( !rPropertyName.isEmpty() )
{
// get the map table
IPropertyArrayHelper & rPH = getInfoHelper();
@@ -393,7 +393,7 @@ void OPropertySetHelper::addVetoableChangeListener(
{
// only add listeners if you are not disposed
// a listener with no name means all properties
- if( rPropertyName.getLength() )
+ if( !rPropertyName.isEmpty() )
{
// get the map table
IPropertyArrayHelper & rPH = getInfoHelper();
@@ -437,7 +437,7 @@ void OPropertySetHelper::removeVetoableChangeListener(
// all listeners are automaticly released in a dispose call
if( !rBHelper.bInDispose && !rBHelper.bDisposed )
{
- if( rPropertyName.getLength() )
+ if( !rPropertyName.isEmpty() )
{
// get the map table
IPropertyArrayHelper & rPH = getInfoHelper();
diff --git a/cppuhelper/source/servicefactory.cxx b/cppuhelper/source/servicefactory.cxx
index 25f49706edfa..ea97a17edd72 100644
--- a/cppuhelper/source/servicefactory.cxx
+++ b/cppuhelper/source/servicefactory.cxx
@@ -113,7 +113,7 @@ Reference< registry::XSimpleRegistry > SAL_CALL createSimpleRegistry(
createInstance(
loadSharedLibComponentFactory(
OUSTR("bootstrap.uno" SAL_DLLEXTENSION),
- 0 == rBootstrapPath.getLength()
+ rBootstrapPath.isEmpty()
? get_this_libpath() : rBootstrapPath,
OUSTR("com.sun.star.comp.stoc.SimpleRegistry"),
Reference< lang::XMultiServiceFactory >(),
@@ -144,7 +144,7 @@ Reference< registry::XSimpleRegistry > SAL_CALL createNestedRegistry(
createInstance(
loadSharedLibComponentFactory(
OUSTR("bootstrap.uno" SAL_DLLEXTENSION),
- 0 == rBootstrapPath.getLength()
+ rBootstrapPath.isEmpty()
? get_this_libpath() : rBootstrapPath,
OUSTR("com.sun.star.comp.stoc.NestedRegistry"),
Reference< lang::XMultiServiceFactory >(),
@@ -247,7 +247,7 @@ static void add_access_control_entries(
if (bootstrap.getFrom( OUSTR("UNO_AC_SINGLEUSER"), ac_user ))
{
// ac in single-user mode
- if (ac_user.getLength())
+ if (!ac_user.isEmpty())
{
// - ac prop: single-user-id
entry.bLateInitService = false;
@@ -383,7 +383,7 @@ Reference< lang::XMultiComponentFactory > bootstrapInitialSF(
SAL_THROW( (Exception) )
{
OUString const & bootstrap_path =
- 0 == rBootstrapPath.getLength() ? get_this_libpath() : rBootstrapPath;
+ rBootstrapPath.isEmpty() ? get_this_libpath() : rBootstrapPath;
Reference< lang::XMultiComponentFactory > xMgr(
createInstance(
@@ -542,7 +542,7 @@ Reference< XComponentContext > bootstrapInitialContext(
Reference< lang::XSingleComponentFactory > xFac(
loadSharedLibComponentFactory(
OUSTR("bootstrap.uno" SAL_DLLEXTENSION),
- 0 == rBootstrapPath.getLength()
+ rBootstrapPath.isEmpty()
? get_this_libpath() : rBootstrapPath,
OUSTR("com.sun.star.comp.stoc.RegistryTypeDescriptionProvider"),
Reference< lang::XMultiServiceFactory >( xSF, UNO_QUERY ),
@@ -587,7 +587,7 @@ static Reference< lang::XMultiComponentFactory > createImplServiceFactory(
// open a registry
sal_Bool bRegistryShouldBeValid = sal_False;
- if (rWriteRegistry.getLength() && !rReadRegistry.getLength())
+ if (!rWriteRegistry.isEmpty() && rReadRegistry.isEmpty())
{
bRegistryShouldBeValid = sal_True;
xRegistry.set( createSimpleRegistry( rBootstrapPath ) );
@@ -603,7 +603,7 @@ static Reference< lang::XMultiComponentFactory > createImplServiceFactory(
}
}
}
- else if (rWriteRegistry.getLength() && rReadRegistry.getLength())
+ else if (!rWriteRegistry.isEmpty() && !rReadRegistry.isEmpty())
{
// default registry
bRegistryShouldBeValid = sal_True;
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index 3b6cdfc5d7d1..1213b0ec23ab 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -228,7 +228,7 @@ static OUString makeComponentPath(
OSL_ASSERT( FileBase::E_None ==
FileBase::getSystemPathFromFileURL( rLibName, aComp ) );
OSL_ASSERT(
- ! rPath.getLength() ||
+ rPath.isEmpty() ||
FileBase::E_None ==
FileBase::getSystemPathFromFileURL( rPath, aComp ) );
}
@@ -236,7 +236,7 @@ static OUString makeComponentPath(
OUStringBuffer buf( rPath.getLength() + rLibName.getLength() + 12 );
- if (0 != rPath.getLength())
+ if (!rPath.isEmpty())
{
buf.append( rPath );
if (rPath[ rPath.getLength() -1 ] != '/')