diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-16 20:57:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-17 17:55:18 +0100 |
commit | 7f902e1697d077dd4a32846ff85f6134a556d528 (patch) | |
tree | 4af1cdaf3edf03680641be6af0b512181a658739 | |
parent | 34a44156b3983849749d82b90d82b84aeb538aae (diff) |
cppuhelper: sal_Bool -> bool
Change-Id: I6e0e6c1e4880a652ea4d8f0cccf9d8103c2cbbef
-rw-r--r-- | cppuhelper/source/component.cxx | 4 | ||||
-rw-r--r-- | cppuhelper/source/factory.cxx | 26 | ||||
-rw-r--r-- | cppuhelper/source/implbase.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/implementationentry.cxx | 4 | ||||
-rw-r--r-- | cppuhelper/source/interfacecontainer.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/propshlp.cxx | 4 | ||||
-rw-r--r-- | include/cppuhelper/proptypehlp.hxx | 30 |
7 files changed, 36 insertions, 36 deletions
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx index c178e986fcc7..6d13d89355a6 100644 --- a/cppuhelper/source/component.cxx +++ b/cppuhelper/source/component.cxx @@ -148,14 +148,14 @@ void OComponentHelper::dispose() // Guard dispose against multible threading // Remark: It is an error to call dispose more than once - sal_Bool bDoDispose = sal_False; + bool bDoDispose = false; { MutexGuard aGuard( rBHelper.rMutex ); if( !rBHelper.bDisposed && !rBHelper.bInDispose ) { // only one call go into this section rBHelper.bInDispose = sal_True; - bDoDispose = sal_True; + bDoDispose = true; } } diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index b0b7e7bd9ea6..85a231880a2b 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -275,7 +275,7 @@ public: ComponentInstantiation pCreateFunction_, ComponentFactoryFunc fptr, const Sequence< OUString > * pServiceNames_, - sal_Bool bOneInstance_ = sal_False ) + bool bOneInstance_ = false ) SAL_THROW(()) : OComponentHelper( aMutex ) , OSingleFactoryHelper( rServiceManager, rImplementationName_, pCreateFunction_, fptr, pServiceNames_ ) @@ -322,11 +322,11 @@ public: private: Reference<XInterface > xTheInstance; - sal_Bool bOneInstance; + bool bOneInstance; protected: // needed for implementing XUnloadingPreference in inheriting classes - sal_Bool isOneInstance() {return bOneInstance;} - sal_Bool isInstance() {return xTheInstance.is();} + bool isOneInstance() {return bOneInstance;} + bool isInstance() {return xTheInstance.is();} }; @@ -494,7 +494,7 @@ public: const Reference<XMultiServiceFactory > & rServiceManager, const OUString & rImplementationName_, const Reference<XRegistryKey > & xImplementationKey_, - sal_Bool bOneInstance_ = sal_False ) SAL_THROW(()) + bool bOneInstance_ = false ) SAL_THROW(()) : OFactoryComponentHelper( rServiceManager, rImplementationName_, 0, 0, 0, bOneInstance_ ), OPropertySetHelper( OComponentHelper::rBHelper ), @@ -868,10 +868,10 @@ Sequence< OUString > ORegistryFactoryHelper::getSupportedServiceNames(void) sal_Bool SAL_CALL ORegistryFactoryHelper::releaseOnNotification() throw(::com::sun::star::uno::RuntimeException) { - sal_Bool retVal= sal_True; + bool retVal= true; if( isOneInstance() && isInstance()) { - retVal= sal_False; + retVal= false; } else if( ! isOneInstance()) { @@ -986,7 +986,7 @@ Reference<XSingleServiceFactory > SAL_CALL createSingleFactory( SAL_THROW(()) { return new OFactoryComponentHelper( - rServiceManager, rImplementationName, pCreateFunction, 0, &rServiceNames, sal_False ); + rServiceManager, rImplementationName, pCreateFunction, 0, &rServiceNames, false ); } // global function @@ -1008,7 +1008,7 @@ Reference<XSingleServiceFactory > SAL_CALL createOneInstanceFactory( SAL_THROW(()) { return new OFactoryComponentHelper( - rServiceManager, rImplementationName, pCreateFunction, 0, &rServiceNames, sal_True ); + rServiceManager, rImplementationName, pCreateFunction, 0, &rServiceNames, true ); } // global function @@ -1019,7 +1019,7 @@ Reference<XSingleServiceFactory > SAL_CALL createSingleRegistryFactory( SAL_THROW(()) { return new ORegistryFactoryHelper( - rServiceManager, rImplementationName, rImplementationKey, sal_False ); + rServiceManager, rImplementationName, rImplementationKey, false ); } // global function @@ -1030,7 +1030,7 @@ Reference<XSingleServiceFactory > SAL_CALL createOneInstanceRegistryFactory( SAL_THROW(()) { return new ORegistryFactoryHelper( - rServiceManager, rImplementationName, rImplementationKey, sal_True ); + rServiceManager, rImplementationName, rImplementationKey, true ); } //################################################################################################## @@ -1042,7 +1042,7 @@ Reference< lang::XSingleComponentFactory > SAL_CALL createSingleComponentFactory SAL_THROW(()) { return new OFactoryComponentHelper( - Reference< XMultiServiceFactory >(), rImplementationName, 0, fptr, &rServiceNames, sal_False ); + Reference< XMultiServiceFactory >(), rImplementationName, 0, fptr, &rServiceNames, false ); } Reference< lang::XSingleComponentFactory > SAL_CALL createOneInstanceComponentFactory( @@ -1053,7 +1053,7 @@ Reference< lang::XSingleComponentFactory > SAL_CALL createOneInstanceComponentFa SAL_THROW(()) { return new OFactoryComponentHelper( - Reference< XMultiServiceFactory >(), rImplementationName, 0, fptr, &rServiceNames, sal_True ); + Reference< XMultiServiceFactory >(), rImplementationName, 0, fptr, &rServiceNames, true ); } } diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx index a4e46c6b7ad0..983622ca5bfd 100644 --- a/cppuhelper/source/implbase.cxx +++ b/cppuhelper/source/implbase.cxx @@ -157,7 +157,7 @@ Sequence< sal_Int8 > ClassData::getImplementationId() SAL_THROW(()) } //-------------------------------------------------------------------------------------------------- -static inline sal_Bool td_equals( +static inline bool td_equals( typelib_TypeDescription * pTD, typelib_TypeDescriptionReference * pType ) SAL_THROW(()) { diff --git a/cppuhelper/source/implementationentry.cxx b/cppuhelper/source/implementationentry.cxx index aa587fc59d29..6b10eaca41f5 100644 --- a/cppuhelper/source/implementationentry.cxx +++ b/cppuhelper/source/implementationentry.cxx @@ -31,7 +31,7 @@ sal_Bool component_writeInfoHelper( SAL_UNUSED_PARAMETER void *, void * pRegistryKey, ImplementationEntry const * entries) { - sal_Bool bRet = sal_False; + bool bRet = false; try { if( pRegistryKey ) @@ -47,7 +47,7 @@ sal_Bool component_writeInfoHelper( for ( sal_Int32 nPos = 0 ; nPos < seq.getLength(); nPos ++ ) xNewKey->createKey( pArray[nPos] ); } - bRet = sal_True; + bRet = true; } } catch ( InvalidRegistryException & ) diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx index 69b74628dd4c..fb59703ca42d 100644 --- a/cppuhelper/source/interfacecontainer.cxx +++ b/cppuhelper/source/interfacecontainer.cxx @@ -95,7 +95,7 @@ OInterfaceIteratorHelper::OInterfaceIteratorHelper( OInterfaceContainerHelper & OInterfaceIteratorHelper::~OInterfaceIteratorHelper() SAL_THROW(()) { - sal_Bool bShared; + bool bShared; { MutexGuard aGuard( rCont.rMutex ); // bResetInUse protect the iterator against recursion diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx index f0e35f0ff6aa..5992c4b3edfe 100644 --- a/cppuhelper/source/propshlp.cxx +++ b/cppuhelper/source/propshlp.cxx @@ -465,7 +465,7 @@ void OPropertySetHelper::setDependentFastPropertyValue( sal_Int32 i_handle, cons // to change their value. Any aConverted, aOld; - sal_Bool bChanged = convertFastPropertyValue( aConverted, aOld, i_handle, i_value ); + bool bChanged = convertFastPropertyValue( aConverted, aOld, i_handle, i_value ); if ( !bChanged ) return; @@ -524,7 +524,7 @@ void OPropertySetHelper::setFastPropertyValue( sal_Int32 nHandle, const Any& rVa Any aOldVal; // Will the property change? - sal_Bool bChanged; + bool bChanged; { MutexGuard aGuard( rBHelper.rMutex ); bChanged = convertFastPropertyValue( aConvertedVal, aOldVal, nHandle, rValue ); diff --git a/include/cppuhelper/proptypehlp.hxx b/include/cppuhelper/proptypehlp.hxx index a848964537e2..11061c560da9 100644 --- a/include/cppuhelper/proptypehlp.hxx +++ b/include/cppuhelper/proptypehlp.hxx @@ -59,16 +59,16 @@ inline void SAL_CALL convertPropertyValue( sal_Bool & b , const ::com::sun::st if( ::com::sun::star::uno::TypeClass_LONG == tc ) { sal_Int32 i32 = 0; a >>= i32; - b = ( sal_Bool )i32; + b = i32 != 0; } else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { sal_Unicode c = *(sal_Unicode*) a.getValue(); - b = ( sal_Bool ) c; + b = c != 0; } else if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { sal_Int16 i16 = 0; a >>= i16; - b = ( sal_Bool ) i16; + b = i16 != 0; } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { b = *((sal_Bool*)a.getValue()); @@ -76,17 +76,17 @@ inline void SAL_CALL convertPropertyValue( sal_Bool & b , const ::com::sun::st else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { sal_Int8 i8 = 0; a >>= i8; - b = ( sal_Bool ) i8; + b = i8 != 0; } else if ( ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT == tc ) { sal_uInt16 i16 = 0; a >>= i16; - b = ( sal_Bool ) i16; + b = i16 != 0; } else if ( ::com::sun::star::uno::TypeClass_UNSIGNED_LONG == tc ) { sal_uInt32 i32 = 0; a >>= i32; - b = ( sal_Bool ) i32; + b = i32 != 0; } else { throw ::com::sun::star::lang::IllegalArgumentException(); @@ -122,7 +122,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int64 & i , const ::com::sun::st i = ( sal_Int64 ) i16; } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; + bool b; b = *((sal_Bool * )a.getValue()); i = ( sal_Int64 ) b; } @@ -176,7 +176,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt64 & i , const ::com::sun::s i = ( sal_uInt64 ) i16; } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; + bool b; b = *((sal_Bool * )a.getValue()); i = ( sal_uInt64 ) b; } @@ -221,7 +221,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int32 & i , const ::com::sun::st i = ( sal_Int32 ) i16; } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; + bool b; b = *((sal_Bool * )a.getValue()); i = ( sal_Int32 ) b; } @@ -269,7 +269,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt32 & i , const ::com::sun::s i = ( sal_uInt32 ) i16; } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; + bool b; b = *((sal_Bool * )a.getValue()); i = ( sal_uInt32 ) b; } @@ -303,7 +303,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int16 & i , const ::com::sun::st i = ( sal_Int16 ) c; } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; + bool b; b = *((sal_Bool * )a.getValue()); i = ( sal_Int16 ) b; } @@ -336,7 +336,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt16 & i , const ::com::sun::s i = ( sal_Int16 ) c; } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; + bool b; b = *((sal_Bool * )a.getValue()); i = ( sal_Int16 ) b; } @@ -364,7 +364,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int8 & i , const ::com::sun::sta a >>= i; } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; + bool b; b = *((sal_Bool * )a.getValue()); i = ( sal_Int8 ) b; } @@ -413,7 +413,7 @@ inline void SAL_CALL convertPropertyValue( float &f , const ::com::sun::star::un f = ( float ) i16; } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; + bool b; b = *((sal_Bool * )a.getValue()); f = ( float ) b; } @@ -480,7 +480,7 @@ inline void SAL_CALL convertPropertyValue( double &d , const ::com::sun::star::u d = (double) i16; } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; + bool b; b = *((sal_Bool * )a.getValue()); d = (double) b; } |