diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-01-05 14:15:36 -0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-01-05 22:05:45 -0200 |
commit | fffd541c3e626bee162ab4b473b6bd6cd180244e (patch) | |
tree | 17197936ca83815d876d0c1de0c7a045a7768f7b /scripting | |
parent | 15f5d766837329baa8deff31e9da33cef87f7a98 (diff) |
Fix for fdo43460 Part XXIX getLength() to isEmpty()
Part XXIX
Modules
sax, scaddins, sccomp, scripting
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/source/basprov/basmethnode.cxx | 2 | ||||
-rw-r--r-- | scripting/source/basprov/basprov.cxx | 6 | ||||
-rw-r--r-- | scripting/source/dlgprov/dlgprov.cxx | 4 | ||||
-rw-r--r-- | scripting/source/protocolhandler/scripthandler.cxx | 2 | ||||
-rw-r--r-- | scripting/source/provider/MasterScriptProvider.cxx | 8 | ||||
-rw-r--r-- | scripting/source/stringresource/stringresource.cxx | 10 | ||||
-rw-r--r-- | scripting/source/vbaevents/eventhelper.cxx | 4 |
7 files changed, 18 insertions, 18 deletions
diff --git a/scripting/source/basprov/basmethnode.cxx b/scripting/source/basprov/basmethnode.cxx index 750210d39a32..b07720c50606 100644 --- a/scripting/source/basprov/basmethnode.cxx +++ b/scripting/source/basprov/basmethnode.cxx @@ -226,7 +226,7 @@ namespace basprov if ( xModel.is() ) { sDocURL = xModel->getURL(); - if ( sDocURL.getLength() == 0 ) + if ( sDocURL.isEmpty() ) { Sequence < PropertyValue > aProps = xModel->getArgs(); sal_Int32 nProps = aProps.getLength(); diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx index 4d1ff81e87e5..c2c0653b85d6 100644 --- a/scripting/source/basprov/basprov.cxx +++ b/scripting/source/basprov/basprov.cxx @@ -183,7 +183,7 @@ namespace basprov } } - if ( aFileURL.getLength() ) + if ( !aFileURL.isEmpty() ) { osl::DirectoryItem aFileItem; osl::FileStatus aFileStatus( osl_FileStatus_Mask_FileURL ); @@ -385,7 +385,7 @@ namespace basprov sProjectName = pBasicMgr->GetName(); ::rtl::OUString aLibrary; - if ( sProjectName.getLength() && aDescription.match( sProjectName ) ) + if ( !sProjectName.isEmpty() && aDescription.match( sProjectName ) ) { OSL_TRACE("LibraryName %s is part of the url %s", rtl::OUStringToOString( sProjectName, RTL_TEXTENCODING_UTF8 ).getStr(), @@ -402,7 +402,7 @@ namespace basprov if ( nIndex != -1 ) aMethod = aDescription.getToken( 0, (sal_Unicode)'.', nIndex ); - if ( aLibrary.getLength() != 0 && aModule.getLength() != 0 && aMethod.getLength() != 0 && aLocation.getLength() != 0 ) + if ( !aLibrary.isEmpty() && !aModule.isEmpty() && !aMethod.isEmpty() && !aLocation.isEmpty() ) { if ( pBasicMgr ) diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx index b498fa84d42b..d828e04c69a8 100644 --- a/scripting/source/dlgprov/dlgprov.cxx +++ b/scripting/source/dlgprov/dlgprov.cxx @@ -406,7 +406,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re continue; ::rtl::OUString sDocURL = xModel->getURL(); - if ( sDocURL.getLength() == 0 ) + if ( sDocURL.isEmpty() ) { ::comphelper::NamedValueCollection aModelArgs( xModel->getArgs() ); sDocURL = aModelArgs.getOrDefault( "Title", sDocURL ); @@ -738,7 +738,7 @@ static ::rtl::OUString aResourceResolverPropName(RTL_CONSTASCII_USTRINGPARAM("Re xCtrlMod = createDialogModelForBasic(); else { - OSL_ENSURE( URL.getLength(), "DialogProviderImpl::getDialog: no URL!" ); + OSL_ENSURE( !URL.isEmpty(), "DialogProviderImpl::getDialog: no URL!" ); xCtrlMod = createDialogModel( URL ); } } diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx index c1d2b2c0310a..73f4e56b8771 100644 --- a/scripting/source/protocolhandler/scripthandler.cxx +++ b/scripting/source/protocolhandler/scripthandler.cxx @@ -198,7 +198,7 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification( // this is not an argument to be passed to script, so // ignore. if ( lArgs[ index ].Name.compareToAscii("Referer") != 0 || - lArgs[ index ].Name.getLength() == 0 ) + lArgs[ index ].Name.isEmpty() ) { inArgs.realloc( ++argCount ); inArgs[ argCount - 1 ] = lArgs[ index ].Value; diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index c5fe4c879285..81d647895811 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -302,7 +302,7 @@ throw ( provider::ScriptFrameworkErrorException, if ( sfUri->hasParameter( langKey ) == sal_False || sfUri->hasParameter( locKey ) == sal_False || - ( sfUri->getName().getLength() == 0 ) ) + ( sfUri->getName().isEmpty() ) ) { ::rtl::OUString errorMsg = OUSTR( "Incorrect format for Script URI: " ); errorMsg = errorMsg.concat( scriptURI ); @@ -551,7 +551,7 @@ MasterScriptProvider::insertByName( const ::rtl::OUString& aName, const Any& aEl throw lang::IllegalArgumentException( OUSTR("Couldn't convert to XPackage"), Reference < XInterface > (), 2 ); } - if ( !aName.getLength() ) + if ( aName.isEmpty() ) { throw lang::IllegalArgumentException( OUSTR("Name not set!!"), Reference < XInterface > (), 1 ); @@ -625,7 +625,7 @@ MasterScriptProvider::removeByName( const ::rtl::OUString& Name ) throw ( contai } else { - if ( !Name.getLength() ) + if ( Name.isEmpty() ) { throw lang::IllegalArgumentException( OUSTR("Name not set!!"), Reference < XInterface > (), 1 ); @@ -730,7 +730,7 @@ MasterScriptProvider::hasByName( const ::rtl::OUString& aName ) throw (RuntimeEx } else { - if ( !aName.getLength() ) + if ( aName.isEmpty() ) { throw lang::IllegalArgumentException( OUSTR("Name not set!!"), Reference < XInterface > (), 1 ); diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index f7a0673a4711..c15a6bb6dbac 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -855,7 +855,7 @@ void StringResourcePersistenceImpl::implInitializeCommonParameters ::rtl::OUString errorMsg(RTL_CONSTASCII_USTRINGPARAM("XInitialization::initialize: Expected NameBase string")); throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 3 ); } - if( m_aNameBase.getLength() == 0 ) + if( m_aNameBase.isEmpty() ) m_aNameBase = aNameBaseDefaultStr; bool bCommentOk = (aArguments[4] >>= m_aComment); @@ -1854,14 +1854,14 @@ bool StringResourcePersistenceImpl::implLoadLocale( LocaleItem* ) aRetStr += aLocale.Language; ::rtl::OUString aCountry = aLocale.Country; - if( aCountry.getLength() ) + if( !aCountry.isEmpty() ) { aRetStr += aUnder; aRetStr += aCountry; } ::rtl::OUString aVariant = aLocale.Variant; - if( aVariant.getLength() ) + if( !aVariant.isEmpty() ) { aRetStr += aUnder; aRetStr += aVariant; @@ -1873,7 +1873,7 @@ bool StringResourcePersistenceImpl::implLoadLocale( LocaleItem* ) ( LocaleItem* pLocaleItem, const ::rtl::OUString& aNameBase ) { ::rtl::OUString aFileName = aNameBase; - if( aFileName.getLength() == 0 ) + if( aFileName.isEmpty() ) aFileName = aNameBaseDefaultStr; aFileName += implGetNameScemeForLocaleItem( pLocaleItem ); @@ -2089,7 +2089,7 @@ bool StringResourcePersistenceImpl::implReadPropertiesFile } // Ignore lines with empty keys - if( 0 == aResourceID.getLength() ) + if( aResourceID.isEmpty() ) continue; // Scan value diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx index d13bbe7b5023..3b9cf401e39a 100644 --- a/scripting/source/vbaevents/eventhelper.cxx +++ b/scripting/source/vbaevents/eventhelper.cxx @@ -396,8 +396,8 @@ eventMethodToDescriptor( const ::rtl::OUString& rEventMethod, ScriptEventDescrip // Only create an ScriptEventDescriptor for an event we can translate // or emulate - if ( sMethodName.getLength() - && sTypeName.getLength() + if ( !sMethodName.isEmpty() + && !sTypeName.isEmpty() && ( infos.find( sMethodName ) != infos.end() ) ) { // just fill in CodeName, when the event fires the other |