From 1417061d1b2c110e7e690523a544b58e7ffd05c0 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 24 Apr 2014 12:26:33 +0200 Subject: stoc: sal_Bool->bool Change-Id: Id5aaa3ddfe2cfacbe1bddcdeccb9e775ad84d858 --- stoc/source/corereflection/base.hxx | 12 ++-- stoc/source/corereflection/criface.cxx | 12 ++-- stoc/source/corereflection/lrucache.hxx | 4 +- stoc/source/defaultregistry/defaultregistry.cxx | 14 ++--- stoc/source/implementationregistration/implreg.cxx | 66 +++++++++++----------- stoc/source/inspect/introspection.cxx | 38 ++++++------- stoc/source/javavm/javavm.cxx | 4 +- stoc/source/namingservice/namingservice.cxx | 2 +- stoc/source/servicemanager/servicemanager.cxx | 12 ++-- stoc/source/typeconv/convert.cxx | 46 +++++++-------- stoc/source/uriproc/UriReference.cxx | 12 ++-- stoc/source/uriproc/UriReference.hxx | 12 ++-- 12 files changed, 117 insertions(+), 117 deletions(-) diff --git a/stoc/source/corereflection/base.hxx b/stoc/source/corereflection/base.hxx index 683809f0aaf0..29935bdb5ef2 100644 --- a/stoc/source/corereflection/base.hxx +++ b/stoc/source/corereflection/base.hxx @@ -371,7 +371,7 @@ public: // coerces to type descr pTo else queries for it: the interface pointer is returned via rDest // ## type to XidlClass coercion possible -inline sal_Bool extract( +inline bool extract( const Any & rObj, typelib_InterfaceTypeDescription * pTo, Reference< XInterface > & rDest, IdlReflectionServiceImpl * pRefl ) @@ -380,7 +380,7 @@ inline sal_Bool extract( if (0 != pTo) { if (! rObj.hasValue()) - return sal_True; + return true; if (rObj.getValueTypeClass() == TypeClass_INTERFACE) { return ::uno_type_assignData( @@ -396,10 +396,10 @@ inline sal_Bool extract( return rDest.is(); } } - return sal_False; + return false; } -inline sal_Bool coerce_assign( +inline bool coerce_assign( void * pDest, typelib_TypeDescription * pTD, const Any & rSource, IdlReflectionServiceImpl * pRefl ) { @@ -413,9 +413,9 @@ inline sal_Bool coerce_assign( *(XInterface **)pDest = xVal.get(); if (*(XInterface **)pDest) (*(XInterface **)pDest)->acquire(); - return sal_True; + return true; } - return sal_False; + return false; } else if (pTD->eTypeClass == typelib_TypeClass_ANY) { diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx index 9de48cb6d8a5..8cffc0a40e73 100644 --- a/stoc/source/corereflection/criface.cxx +++ b/stoc/source/corereflection/criface.cxx @@ -222,18 +222,18 @@ void IdlAttributeFieldImpl::set( Any & rObj, const Any & rValue ) void * pArgs[1]; void * pArg = pArgs[0] = alloca( pTD->nSize ); - sal_Bool bAssign; + bool bAssign; if (pTD->eTypeClass == typelib_TypeClass_ANY) { uno_copyAndConvertData( pArg, (const_cast< Any * >(&rValue)), pTD, getReflection()->getCpp2Uno().get() ); - bAssign = sal_True; + bAssign = true; } else if (typelib_typedescriptionreference_equals( rValue.getValueTypeRef(), pTD->pWeakRef )) { uno_copyAndConvertData( pArg, (const_cast< void * >(rValue.getValue()) ), pTD, getReflection()->getCpp2Uno().get() ); - bAssign = sal_True; + bAssign = true; } else if (pTD->eTypeClass == typelib_TypeClass_INTERFACE) { @@ -628,21 +628,21 @@ Any SAL_CALL IdlInterfaceMethodImpl::invoke( const Any & rObj, Sequence< Any > & ppUnoArgs[nPos] = alloca( pTD->nSize ); if (pParams[nPos].bIn) { - sal_Bool bAssign; + bool bAssign; if (typelib_typedescriptionreference_equals( pCppArgs[nPos].getValueTypeRef(), pTD->pWeakRef )) { uno_type_copyAndConvertData( ppUnoArgs[nPos], (void *)pCppArgs[nPos].getValue(), pCppArgs[nPos].getValueTypeRef(), getReflection()->getCpp2Uno().get() ); - bAssign = sal_True; + bAssign = true; } else if (pTD->eTypeClass == typelib_TypeClass_ANY) { uno_type_any_constructAndConvert( (uno_Any *)ppUnoArgs[nPos], (void *)pCppArgs[nPos].getValue(), pCppArgs[nPos].getValueTypeRef(), getReflection()->getCpp2Uno().get() ); - bAssign = sal_True; + bAssign = true; } else if (pTD->eTypeClass == typelib_TypeClass_INTERFACE) { diff --git a/stoc/source/corereflection/lrucache.hxx b/stoc/source/corereflection/lrucache.hxx index 16ca8aecc430..b25fc2e7ce44 100644 --- a/stoc/source/corereflection/lrucache.hxx +++ b/stoc/source/corereflection/lrucache.hxx @@ -82,7 +82,7 @@ public: @param rKey a key @return true, if value is cached */ - inline sal_Bool hasValue( const t_Key & rKey ) const; + inline bool hasValue( const t_Key & rKey ) const; /** Clears the cache, thus releasing all cached elements and keys.
*/ @@ -142,7 +142,7 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::toFront( CacheEntr } template< class t_Key, class t_Val, class t_KeyHash, class t_KeyEqual > -inline sal_Bool LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::hasValue( const t_Key & rKey ) const +inline bool LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::hasValue( const t_Key & rKey ) const { ::osl::MutexGuard aGuard( _aCacheMutex ); const typename t_Key2Element::const_iterator iFind( _aKey2Element.find( rKey ) ); diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx index 35d351a4e726..631c1d49f696 100644 --- a/stoc/source/defaultregistry/defaultregistry.cxx +++ b/stoc/source/defaultregistry/defaultregistry.cxx @@ -822,7 +822,7 @@ Sequence< Reference< XRegistryKey > > SAL_CALL NestedKeyImpl::openKeys( ) } Sequence< Reference > retSeq(local + def - len); - sal_Bool insert = sal_True; + bool insert = true; OUString name; sal_Int32 lastIndex; @@ -838,14 +838,14 @@ Sequence< Reference< XRegistryKey > > SAL_CALL NestedKeyImpl::openKeys( ) sal_uInt32 k = local; for (i=0; i < def; i++) { - insert = sal_True; + insert = true; for (j=0 ; j < local; j++) { if ( retSeq.getConstArray()[j]->getKeyName() == defaultSeq.getConstArray()[i] ) { - insert = sal_False; + insert = false; break; } } @@ -902,7 +902,7 @@ Sequence< OUString > SAL_CALL NestedKeyImpl::getKeyNames( ) } Sequence retSeq(local + def - len); - sal_Bool insert = sal_True; + bool insert = true; for (i=0; i < local; i++) { @@ -912,13 +912,13 @@ Sequence< OUString > SAL_CALL NestedKeyImpl::getKeyNames( ) sal_uInt32 k = local; for (i=0; i < def; i++) { - insert = sal_True; + insert = true; for (j=0 ; j < local; j++) { if ( retSeq.getConstArray()[j] == defaultSeq.getConstArray()[i] ) { - insert = sal_False; + insert = false; break; } } @@ -936,7 +936,7 @@ sal_Bool SAL_CALL NestedKeyImpl::createLink( const OUString& aLinkName, const OU { Guard< Mutex > aGuard( m_pRegistry->m_mutex ); - sal_Bool isCreated = sal_False; + bool isCreated = false; if ( !m_localKey.is() && !m_defaultKey.is() ) { throw InvalidRegistryException(); diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx index 3174547fe2d2..306fc72d04e5 100644 --- a/stoc/source/implementationregistration/implreg.cxx +++ b/stoc/source/implementationregistration/implreg.cxx @@ -201,7 +201,7 @@ static void prepareLink( const Reference < XSimpleRegistry > & xDest, { OUString linkRefName = xSource->getKeyName(); OUString linkName(link); - sal_Bool isRelativ = sal_False; + bool isRelativ = false; const sal_Unicode* pTmpName = link.getStr(); const sal_Unicode* pShortName; @@ -212,7 +212,7 @@ static void prepareLink( const Reference < XSimpleRegistry > & xDest, pShortName = pTmpName+nIndex; if (pTmpName[0] != L'/') - isRelativ = sal_True; + isRelativ = true; while (pShortName && pShortName[1] == L'%') { @@ -333,7 +333,7 @@ static void createUniqueSubEntry(const Reference < XRegistryKey > & xSuperKey, if (xSuperKey->getValueType() == RegistryValueType_ASCIILIST) { sal_Int32 length = 0; - sal_Bool bReady = sal_False; + bool bReady = false; Sequence implEntries = xSuperKey->getAsciiListValue(); length = implEntries.getLength(); @@ -383,7 +383,7 @@ static void createUniqueSubEntry(const Reference < XRegistryKey > & xSuperKey, // static deleteSubEntry -static sal_Bool deleteSubEntry(const Reference < XRegistryKey >& xSuperKey, const OUString& value) +static bool deleteSubEntry(const Reference < XRegistryKey >& xSuperKey, const OUString& value) // throw ( InvalidRegistryException, RuntimeException ) { if (xSuperKey->getValueType() == RegistryValueType_ASCIILIST) @@ -391,7 +391,7 @@ static sal_Bool deleteSubEntry(const Reference < XRegistryKey >& xSuperKey, cons Sequence implEntries = xSuperKey->getAsciiListValue(); sal_Int32 length = implEntries.getLength(); sal_Int32 equals = 0; - sal_Bool hasNoImplementations = sal_False; + bool hasNoImplementations = false; for (sal_Int32 i = 0; i < length; i++) { @@ -401,7 +401,7 @@ static sal_Bool deleteSubEntry(const Reference < XRegistryKey >& xSuperKey, cons if (equals == length) { - hasNoImplementations = sal_True; + hasNoImplementations = true; } else { Sequence implEntriesNew(length - equals); @@ -419,10 +419,10 @@ static sal_Bool deleteSubEntry(const Reference < XRegistryKey >& xSuperKey, cons if (hasNoImplementations) { - return sal_True; + return true; } } - return sal_False; + return false; } @@ -489,7 +489,7 @@ static void deleteUserLink(const Reference < XRegistryKey >& xRootKey, const OUString& implName) // throw ( InvalidRegistryException, RuntimeException ) { - sal_Bool bClean = sal_False; + bool bClean = false; if (xRootKey->getKeyType(linkName) == RegistryKeyType_LINK) { @@ -505,7 +505,7 @@ static void deleteUserLink(const Reference < XRegistryKey >& xRootKey, linkName + spool().colon_old ); if (xOldKey.is()) { - sal_Bool hasNoImplementations = sal_False; + bool hasNoImplementations = false; if (xOldKey->getValueType() == RegistryValueType_ASCIILIST) { @@ -521,7 +521,7 @@ static void deleteUserLink(const Reference < XRegistryKey >& xRootKey, if (equals == length) { - hasNoImplementations = sal_True; + hasNoImplementations = true; } else { OUString oldImpl; @@ -531,7 +531,7 @@ static void deleteUserLink(const Reference < XRegistryKey >& xRootKey, Sequence implEntriesNew(length - equals - 1); sal_Int32 j = 0; - sal_Bool first = sal_True; + bool first = true; for (sal_Int32 i = 0; i < length; i++) { if (implEntries.getConstArray()[i] != implName) @@ -539,7 +539,7 @@ static void deleteUserLink(const Reference < XRegistryKey >& xRootKey, if (first) { oldImpl = implEntries.getConstArray()[i]; - first = sal_False; + first = false; } else { implEntriesNew.getArray()[j++] = implEntries.getConstArray()[i]; @@ -565,8 +565,8 @@ static void deleteUserLink(const Reference < XRegistryKey >& xRootKey, if (hasNoImplementations) { - bClean = sal_True; - hasNoImplementations = sal_False; + bClean = true; + hasNoImplementations = false; OUString path(xOldKey->getKeyName()); xOldKey->closeKey(); xRootKey->deleteKey(path); @@ -574,7 +574,7 @@ static void deleteUserLink(const Reference < XRegistryKey >& xRootKey, } } else { - bClean = sal_True; + bClean = true; } if (bClean) @@ -592,9 +592,9 @@ static void prepareUserKeys(const Reference < XSimpleRegistry >& xDest, const Reference < XRegistryKey >& xUnoKey, const Reference < XRegistryKey >& xKey, const OUString& implName, - sal_Bool bRegister) + bool bRegister) { - sal_Bool hasSubKeys = sal_False; + bool hasSubKeys = false; Sequence keyNames = xKey->getKeyNames(); @@ -605,7 +605,7 @@ static void prepareUserKeys(const Reference < XSimpleRegistry >& xDest, if (keyNames.getLength() == 1 && xKey->getKeyType(relativKey) == RegistryKeyType_LINK) { - hasSubKeys = sal_True; + hasSubKeys = true; OUString linkTarget = xKey->getLinkTarget(relativKey); OUString linkName(xKey->getKeyName().copy(xUnoKey->getKeyName().getLength())); @@ -625,7 +625,7 @@ static void prepareUserKeys(const Reference < XSimpleRegistry >& xDest, if (subKeys.getLength()) { - hasSubKeys = sal_True; + hasSubKeys = true; const Reference < XRegistryKey > * pSubKeys = subKeys.getConstArray(); for (sal_Int32 i = 0; i < subKeys.getLength(); i++) @@ -677,7 +677,7 @@ static void deleteAllImplementations( const Reference < XSimpleRegistry >& xRe { const Reference < XRegistryKey> * pSubKeys = subKeys.getConstArray(); Reference < XRegistryKey > xImplKey; - sal_Bool hasLocationUrl = sal_False; + bool hasLocationUrl = false; const StringPool &pool = spool(); for (sal_Int32 i = 0; i < subKeys.getLength(); i++) @@ -690,7 +690,7 @@ static void deleteAllImplementations( const Reference < XSimpleRegistry >& xRe { if (xKey->getAsciiValue() == locationUrl) { - hasLocationUrl = sal_True; + hasLocationUrl = true; OUString implName(xImplKey->getKeyName().getStr() + 1); sal_Int32 firstDot = implName.indexOf('/'); @@ -719,7 +719,7 @@ static void deleteAllImplementations( const Reference < XSimpleRegistry >& xRe pSubKeys2[j]->getKeyName() != (xImplKey->getKeyName() + pool.slash_UNO_slash_SINGLETONS ) && pSubKeys2[j]->getKeyName() != (xImplKey->getKeyName() + pool.slash_UNO_slash_LOCATION) ) { - prepareUserKeys(xReg, xKey, pSubKeys2[j], implName, sal_False); + prepareUserKeys(xReg, xKey, pSubKeys2[j], implName, false); } } } @@ -729,7 +729,7 @@ static void deleteAllImplementations( const Reference < XSimpleRegistry >& xRe if (hasLocationUrl) { - hasLocationUrl = sal_False; + hasLocationUrl = false; OUString path(xImplKey->getKeyName()); xImplKey->closeKey(); xReg->getRootKey()->deleteKey(path); @@ -828,7 +828,7 @@ static void deleteAllServiceEntries( const Reference < XSimpleRegistry >& xRe { const Reference < XRegistryKey > * pSubKeys = subKeys.getConstArray(); Reference < XRegistryKey > xServiceKey; - sal_Bool hasNoImplementations = sal_False; + bool hasNoImplementations = false; for (sal_Int32 i = 0; i < subKeys.getLength(); i++) { @@ -848,7 +848,7 @@ static void deleteAllServiceEntries( const Reference < XSimpleRegistry >& xRe if (equals == length) { - hasNoImplementations = sal_True; + hasNoImplementations = true; } else { if (equals > 0) @@ -871,7 +871,7 @@ static void deleteAllServiceEntries( const Reference < XSimpleRegistry >& xRe if (hasNoImplementations) { - hasNoImplementations = sal_False; + hasNoImplementations = false; OUString path(xServiceKey->getKeyName()); xServiceKey->closeKey(); xReg->getRootKey()->deleteKey(path); @@ -1107,7 +1107,7 @@ static void prepareRegistry( pSubKeys2[j]->getKeyName() != (xImplKey->getKeyName() + pool.slash_UNO_slash_REGISTRY_LINKS ) && pSubKeys2[j]->getKeyName() != (xImplKey->getKeyName() + pool.slash_UNO_slash_SINGLETONS )) { - prepareUserKeys(xDest, xKey, pSubKeys2[j], implName, sal_True); + prepareUserKeys(xDest, xKey, pSubKeys2[j], implName, true); } } } @@ -1156,7 +1156,7 @@ static void prepareRegistry( static void findImplementations( const Reference < XRegistryKey > & xSource, std::list & implNames) { - sal_Bool isImplKey = sal_False; + bool isImplKey = false; try { @@ -1165,7 +1165,7 @@ static void findImplementations( const Reference < XRegistryKey > & xSource, if (xKey.is() && (xKey->getKeyNames().getLength() > 0)) { - isImplKey = sal_True; + isImplKey = true; OUString implName = OUString(xSource->getKeyName().getStr() + 1).replace('/', '.').getStr(); sal_Int32 firstDot = implName.indexOf('.'); @@ -1555,7 +1555,7 @@ sal_Bool ImplementationRegistration::revokeImplementation(const OUString& locati const Reference < XSimpleRegistry >& xReg) throw ( RuntimeException, std::exception ) { - sal_Bool ret = sal_False; + bool ret = false; Reference < XSimpleRegistry > xRegistry; @@ -1583,7 +1583,7 @@ sal_Bool ImplementationRegistration::revokeImplementation(const OUString& locati try { doRevoke(xRegistry, location); - ret = sal_True; + ret = true; } catch( InvalidRegistryException & ) { @@ -1763,7 +1763,7 @@ void ImplementationRegistration::doRegister( xSourceKey = xReg->getRootKey()->createKey( spool().slash_IMPLEMENTATIONS ); } - sal_Bool bSuccess = + bool bSuccess = xAct->writeRegistryInfo(xSourceKey, implementationLoaderUrl, locationUrl); if ( bSuccess ) { diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index edcb73930351..0198c419eae3 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -92,7 +92,7 @@ typedef WeakImplHelper3< XIntrospectionAccess, XMaterialHolder, XExactName > Int // Method to assert, if a class is derived from another class -sal_Bool isDerivedFrom( Reference xToTestClass, Reference xDerivedFromClass ) +bool isDerivedFrom( Reference xToTestClass, Reference xDerivedFromClass ) { Sequence< Reference > aClassesSeq = xToTestClass->getSuperclasses(); const Reference* pClassesArray = aClassesSeq.getConstArray(); @@ -105,10 +105,10 @@ sal_Bool isDerivedFrom( Reference xToTestClass, Reference if ( xDerivedFromClass->equals( rxClass ) || isDerivedFrom( rxClass, xDerivedFromClass ) ) - return sal_True; + return true; } - return sal_False; + return false; } @@ -146,7 +146,7 @@ struct hashName_Impl struct eqName_Impl { - sal_Bool operator()(const OUString& Str1, const OUString& Str2) const + bool operator()(const OUString& Str1, const OUString& Str2) const { return ( Str1 == Str2 ); } @@ -212,7 +212,7 @@ class IntrospectionAccessStatic_Impl: public salhelper::SimpleReferenceObject sal_Int32 mnMethodPropCount; // Flag, if a FastPropertySet is supported - sal_Bool mbFastPropSet; + bool mbFastPropSet; // Original-Handles of FastPropertySets sal_Int32* mpOrgPropertyHandleArray; @@ -277,7 +277,7 @@ IntrospectionAccessStatic_Impl::IntrospectionAccessStatic_Impl( Reference< XIdlR maMapTypeSeq.realloc( ARRAY_SIZE_STEP ); maPropertyConceptSeq.realloc( ARRAY_SIZE_STEP ); - mbFastPropSet = sal_False; + mbFastPropSet = false; mpOrgPropertyHandleArray = NULL; mnPropCount = 0; @@ -423,7 +423,7 @@ void IntrospectionAccessStatic_Impl::setPropertyValueByIndex(const Any& obj, sal const Property& rProp = maAllPropertySeq.getConstArray()[ nSequenceIndex ]; // Convert Interface-Parameter to the correct type - sal_Bool bUseCopy = sal_False; + bool bUseCopy = false; Any aRealValue; TypeClass eValType = aValue.getValueType().getTypeClass(); @@ -441,7 +441,7 @@ void IntrospectionAccessStatic_Impl::setPropertyValueByIndex(const Any& obj, sal //Any queryInterface( const Type& rType ); aRealValue = valInterface->queryInterface( aPropType ); if( aRealValue.hasValue() ) - bUseCopy = sal_True; + bUseCopy = true; } } } @@ -1179,7 +1179,7 @@ Property ImplIntrospectionAccess::getProperty(const OUString& Name, sal_Int32 Pr { Property aRet; sal_Int32 i = mpStaticImpl->getPropertyIndex( Name ); - sal_Bool bFound = sal_False; + bool bFound = false; if( i != -1 ) { sal_Int32 nConcept = mpStaticImpl->getPropertyConcepts().getConstArray()[ i ]; @@ -1187,7 +1187,7 @@ Property ImplIntrospectionAccess::getProperty(const OUString& Name, sal_Int32 Pr { const Property* pProps = mpStaticImpl->getProperties().getConstArray(); aRet = pProps[ i ]; - bFound = sal_True; + bFound = true; } } if( !bFound ) @@ -1199,12 +1199,12 @@ sal_Bool ImplIntrospectionAccess::hasProperty(const OUString& Name, sal_Int32 Pr throw( RuntimeException, std::exception ) { sal_Int32 i = mpStaticImpl->getPropertyIndex( Name ); - sal_Bool bRet = sal_False; + bool bRet = false; if( i != -1 ) { sal_Int32 nConcept = mpStaticImpl->getPropertyConcepts().getConstArray()[ i ]; if( (PropertyConcepts & nConcept) != 0 ) - bRet = sal_True; + bRet = true; } return bRet; } @@ -1290,12 +1290,12 @@ sal_Bool ImplIntrospectionAccess::hasMethod(const OUString& Name, sal_Int32 Meth throw( RuntimeException, std::exception ) { sal_Int32 i = mpStaticImpl->getMethodIndex( Name ); - sal_Bool bRet = sal_False; + bool bRet = false; if( i != -1 ) { sal_Int32 nConcept = mpStaticImpl->getMethodConcepts().getConstArray()[ i ]; if( (MethodConcepts & nConcept) != 0 ) - bRet = sal_True; + bRet = true; } return bRet; } @@ -1753,7 +1753,7 @@ css::uno::Reference Implementation::inspect( { // Gibt es auch ein FastPropertySet? Reference xDummy = Reference::query( x ); - sal_Bool bFast = pAccess->mbFastPropSet = xDummy.is(); + bool bFast = pAccess->mbFastPropSet = xDummy.is(); Sequence aPropSeq = xPropSetInfo->getProperties(); const Property* pProps = aPropSeq.getConstArray(); @@ -1814,12 +1814,12 @@ css::uno::Reference Implementation::inspect( // Flag, ob XInterface-Methoden erfasst werden sollen // (das darf nur einmal erfolgen, initial zulassen) - sal_Bool bXInterfaceIsInvalid = sal_False; + bool bXInterfaceIsInvalid = false; // Flag, ob die XInterface-Methoden schon erfasst wurden. Wenn sal_True, // wird bXInterfaceIsInvalid am Ende der Iface-Schleife aktiviert und // XInterface-Methoden werden danach abgeklemmt. - sal_Bool bFoundXInterface = sal_False; + bool bFoundXInterface = false; sal_Int32 nClassCount = SupportedClassSeq.getLength(); for( sal_Int32 nIdx = 0 ; nIdx < nClassCount; nIdx++ ) @@ -1951,7 +1951,7 @@ css::uno::Reference Implementation::inspect( rtl::OUString className( rxMethod_i->getDeclaringClass()->getName()); if (className == "com.sun.star.uno.XInterface") { - bFoundXInterface = sal_True; + bFoundXInterface = true; if( bXInterfaceIsInvalid ) { @@ -2407,7 +2407,7 @@ css::uno::Reference Implementation::inspect( // Wenn in diesem Durchlauf XInterface-Methoden // dabei waren, diese zukuenftig ignorieren if( bFoundXInterface ) - bXInterfaceIsInvalid = sal_True; + bXInterfaceIsInvalid = true; delete[] pMethodTypes; delete[] pLocalMethodConcepts; diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index e38367c98858..035447d9d1cb 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -461,7 +461,7 @@ void getJavaPropsFromSafetySettings( OUString("VirtualMachine/Security")); if( key_CheckSecurity.is()) { - sal_Bool val= (sal_Bool) key_CheckSecurity->getLongValue(); + bool val = (bool) key_CheckSecurity->getLongValue(); OUString sProperty("stardiv.security.disableSecurity="); if( val) sProperty= sProperty + "false"; @@ -1136,7 +1136,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( else if ( aAccessor == "Security" ) { aPropertyName = "stardiv.security.disableSecurity"; - sal_Bool b = sal_Bool(); + bool b; if (rEvent.Element >>= b) if (b) aPropertyValue = "false"; diff --git a/stoc/source/namingservice/namingservice.cxx b/stoc/source/namingservice/namingservice.cxx index 016bb9a27a57..4f95f48c988b 100644 --- a/stoc/source/namingservice/namingservice.cxx +++ b/stoc/source/namingservice/namingservice.cxx @@ -63,7 +63,7 @@ static OUString ns_getImplementationName() struct equalOWString_Impl { - sal_Bool operator()(const OUString & s1, const OUString & s2) const + bool operator()(const OUString & s1, const OUString & s2) const { return s1 == s2; } }; diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index fd42e730099e..4d5ab2cd090a 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -292,7 +292,7 @@ Any ImplementationEnumeration_Impl::nextElement() *****************************************************************************/ struct equalOWString_Impl { - sal_Bool operator()(const OUString & s1, const OUString & s2) const + bool operator()(const OUString & s1, const OUString & s2) const { return s1 == s2; } }; @@ -456,7 +456,7 @@ protected: inline void check_undisposed() const SAL_THROW( (lang::DisposedException) ); virtual void SAL_CALL disposing() SAL_OVERRIDE; - sal_Bool haveFactoryWithThisImplementation(const OUString& aImplName); + bool haveFactoryWithThisImplementation(const OUString& aImplName); virtual Sequence< Reference< XInterface > > queryServiceFactories( const OUString& aServiceName, Reference< XComponentContext > const & xContext ); @@ -1232,7 +1232,7 @@ void OServiceManager::insert( const Any & Element ) } // helper function -sal_Bool OServiceManager::haveFactoryWithThisImplementation(const OUString& aImplName) +bool OServiceManager::haveFactoryWithThisImplementation(const OUString& aImplName) { return ( m_ImplementationNameMap.find(aImplName) != m_ImplementationNameMap.end()); } @@ -1374,7 +1374,7 @@ private: const OUString & rImplName, Reference< XComponentContext > const & xContext ); void fillAllNamesFromRegistry( HashSet_OWString & ); - sal_Bool m_searchedRegistry; + bool m_searchedRegistry; Reference m_xRegistry; // readonly property Registry Reference m_xRootKey; @@ -1388,7 +1388,7 @@ private: */ ORegistryServiceManager::ORegistryServiceManager( Reference< XComponentContext > const & xContext ) : OServiceManager( xContext ) - , m_searchedRegistry(sal_False) + , m_searchedRegistry(false) #if OSL_DEBUG_LEVEL > 0 , m_init( false ) #endif @@ -1431,7 +1431,7 @@ Reference ORegistryServiceManager::getRootKey() if( !m_xRegistry.is() && !m_searchedRegistry ) { // merken, es wird nur einmal gesucht - m_searchedRegistry = sal_True; + m_searchedRegistry = true; m_xRegistry.set( createInstanceWithContext( diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index beeddc3e5b58..5c8b76dd2eb0 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -101,7 +101,7 @@ static inline double unsigned_int64_to_double( sal_uInt64 n ) SAL_THROW(()) static inline double round( double aVal ) { - sal_Bool bPos = (aVal >= 0.0); + bool bPos = (aVal >= 0.0); aVal = ::fabs( aVal ); double aUpper = ::ceil( aVal ); @@ -110,7 +110,7 @@ static inline double round( double aVal ) } -static sal_Bool getNumericValue( double & rfVal, const OUString & rStr ) +static bool getNumericValue( double & rfVal, const OUString & rStr ) { double fRet = rStr.toDouble(); if (fRet == 0.0) @@ -119,7 +119,7 @@ static sal_Bool getNumericValue( double & rfVal, const OUString & rStr ) if (!nLen || (nLen == 1 && rStr[0] == '0')) // common case { rfVal = 0.0; - return sal_True; + return true; } OUString trim( rStr.trim() ); @@ -131,18 +131,18 @@ static sal_Bool getNumericValue( double & rfVal, const OUString & rStr ) if (nX > 0 && trim[nX-1] == '0') // 0x { - sal_Bool bNeg = sal_False; + bool bNeg = false; switch (nX) { case 2: // (+|-)0x... if (trim[0] == '-') - bNeg = sal_True; + bNeg = true; else if (trim[0] != '+') - return sal_False; + return false; case 1: // 0x... break; default: - return sal_False; + return false; } OUString aHexRest( trim.copy( nX+1 ) ); @@ -153,12 +153,12 @@ static sal_Bool getNumericValue( double & rfVal, const OUString & rStr ) for ( sal_Int32 nPos = aHexRest.getLength(); nPos--; ) { if (aHexRest[nPos] != '0') - return sal_False; + return false; } } rfVal = (bNeg ? -(double)nRet : (double)nRet); - return sal_True; + return true; } nLen = trim.getLength(); @@ -173,12 +173,12 @@ static sal_Bool getNumericValue( double & rfVal, const OUString & rStr ) if (trim[nPos] != '0') { if (trim[nPos] != '.') - return sal_False; + return false; ++nPos; while (nPos < nLen) // skip trailing zeros { if (trim[nPos] != '0') - return sal_False; + return false; ++nPos; } break; @@ -187,17 +187,17 @@ static sal_Bool getNumericValue( double & rfVal, const OUString & rStr ) } } rfVal = fRet; - return sal_True; + return true; } -static sal_Bool getHyperValue( sal_Int64 & rnVal, const OUString & rStr ) +static bool getHyperValue( sal_Int64 & rnVal, const OUString & rStr ) { sal_Int32 nLen = rStr.getLength(); if (!nLen || (nLen == 1 && rStr[0] == '0')) // common case { rnVal = 0; - return sal_True; + return true; } OUString trim( rStr.trim() ); @@ -211,18 +211,18 @@ static sal_Bool getHyperValue( sal_Int64 & rnVal, const OUString & rStr ) { if (nX > 0 && trim[nX-1] == '0') // 0x { - sal_Bool bNeg = sal_False; + bool bNeg = false; switch (nX) { case 2: // (+|-)0x... if (trim[0] == '-') - bNeg = sal_True; + bNeg = true; else if (trim[0] != '+') - return sal_False; + return false; case 1: // 0x... break; default: - return sal_False; + return false; } OUString aHexRest( trim.copy( nX+1 ) ); @@ -233,14 +233,14 @@ static sal_Bool getHyperValue( sal_Int64 & rnVal, const OUString & rStr ) for ( sal_Int32 nPos = aHexRest.getLength(); nPos--; ) { if (aHexRest[nPos] != '0') - return sal_False; + return false; } } rnVal = (bNeg ? -static_cast(nRet) : nRet); - return sal_True; + return true; } - return sal_False; + return false; } double fVal; @@ -249,9 +249,9 @@ static sal_Bool getHyperValue( sal_Int64 & rnVal, const OUString & rStr ) fVal <= DOUBLE_SAL_UINT64_MAX) { rnVal = (sal_Int64)round( fVal ); - return sal_True; + return true; } - return sal_False; + return false; } diff --git a/stoc/source/uriproc/UriReference.cxx b/stoc/source/uriproc/UriReference.cxx index a671aee07de3..be6cbe826c2a 100644 --- a/stoc/source/uriproc/UriReference.cxx +++ b/stoc/source/uriproc/UriReference.cxx @@ -67,7 +67,7 @@ OUString UriReference::getUriReference() throw (css::uno::RuntimeException) return buf.makeStringAndClear(); } -sal_Bool UriReference::isAbsolute() throw (css::uno::RuntimeException) { +bool UriReference::isAbsolute() throw (css::uno::RuntimeException) { return !m_scheme.isEmpty(); } @@ -84,12 +84,12 @@ OUString UriReference::getSchemeSpecificPart() return buf.makeStringAndClear(); } -sal_Bool UriReference::isHierarchical() throw (css::uno::RuntimeException) { +bool UriReference::isHierarchical() throw (css::uno::RuntimeException) { osl::MutexGuard g(m_mutex); return m_isHierarchical; } -sal_Bool UriReference::hasAuthority() throw (css::uno::RuntimeException) { +bool UriReference::hasAuthority() throw (css::uno::RuntimeException) { osl::MutexGuard g(m_mutex); return m_hasAuthority; } @@ -104,7 +104,7 @@ OUString UriReference::getPath() throw (css::uno::RuntimeException) { return m_path; } -sal_Bool UriReference::hasRelativePath() throw (css::uno::RuntimeException) { +bool UriReference::hasRelativePath() throw (css::uno::RuntimeException) { osl::MutexGuard g(m_mutex); return m_isHierarchical && !m_hasAuthority && (m_path.isEmpty() || m_path[0] != '/'); @@ -147,7 +147,7 @@ OUString UriReference::getPathSegment(sal_Int32 index) return OUString(); } -sal_Bool UriReference::hasQuery() throw (css::uno::RuntimeException) { +bool UriReference::hasQuery() throw (css::uno::RuntimeException) { osl::MutexGuard g(m_mutex); return m_hasQuery; } @@ -157,7 +157,7 @@ OUString UriReference::getQuery() throw (css::uno::RuntimeException) { return m_query; } -sal_Bool UriReference::hasFragment() throw (css::uno::RuntimeException) { +bool UriReference::hasFragment() throw (css::uno::RuntimeException) { osl::MutexGuard g(m_mutex); return m_hasFragment; } diff --git a/stoc/source/uriproc/UriReference.hxx b/stoc/source/uriproc/UriReference.hxx index f6037a2325ea..1c48aebd17ab 100644 --- a/stoc/source/uriproc/UriReference.hxx +++ b/stoc/source/uriproc/UriReference.hxx @@ -40,22 +40,22 @@ public: OUString getUriReference() throw (com::sun::star::uno::RuntimeException); - sal_Bool isAbsolute() throw (com::sun::star::uno::RuntimeException); + bool isAbsolute() throw (com::sun::star::uno::RuntimeException); OUString getScheme() throw (com::sun::star::uno::RuntimeException); OUString getSchemeSpecificPart() throw (com::sun::star::uno::RuntimeException); - sal_Bool isHierarchical() throw (com::sun::star::uno::RuntimeException); + bool isHierarchical() throw (com::sun::star::uno::RuntimeException); - sal_Bool hasAuthority() throw (com::sun::star::uno::RuntimeException); + bool hasAuthority() throw (com::sun::star::uno::RuntimeException); OUString getAuthority() throw (com::sun::star::uno::RuntimeException); OUString getPath() throw (com::sun::star::uno::RuntimeException); - sal_Bool hasRelativePath() throw (com::sun::star::uno::RuntimeException); + bool hasRelativePath() throw (com::sun::star::uno::RuntimeException); sal_Int32 getPathSegmentCount() throw (com::sun::star::uno::RuntimeException); @@ -63,11 +63,11 @@ public: OUString getPathSegment(sal_Int32 index) throw (com::sun::star::uno::RuntimeException); - sal_Bool hasQuery() throw (com::sun::star::uno::RuntimeException); + bool hasQuery() throw (com::sun::star::uno::RuntimeException); OUString getQuery() throw (com::sun::star::uno::RuntimeException); - sal_Bool hasFragment() throw (com::sun::star::uno::RuntimeException); + bool hasFragment() throw (com::sun::star::uno::RuntimeException); OUString getFragment() throw (com::sun::star::uno::RuntimeException); -- cgit