diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2011-12-21 19:54:11 -0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-12-22 14:26:46 +0000 |
commit | 7c0c3362de894ddd4526f56e1849f116eb25cedd (patch) | |
tree | 997471cefa62eaf2cb7be3c6782690ce0d919159 /embeddedobj/source/general | |
parent | 7248aaed7aca6c241683f6d83bb6caa00c447b0d (diff) |
Fix for fdo43460 Part XV getLength() to isEmpty()
Part XV
Module
embeddeobj
Diffstat (limited to 'embeddedobj/source/general')
-rw-r--r-- | embeddedobj/source/general/docholder.cxx | 8 | ||||
-rw-r--r-- | embeddedobj/source/general/dummyobject.cxx | 4 | ||||
-rw-r--r-- | embeddedobj/source/general/xcreator.cxx | 24 |
3 files changed, 18 insertions, 18 deletions
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 2ba23df02744..c0b4990d3576 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -126,7 +126,7 @@ static void InsertMenu_Impl( const uno::Reference< container::XIndexContainer >& for ( nInd = 0; nInd < aSourceProps.getLength(); nInd++ ) { aTargetProps[nInd].Name = aSourceProps[nInd].Name; - if ( aContModuleName.getLength() && aTargetProps[nInd].Name.equals( aModuleIdentPropName ) ) + if ( !aContModuleName.isEmpty() && aTargetProps[nInd].Name.equals( aModuleIdentPropName ) ) { aTargetProps[nInd].Value <<= aContModuleName; bModuleNameSet = sal_True; @@ -140,7 +140,7 @@ static void InsertMenu_Impl( const uno::Reference< container::XIndexContainer >& aTargetProps[nInd].Value = aSourceProps[nInd].Value; } - if ( !bModuleNameSet && aContModuleName.getLength() ) + if ( !bModuleNameSet && !aContModuleName.isEmpty() ) { aTargetProps.realloc( ++nInd ); aTargetProps[nInd-1].Name = aModuleIdentPropName; @@ -582,7 +582,7 @@ uno::Reference< container::XIndexAccess > DocumentHolder::RetrieveOwnMenu_Impl() ::rtl::OUString aModuleIdent = xModuleMan->identify( uno::Reference< uno::XInterface >( m_xComponent, uno::UNO_QUERY ) ); - if ( aModuleIdent.getLength() ) + if ( !aModuleIdent.isEmpty() ) { uno::Reference< ::com::sun::star::ui::XModuleUIConfigurationManagerSupplier > xModConfSupplier( m_xFactory->createInstance( ::rtl::OUString( @@ -623,7 +623,7 @@ void DocumentHolder::FindConnectPoints( break; } - if ( !aCommand.getLength() ) + if ( aCommand.isEmpty() ) throw uno::RuntimeException(); if ( aCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:PickList" ) ) ) diff --git a/embeddedobj/source/general/dummyobject.cxx b/embeddedobj/source/general/dummyobject.cxx index c5cd7b1adf6c..d5a7fc54f7ba 100644 --- a/embeddedobj/source/general/dummyobject.cxx +++ b/embeddedobj/source/general/dummyobject.cxx @@ -325,7 +325,7 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); - if ( !sEntName.getLength() ) + if ( sEntName.isEmpty() ) throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -469,7 +469,7 @@ sal_Bool SAL_CALL ODummyEmbeddedObject::hasEntry() ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "The object waits for saveCompleted() call!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); - if ( m_aEntryName.getLength() ) + if ( !m_aEntryName.isEmpty() ) return sal_True; return sal_False; diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index 235dd7f343c9..607fe2260c8b 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -89,13 +89,13 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); - if ( !sEntName.getLength() ) + if ( sEntName.isEmpty() ) throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); ::rtl::OUString aEmbedFactory = m_aConfigHelper.GetFactoryNameByClassID( aClassID ); - if ( !aEmbedFactory.getLength() ) + if ( aEmbedFactory.isEmpty() ) { // use system fallback // TODO: in future users factories can be tested @@ -132,7 +132,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); - if ( !sEntName.getLength() ) + if ( sEntName.isEmpty() ) throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -209,11 +209,11 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta } } - OSL_ENSURE( aMediaType.getLength(), "No media type is specified for the object!" ); - if ( aMediaType.getLength() && !aEmbedFactory.getLength() ) + OSL_ENSURE( !aMediaType.isEmpty(), "No media type is specified for the object!" ); + if ( !aMediaType.isEmpty() && aEmbedFactory.isEmpty() ) aEmbedFactory = m_aConfigHelper.GetFactoryNameByMediaType( aMediaType ); - if ( aEmbedFactory.getLength() ) + if ( !aEmbedFactory.isEmpty() ) { uno::Reference< uno::XInterface > xFact = m_xFactory->createInstance( aEmbedFactory ); @@ -253,7 +253,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); - if ( !sEntName.getLength() ) + if ( sEntName.isEmpty() ) throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -264,7 +264,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // check if there is FilterName ::rtl::OUString aFilterName = m_aConfigHelper.UpdateMediaDescriptorWithFilterName( aTempMedDescr, sal_False ); - if ( aFilterName.getLength() ) + if ( !aFilterName.isEmpty() ) { // the object can be loaded by one of the office application uno::Reference< embed::XEmbedObjectCreator > xOOoEmbCreator( @@ -326,7 +326,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); - if ( !sEntName.getLength() ) + if ( sEntName.isEmpty() ) throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -370,14 +370,14 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta if ( aTempMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) aTempMedDescr[nInd].Value >>= aURL; - if ( !aURL.getLength() ) + if ( aURL.isEmpty() ) throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No URL for the link is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); ::rtl::OUString aFilterName = m_aConfigHelper.UpdateMediaDescriptorWithFilterName( aTempMedDescr, sal_False ); - if ( aFilterName.getLength() ) + if ( !aFilterName.isEmpty() ) { // the object can be loaded by one of the office application uno::Reference< embed::XLinkCreator > xOOoLinkCreator( @@ -409,7 +409,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta static_cast< ::cppu::OWeakObject* >(this) ), 3 ); - if ( !sEntName.getLength() ) + if ( sEntName.isEmpty() ) throw lang::IllegalArgumentException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Empty element name is provided!\n" )), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), |