diff options
author | Herbert Dürr <hdu@apache.org> | 2014-02-04 08:48:47 +0000 |
---|---|---|
committer | Herbert Dürr <hdu@apache.org> | 2014-02-04 08:48:47 +0000 |
commit | 87204b0f4062ef8fc8f138ad15f4378da609d4e2 (patch) | |
tree | 1a86dbe6f8c58b373e6cad17207afbaad455cdae | |
parent | 40b2ffbb1036c2f2db50965525009213d8fd6343 (diff) |
#i123862# use O*String's isEmpty() method to check for emptiness in modules starting with 'b'
Patch-by: j.nitschke@ok.de
Review-by: hdu@apache.org
Notes
merged as: a5090ccf756aac2365fd52d7cf9b423f54c5c6f6
27 files changed, 62 insertions, 62 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index b417c540290d..02cb39292a5c 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -370,7 +370,7 @@ sal_Bool ModulWindow::BasicExecute() if ( !pMethod ) { if ( aDocument.isInVBAMode() ) - return ( BasicIDE::ChooseMacro( uno::Reference< frame::XModel >(), sal_False, rtl::OUString() ).getLength() > 0 ) ? sal_True : sal_False; + return ( BasicIDE::ChooseMacro( uno::Reference< frame::XModel >(), sal_False, rtl::OUString() ).isEmpty() == false ) ? sal_True : sal_False; else pMethod = (SbMethod*)xModule->Find( String( RTL_CONSTASCII_USTRINGPARAM( "Main" ) ), SbxCLASS_METHOD ); } diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index adc3294f7500..c03d0bd9dbf6 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -781,7 +781,7 @@ void BasicTreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Ima } } - if ( sFactoryURL.getLength() ) + if ( !sFactoryURL.isEmpty() ) { rImage = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ), sal_False /* small */, diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx index 6bb156b30541..94f44ac15a7a 100644 --- a/basctl/source/basicide/localizationmgr.cxx +++ b/basctl/source/basicide/localizationmgr.cxx @@ -183,7 +183,7 @@ void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResou aPureIdStr += aDot; aPureIdStr += aDialogName; aPureIdStr += aDot; - if( aCtrlName.getLength() ) + if( !aCtrlName.isEmpty() ) { aPureIdStr += aCtrlName; aPureIdStr += aDot; @@ -243,7 +243,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties // Replace string by id, add id+string to StringResource if( eMode == SET_IDS ) { - bool bEscAlreadyExisting = (aPropStr.getLength() && aPropStr.getStr()[0] == '&' ); + bool bEscAlreadyExisting = (!aPropStr.isEmpty() && aPropStr.getStr()[0] == '&' ); if( bEscAlreadyExisting ) continue; @@ -436,7 +436,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties for ( i = 0; i < nPropStringCount; ++i ) { ::rtl::OUString aPropStr = pPropStrings[i]; - bool bEscAlreadyExisting = (aPropStr.getLength() && aPropStr.getStr()[0] == '&' ); + bool bEscAlreadyExisting = (!aPropStr.isEmpty() && aPropStr.getStr()[0] == '&' ); if( bEscAlreadyExisting ) { pIdStrings[i] = aPropStr; diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index a16c7a74bf7b..6eb46108badc 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -1002,7 +1002,7 @@ namespace basctl } } - if ( aFileURL.getLength() ) + if ( !aFileURL.isEmpty() ) { ::osl::DirectoryItem aFileItem; ::osl::FileStatus aFileStatus( FileStatusMask_FileURL ); @@ -1164,7 +1164,7 @@ namespace basctl ScriptDocument ScriptDocument::getDocumentWithURLOrCaption( const ::rtl::OUString& _rUrlOrCaption ) { ScriptDocument aDocument( getApplicationScriptDocument() ); - if ( _rUrlOrCaption.getLength() == 0 ) + if ( _rUrlOrCaption.isEmpty() ) return aDocument; docs::Documents aDocuments; @@ -1521,7 +1521,7 @@ namespace basctl LibraryLocation ScriptDocument::getLibraryLocation( const ::rtl::OUString& _rLibName ) const { LibraryLocation eLocation = LIBRARY_LOCATION_UNKNOWN; - if ( _rLibName.getLength() ) + if ( !_rLibName.isEmpty() ) { if ( isDocument() ) { diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index e5e6246691ff..20354396434b 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -518,7 +518,7 @@ void SAL_CALL DlgEdObj::NameChange( const ::com::sun::star::beans::PropertyChan Reference< container::XNameAccess > xNameAcc((GetDlgEdForm()->GetUnoControlModel()), UNO_QUERY); if ( xNameAcc.is() && xNameAcc->hasByName(aOldName) ) { - if ( !xNameAcc->hasByName(aNewName) && aNewName.getLength() != 0 ) + if ( !xNameAcc->hasByName(aNewName) && !aNewName.isEmpty() ) { // remove the control by the old name and insert the control by the new name in the container Reference< container::XNameContainer > xCont(xNameAcc, UNO_QUERY ); diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index ced77e813951..fa6612f50f78 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -270,7 +270,7 @@ void SAL_CALL BasMgrContainerListenerImpl::disposing( const EventObject& Source void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent& Event ) throw( RuntimeException ) { - sal_Bool bLibContainer = ( maLibName.getLength() == 0 ); + sal_Bool bLibContainer = maLibName.isEmpty(); ::rtl::OUString aName; Event.Accessor >>= aName; @@ -326,7 +326,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementReplaced( const ContainerEvent // Replace not possible for library container #ifdef DBG_UTIL - sal_Bool bLibContainer = ( maLibName.getLength() == 0 ); + sal_Bool bLibContainer = maLibName.isEmpty(); #endif DBG_ASSERT( !bLibContainer, "library container fired elementReplaced()"); @@ -356,7 +356,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementRemoved( const ContainerEvent& mpMgr->mpImpl->mbModifiedByLibraryContainer = sal_True; - sal_Bool bLibContainer = ( maLibName.getLength() == 0 ); + sal_Bool bLibContainer = maLibName.isEmpty(); if( bLibContainer ) { StarBASIC* pLib = mpMgr->GetLib( aName ); diff --git a/basic/source/basmgr/vbahelper.cxx b/basic/source/basmgr/vbahelper.cxx index 716c01534d2a..737606cf8ce7 100644 --- a/basic/source/basmgr/vbahelper.cxx +++ b/basic/source/basmgr/vbahelper.cxx @@ -220,7 +220,7 @@ void enableContainerWindowsOfAllDocuments( const uno::Reference< frame::XModel > void registerCurrentDirectory( const uno::Reference< frame::XModel >& rxModel, const ::rtl::OUString& rPath ) { - if( rPath.getLength() > 0 ) + if( !rPath.isEmpty() ) { CurrDirPool& rPool = StaticCurrDirPool::get(); ::osl::MutexGuard aGuard( rPool.maMutex ); @@ -228,7 +228,7 @@ void registerCurrentDirectory( const uno::Reference< frame::XModel >& rxModel, c { uno::Reference< frame::XModuleManager > xModuleManager( lclCreateModuleManager(), uno::UNO_SET_THROW ); ::rtl::OUString aIdentifier = xModuleManager->identify( rxModel ); - if( aIdentifier.getLength() > 0 ) + if( !aIdentifier.isEmpty() ) rPool.maCurrDirs[ aIdentifier ] = rPath; } catch( uno::Exception& ) diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index bbb931b16138..09d1f4a7a79b 100644 --- a/basic/source/classes/image.cxx +++ b/basic/source/classes/image.cxx @@ -298,7 +298,7 @@ sal_Bool SbiImage::Save( SvStream& r, sal_uInt32 nVer ) SbiCloseRecord( r, nPos ); } // Source? - if( aOUSource.getLength() && SbiGood( r ) ) + if( !aOUSource.isEmpty() && SbiGood( r ) ) { nPos = SbiOpenRecord( r, B_SOURCE, 1 ); String aTmp; diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 03cda46054e4..85ce59ce4d85 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -333,7 +333,7 @@ void implAppendExceptionMsg( ::rtl::OUStringBuffer& _inout_rBuffer, const Except lcl_indent( _inout_rBuffer, _nLevel ); _inout_rBuffer.appendAscii( "Type: " ); - if ( _rExceptionType.getLength() == 0 ) + if ( _rExceptionType.isEmpty() ) _inout_rBuffer.appendAscii( "Unknown" ); else _inout_rBuffer.append( _rExceptionType ); @@ -1773,7 +1773,7 @@ bool checkUnoObjectType( SbUnoObject* pUnoObj, const ::rtl::OUString& rClass ) { rtl::OUString sTypeName; xInv->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("$GetTypeName") ) ) >>= sTypeName; - if ( sTypeName.getLength() == 0 || sTypeName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IDispatch") ) ) ) + if ( sTypeName.isEmpty() || sTypeName.equals( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IDispatch") ) ) ) // can't check type, leave it pass result = true; else @@ -2298,7 +2298,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, bBlockConversionToSmallestType ); ::rtl::OUString aParamName = pNames[iSbx]; - if( aParamName.getLength() ) + if( !aParamName.isEmpty() ) { oleautomation::NamedArgument aNamedArgument; aNamedArgument.Name = aParamName; @@ -2755,7 +2755,7 @@ SbxVariable* SbUnoObject::Find( const String& rName, SbxClassType t ) if( mxExactName.is() ) { ::rtl::OUString aUExactName = mxExactName->getExactName( aUName ); - if( aUExactName.getLength() ) + if( !aUExactName.isEmpty() ) aUName = aUExactName; } if( mxUnoAccess->hasProperty( aUName, PropertyConcept::ALL - PropertyConcept::DANGEROUS ) ) @@ -2831,7 +2831,7 @@ SbxVariable* SbUnoObject::Find( const String& rName, SbxClassType t ) if( mxExactNameInvocation.is() ) { ::rtl::OUString aUExactName = mxExactNameInvocation->getExactName( aUName ); - if( aUExactName.getLength() ) + if( !aUExactName.isEmpty() ) aUName = aUExactName; } @@ -4778,7 +4778,7 @@ bool SbModule::createCOMWrapperForIface( Any& o_rRetAny, SbClassModuleObject* pP SbxVariable* pVar = pModIfaces->Get( i ); ::rtl::OUString aIfaceName = pVar->GetName(); - if( aIfaceName.getLength() != 0 ) + if( !aIfaceName.isEmpty() ) { ::rtl::OUString aPureIfaceName = aIfaceName; sal_Int32 indexLastDot = aIfaceName.lastIndexOf('.'); diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx index 4ff9bf595464..1c7ea54a7d74 100644 --- a/basic/source/comp/sbcomp.cxx +++ b/basic/source/comp/sbcomp.cxx @@ -589,7 +589,7 @@ void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl ) const TraceTextData& rTraceTextData = itInner->second; const rtl::OString& rStr_STMNT = rTraceTextData.m_aTraceStr_STMNT; bool bSTMT = false; - if( rStr_STMNT.getLength() ) + if( !rStr_STMNT.isEmpty() ) bSTMT = true; char TimeBuffer[200]; @@ -619,7 +619,7 @@ void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl ) nIndent += GnIndentForPCode; const rtl::OString& rStr_PCode = rTraceTextData.m_aTraceStr_PCode; - if( rStr_PCode.getLength() ) + if( !rStr_PCode.isEmpty() ) { lcl_lineOut( rStr_PCode.getStr(), lcl_getSpaces( nIndent ), bPrintTimeStamp ? TimeBuffer : NULL ); diff --git a/basic/source/runtime/dllmgr.cxx b/basic/source/runtime/dllmgr.cxx index 967618b255d8..d31420340b33 100644 --- a/basic/source/runtime/dllmgr.cxx +++ b/basic/source/runtime/dllmgr.cxx @@ -577,7 +577,7 @@ SbError call( SbError getProcData(HMODULE handle, rtl::OUString const & name, ProcData * proc) { OSL_ASSERT(proc != 0); - if (name.getLength() != 0 && name[0] == '@') { //TODO: "@" vs. "#"??? + if ( !name.isEmpty() && name[0] == '@' ) { //TODO: "@" vs. "#"??? sal_Int32 n = name.copy(1).toInt32(); //TODO: handle bad input if (n <= 0 || n > 0xFFFF) { return ERRCODE_BASIC_BAD_ARGUMENT; //TODO: more specific errcode? diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 55556577e8cd..70c24382183e 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -274,7 +274,7 @@ sal_Bool needSecurityRestrictions( void ) const Reference< XBridge >& rxBridge = pBridges[ i ]; ::rtl::OUString aDescription = rxBridge->getDescription(); ::rtl::OUString aPortalUser = findUserInDescription( aDescription ); - if( aPortalUser.getLength() > 0 ) + if( !aPortalUser.isEmpty() ) { // User Found, compare to system user if( aPortalUser == aSystemUser ) diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 8ba8880d75c2..f55424c71856 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -169,7 +169,7 @@ String getFullPath( const String& aRelPath ) INetURLObject aURLObj( aRelPath ); aFileURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE ); - if( !aFileURL.getLength() ) + if( aFileURL.isEmpty() ) { File::getFileURLFromSystemPath( aRelPath, aFileURL ); } @@ -283,7 +283,7 @@ RTLFUNC(Error) if ( bVBA && rPar.Count() > 1 ) { com::sun::star::uno::Reference< ooo::vba::XErrObject > xErrObj( SbxErrObject::getUnoErrObject() ); - if ( xErrObj.is() && xErrObj->getNumber() == nCode && xErrObj->getDescription().getLength() ) + if ( xErrObj.is() && xErrObj->getNumber() == nCode && !xErrObj->getDescription().isEmpty() ) tmpErrMsg = xErrObj->getDescription(); } rPar.Get( 0 )->PutString( tmpErrMsg ); diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index b2657b350f0c..102769f91e59 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -1597,9 +1597,9 @@ RTLFUNC(ConvertToUrl) String aStr = rPar.Get(1)->GetString(); INetURLObject aURLObj( aStr, INET_PROT_FILE ); ::rtl::OUString aFileURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE ); - if( !aFileURL.getLength() ) + if( aFileURL.isEmpty() ) ::osl::File::getFileURLFromSystemPath( aFileURL, aFileURL ); - if( !aFileURL.getLength() ) + if( aFileURL.isEmpty() ) aFileURL = aStr; rPar.Get(0)->PutString( String(aFileURL) ); } @@ -1617,7 +1617,7 @@ RTLFUNC(ConvertFromUrl) String aStr = rPar.Get(1)->GetString(); ::rtl::OUString aSysPath; ::osl::File::getSystemPathFromFileURL( aStr, aSysPath ); - if( !aSysPath.getLength() ) + if( aSysPath.isEmpty() ) aSysPath = aStr; rPar.Get(0)->PutString( String(aSysPath) ); } diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx index b01dd573ecca..29ed68dedc1b 100644 --- a/basic/source/runtime/step2.cxx +++ b/basic/source/runtime/step2.cxx @@ -424,7 +424,7 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 ) rtl::OUString sDefaultMethod; if ( xDfltMethod.is() ) sDefaultMethod = xDfltMethod->getDefaultMethodName(); - if ( sDefaultMethod.getLength() ) + if ( !sDefaultMethod.isEmpty() ) { SbxVariable* meth = pUnoObj->Find( sDefaultMethod, SbxCLASS_METHOD ); if( meth != NULL ) @@ -592,7 +592,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) else if( xIndexAccess.is() ) sDefaultMethod = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getByIndex" ) ); - if ( sDefaultMethod.getLength() ) + if ( !sDefaultMethod.isEmpty() ) { SbxVariable* meth = pUnoObj->Find( sDefaultMethod, SbxCLASS_METHOD ); SbxVariableRef refTemp = meth; diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 7ddefde6da99..112014e3dc71 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -605,7 +605,7 @@ sal_Bool SfxLibraryContainer::init_Impl( meInitMode = DEFAULT; INetURLObject aInitUrlInetObj( maInitialDocumentURL ); OUString aInitFileName = aInitUrlInetObj.GetMainURL( INetURLObject::NO_DECODE ); - if( aInitFileName.getLength() ) + if( !aInitFileName.isEmpty() ) { // We need a BasicManager to avoid problems StarBASIC* pBas = new StarBASIC(); @@ -834,7 +834,7 @@ sal_Bool SfxLibraryContainer::init_Impl( // Check storage URL OUString aStorageURL = rLib.aStorageURL; - if( !bStorage && !aStorageURL.getLength() && nPass == 0 ) + if( !bStorage && aStorageURL.isEmpty() && nPass == 0 ) { String aLibraryPath; if( meInitMode == CONTAINER_INIT_FILE ) @@ -1239,7 +1239,7 @@ void SfxLibraryContainer::implScanExtensions( void ) rtl::OUString aLibURL; bool bPureDialogLib = false; - while( (aLibURL = aScriptIt.nextBasicOrDialogLibrary( bPureDialogLib )).getLength() > 0 ) + while( (aLibURL = aScriptIt.nextBasicOrDialogLibrary( bPureDialogLib )).isEmpty() == false ) { if( bPureDialogLib && maInfoFileName.equalsAscii( "script" ) ) continue; @@ -1351,7 +1351,7 @@ OUString SfxLibraryContainer::createAppLibraryFolder ( SfxLibrary* pLib, const OUString& aName ) { OUString aLibDirPath = pLib->maStorageURL; - if( !aLibDirPath.getLength() ) + if( aLibDirPath.isEmpty() ) { INetURLObject aInetObj( String(maLibraryPath).GetToken(1) ); aInetObj.insertName( aName, sal_True, INetURLObject::LAST_SEGMENT, sal_True, INetURLObject::ENCODE_ALL ); @@ -1976,7 +1976,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto // if we did an in-place save into a storage (i.e. a save into the storage we were already based on), // then we need to clean up the temporary storage we used for this - if ( bInplaceStorage && sTempTargetStorName.getLength() ) + if ( bInplaceStorage && !sTempTargetStorName.isEmpty() ) { OSL_ENSURE( xSourceLibrariesStor.is(), "SfxLibrariesContainer::storeLibraries_impl: unexpected: we should have a source storage here!" ); try @@ -3119,7 +3119,7 @@ void SfxLibrary::impl_removeWithoutChecks( const ::rtl::OUString& _rElementName implSetModified( sal_True ); // Remove element file - if( maStorageURL.getLength() ) + if( !maStorageURL.isEmpty() ) { INetURLObject aElementInetObj( maStorageURL ); aElementInetObj.insertName( _rElementName, sal_False, @@ -3254,7 +3254,7 @@ rtl::OUString ScriptExtensionIterator::nextBasicOrDialogLibrary( bool& rbPureDia { rtl::OUString aRetLib; - while( !aRetLib.getLength() && m_eState != END_REACHED ) + while( aRetLib.isEmpty() && m_eState != END_REACHED ) { switch( m_eState ) { diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 0487b5694695..67b864a33dae 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -304,7 +304,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement // TODO: Check language // aMod.aLanguage // aMod.aName ignored - if( aMod.aModuleType.getLength() > 0 ) + if( !aMod.aModuleType.isEmpty() ) { /* If in VBA compatibility mode, force creation of the VBA Globals object. Each application will create an instance of its own @@ -474,8 +474,8 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString& if( OldPassword == NewPassword ) return; - sal_Bool bOldPassword = ( OldPassword.getLength() > 0 ); - sal_Bool bNewPassword = ( NewPassword.getLength() > 0 ); + sal_Bool bOldPassword = !OldPassword.isEmpty(); + sal_Bool bNewPassword = !NewPassword.isEmpty(); sal_Bool bStorage = mxStorage.is() && !pImplLib->mbLink; if( pImplLib->mbReadOnly || (bOldPassword && !pImplLib->mbPasswordProtected) ) @@ -1264,7 +1264,7 @@ bool SfxScriptLibrary::containsValidModule( const Any& aElement ) { OUString sModuleText; aElement >>= sModuleText; - return ( sModuleText.getLength() > 0 ); + return ( !sModuleText.isEmpty() ); } bool SAL_CALL SfxScriptLibrary::isLibraryElementValid( ::com::sun::star::uno::Any aElement ) const diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx index 02d01f40b960..b7bcbbb8bc26 100644 --- a/binaryurp/source/bridge.cxx +++ b/binaryurp/source/bridge.cxx @@ -327,7 +327,7 @@ css::uno::UnoInterfaceReference Bridge::registerIncomingInterface( rtl::OUString const & oid, css::uno::TypeDescription const & type) { OSL_ASSERT(type.is()); - if (oid.getLength() == 0) { + if ( oid.isEmpty() ) { return css::uno::UnoInterfaceReference(); } css::uno::UnoInterfaceReference obj(findStub(oid, type)); @@ -410,7 +410,7 @@ rtl::OUString Bridge::registerOutgoingInterface( css::uno::UnoInterfaceReference Bridge::findStub( rtl::OUString const & oid, css::uno::TypeDescription const & type) { - OSL_ASSERT(oid.getLength() != 0 && type.is()); + OSL_ASSERT(!oid.isEmpty() && type.is()); osl::MutexGuard g(mutex_); Stubs::iterator i(stubs_.find(oid)); if (i != stubs_.end()) { @@ -432,7 +432,7 @@ css::uno::UnoInterfaceReference Bridge::findStub( void Bridge::releaseStub( rtl::OUString const & oid, css::uno::TypeDescription const & type) { - OSL_ASSERT(oid.getLength() != 0 && type.is()); + OSL_ASSERT(!oid.isEmpty() && type.is()); css::uno::UnoInterfaceReference obj; bool unused; { @@ -796,7 +796,7 @@ Bridge::~Bridge() { css::uno::Reference< css::uno::XInterface > Bridge::getInstance( rtl::OUString const & sInstanceName) throw (css::uno::RuntimeException) { - if (sInstanceName.getLength() == 0) { + if ( sInstanceName.isEmpty() ) { throw css::uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( diff --git a/binaryurp/source/bridgefactory.cxx b/binaryurp/source/bridgefactory.cxx index 225068cd0b64..fa1a59a7b783 100644 --- a/binaryurp/source/bridgefactory.cxx +++ b/binaryurp/source/bridgefactory.cxx @@ -75,7 +75,7 @@ void BridgeFactory::removeBridge( OSL_ASSERT(bridge.is()); rtl::OUString n(bridge->getName()); osl::MutexGuard g(*this); - if (n.getLength() == 0) { + if ( n.isEmpty() ) { BridgeList::iterator i( std::find(unnamed_.begin(), unnamed_.end(), bridge)); if (i != unnamed_.end()) { @@ -149,7 +149,7 @@ css::uno::Reference< css::bridge::XBridge > BridgeFactory::createBridge( static_cast< cppu::OWeakObject * >(this), -1); } b.set(new Bridge(this, sName, aConnection, anInstanceProvider)); - if (sName.getLength() == 0) { + if ( sName.isEmpty() ) { unnamed_.push_back( css::uno::Reference< css::bridge::XBridge >(b.get())); } else { diff --git a/binaryurp/source/marshal.cxx b/binaryurp/source/marshal.cxx index 2ad1beedb515..d98719572f4f 100644 --- a/binaryurp/source/marshal.cxx +++ b/binaryurp/source/marshal.cxx @@ -162,7 +162,7 @@ void Marshal::writeOid( { bool found; sal_uInt16 idx; - if (oid.getLength() == 0) { + if ( oid.isEmpty() ) { found = true; idx = cache::ignore; } else { diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx index 8705019d5a9c..e32b3cf140d7 100755 --- a/binaryurp/source/reader.cxx +++ b/binaryurp/source/reader.cxx @@ -210,7 +210,7 @@ void Reader::readMessage(Unmarshal & unmarshal) { rtl::OUString oid; if (newOid) { oid = unmarshal.readOid(); - if (oid.getLength() == 0) { + if ( oid.isEmpty() ) { throw css::io::IOException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( @@ -219,7 +219,7 @@ void Reader::readMessage(Unmarshal & unmarshal) { } lastOid_ = oid; } else { - if (lastOid_.getLength() == 0) { + if ( lastOid_.isEmpty() ) { throw css::uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( diff --git a/binaryurp/source/unmarshal.cxx b/binaryurp/source/unmarshal.cxx index 7e4b8c319508..6aef9e60d3b1 100755 --- a/binaryurp/source/unmarshal.cxx +++ b/binaryurp/source/unmarshal.cxx @@ -244,8 +244,8 @@ rtl::OUString Unmarshal::readOid() { } } sal_uInt16 idx = readCacheIndex(); - if (oid.getLength() == 0 && idx != cache::ignore) { - if (state_.oidCache[idx].getLength() == 0) { + if (oid.isEmpty() && idx != cache::ignore) { + if ( state_.oidCache[idx].isEmpty() ) { throw css::io::IOException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( diff --git a/binaryurp/source/writer.cxx b/binaryurp/source/writer.cxx index a0c80ad76eca..9cfffbca126a 100755 --- a/binaryurp/source/writer.cxx +++ b/binaryurp/source/writer.cxx @@ -210,7 +210,7 @@ void Writer::sendRequest( std::vector< BinaryAny > const & inArguments, bool currentContextMode, css::uno::UnoInterfaceReference const & currentContext) { - OSL_ASSERT(tid.getLength() != 0 && oid.getLength() != 0 && member.is()); + OSL_ASSERT(tid.getLength() != 0 && !oid.isEmpty() && member.is()); css::uno::TypeDescription t(type); sal_Int32 functionId = 0; bool forceSynchronous = false; diff --git a/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx b/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx index ca964495ab3b..ea2ca3bb3300 100644 --- a/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx +++ b/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx @@ -75,7 +75,7 @@ static OString toUNOname( const OString & rRTTIname ) { if( *pRTTI == ':' || ! *pRTTI ) { - if( aRet.getLength() ) + if( !aRet.isEmpty() ) aRet += "."; aRet += rRTTIname.copy( pLast - pOrg, pRTTI - pLast ); while( *pRTTI == ':' ) @@ -109,7 +109,7 @@ static OString toRTTIname( const OString & rUNOname ) static OString toRTTImangledname( const OString & rRTTIname ) { - if( ! rRTTIname.getLength() ) + if( rRTTIname.isEmpty() ) return OString(); OStringBuffer aRet( rRTTIname.getLength()*2 ); diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx index 3dd6b104dd37..ca0b414f9ec1 100644 --- a/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx +++ b/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx @@ -77,7 +77,7 @@ static OString toUNOname( const OString & rRTTIname ) { if( *pRTTI == ':' || ! *pRTTI ) { - if( aRet.getLength() ) + if( !aRet.isEmpty() ) aRet += "."; aRet += rRTTIname.copy( pLast - pOrg, pRTTI - pLast ); while( *pRTTI == ':' ) @@ -111,7 +111,7 @@ static OString toRTTIname( const OString & rUNOname ) static OString toRTTImangledname( const OString & rRTTIname ) { - if( ! rRTTIname.getLength() ) + if( rRTTIname.isEmpty() ) return OString(); OStringBuffer aRet( rRTTIname.getLength()*2 ); diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx b/bridges/source/cpp_uno/shared/vtablefactory.cxx index 03bade8146e8..5e38562fc346 100644 --- a/bridges/source/cpp_uno/shared/vtablefactory.cxx +++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx @@ -255,9 +255,9 @@ bool VtableFactory::createBlock(Block &block, sal_Int32 slotCount) const if (aSecurity.getHomeDir(strURLDirectory)) osl::File::getSystemPathFromFileURL(strURLDirectory, strDirectory); - for (int i = strDirectory.getLength() == 0 ? 1 : 0; i < 2; ++i) + for (int i = strDirectory.isEmpty() ? 1 : 0; i < 2; ++i) { - if (!strDirectory.getLength()) + if (strDirectory.isEmpty()) strDirectory = rtl::OUString::createFromAscii("/tmp"); strDirectory += rtl::OUString::createFromAscii("/.execoooXXXXXX"); diff --git a/bridges/source/jni_uno/jni_data.cxx b/bridges/source/jni_uno/jni_data.cxx index 21558445e077..56f27161440f 100644 --- a/bridges/source/jni_uno/jni_data.cxx +++ b/bridges/source/jni_uno/jni_data.cxx @@ -1800,7 +1800,7 @@ void Bridge::map_to_java( // polymorphic struct types: rtl::OUString const & name = rtl::OUString::unacquired( &pAny->pType->pTypeName); - OSL_ASSERT(name.getLength() > 0); + OSL_ASSERT(!name.isEmpty()); if (name[name.getLength() - 1] == '>') { // Box up in com.sun.star.uno.Any: |