diff options
-rw-r--r-- | cppuhelper/source/implbase_ex.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/interfacecontainer.cxx | 56 | ||||
-rw-r--r-- | cppuhelper/source/macro_expander.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/propshlp.cxx | 24 | ||||
-rw-r--r-- | cppuhelper/source/tdmgr.cxx | 20 | ||||
-rw-r--r-- | include/cppuhelper/proptypehlp.hxx | 38 |
6 files changed, 71 insertions, 71 deletions
diff --git a/cppuhelper/source/implbase_ex.cxx b/cppuhelper/source/implbase_ex.cxx index 8e3fe2afec6d..4542cb00d5e2 100644 --- a/cppuhelper/source/implbase_ex.cxx +++ b/cppuhelper/source/implbase_ex.cxx @@ -71,7 +71,7 @@ static inline bool isXInterface( rtl_uString * pStr ) static inline void * makeInterface( sal_IntPtr nOffset, void * that ) { - return (((char *)that) + nOffset); + return (static_cast<char *>(that) + nOffset); } static inline bool __td_equals( diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx index da37a8c425b0..9800a191a751 100644 --- a/cppuhelper/source/interfacecontainer.cxx +++ b/cppuhelper/source/interfacecontainer.cxx @@ -348,13 +348,13 @@ OMultiTypeInterfaceContainerHelper::OMultiTypeInterfaceContainerHelper( Mutex & OMultiTypeInterfaceContainerHelper::~OMultiTypeInterfaceContainerHelper() { - t_type2ptr * pMap = (t_type2ptr *)m_pMap; + t_type2ptr * pMap = static_cast<t_type2ptr *>(m_pMap); t_type2ptr::iterator iter = pMap->begin(); t_type2ptr::iterator end = pMap->end(); while( iter != end ) { - delete (OInterfaceContainerHelper*)(*iter).second; + delete static_cast<OInterfaceContainerHelper*>((*iter).second); (*iter).second = 0; ++iter; } @@ -363,7 +363,7 @@ OMultiTypeInterfaceContainerHelper::~OMultiTypeInterfaceContainerHelper() Sequence< Type > OMultiTypeInterfaceContainerHelper::getContainedTypes() const { - t_type2ptr * pMap = (t_type2ptr *)m_pMap; + t_type2ptr * pMap = static_cast<t_type2ptr *>(m_pMap); t_type2ptr::size_type nSize; ::osl::MutexGuard aGuard( rMutex ); @@ -380,7 +380,7 @@ Sequence< Type > OMultiTypeInterfaceContainerHelper::getContainedTypes() const while( iter != end ) { // are interfaces added to this container? - if( ((OInterfaceContainerHelper*)(*iter).second)->getLength() ) + if( static_cast<OInterfaceContainerHelper*>((*iter).second)->getLength() ) // yes, put the type in the array pArray[i++] = (*iter).first; ++iter; @@ -412,10 +412,10 @@ OInterfaceContainerHelper * OMultiTypeInterfaceContainerHelper::getContainer( co { ::osl::MutexGuard aGuard( rMutex ); - t_type2ptr * pMap = (t_type2ptr *)m_pMap; + t_type2ptr * pMap = static_cast<t_type2ptr *>(m_pMap); t_type2ptr::iterator iter = findType( pMap, rKey ); if( iter != pMap->end() ) - return (OInterfaceContainerHelper*) (*iter).second; + return static_cast<OInterfaceContainerHelper*>((*iter).second); return 0; } @@ -423,7 +423,7 @@ sal_Int32 OMultiTypeInterfaceContainerHelper::addInterface( const Type & rKey, const Reference< XInterface > & rListener ) { ::osl::MutexGuard aGuard( rMutex ); - t_type2ptr * pMap = (t_type2ptr *)m_pMap; + t_type2ptr * pMap = static_cast<t_type2ptr *>(m_pMap); t_type2ptr::iterator iter = findType( pMap, rKey ); if( iter == pMap->end() ) { @@ -432,7 +432,7 @@ sal_Int32 OMultiTypeInterfaceContainerHelper::addInterface( return pLC->addInterface( rListener ); } else - return ((OInterfaceContainerHelper*)(*iter).second)->addInterface( rListener ); + return static_cast<OInterfaceContainerHelper*>((*iter).second)->addInterface( rListener ); } sal_Int32 OMultiTypeInterfaceContainerHelper::removeInterface( @@ -441,11 +441,11 @@ sal_Int32 OMultiTypeInterfaceContainerHelper::removeInterface( ::osl::MutexGuard aGuard( rMutex ); // search container with id nUik - t_type2ptr * pMap = (t_type2ptr *)m_pMap; + t_type2ptr * pMap = static_cast<t_type2ptr *>(m_pMap); t_type2ptr::iterator iter = findType( pMap, rKey ); // container found? if( iter != pMap->end() ) - return ((OInterfaceContainerHelper*)(*iter).second)->removeInterface( rListener ); + return static_cast<OInterfaceContainerHelper*>((*iter).second)->removeInterface( rListener ); // no container with this id. Always return 0 return 0; @@ -457,7 +457,7 @@ void OMultiTypeInterfaceContainerHelper::disposeAndClear( const EventObject & rE boost::scoped_array<OInterfaceContainerHelper *> ppListenerContainers; { ::osl::MutexGuard aGuard( rMutex ); - t_type2ptr * pMap = (t_type2ptr *)m_pMap; + t_type2ptr * pMap = static_cast<t_type2ptr *>(m_pMap); nSize = pMap->size(); if( nSize ) { @@ -471,7 +471,7 @@ void OMultiTypeInterfaceContainerHelper::disposeAndClear( const EventObject & rE t_type2ptr::size_type i = 0; while( iter != end ) { - ppListenerContainers[i++] = (OInterfaceContainerHelper*)(*iter).second; + ppListenerContainers[i++] = static_cast<OInterfaceContainerHelper*>((*iter).second); ++iter; } } @@ -489,13 +489,13 @@ void OMultiTypeInterfaceContainerHelper::disposeAndClear( const EventObject & rE void OMultiTypeInterfaceContainerHelper::clear() { ::osl::MutexGuard aGuard( rMutex ); - t_type2ptr * pMap = (t_type2ptr *)m_pMap; + t_type2ptr * pMap = static_cast<t_type2ptr *>(m_pMap); t_type2ptr::iterator iter = pMap->begin(); t_type2ptr::iterator end = pMap->end(); while( iter != end ) { - ((OInterfaceContainerHelper*)(*iter).second)->clear(); + static_cast<OInterfaceContainerHelper*>((*iter).second)->clear(); ++iter; } } @@ -530,13 +530,13 @@ OMultiTypeInterfaceContainerHelperInt32::~OMultiTypeInterfaceContainerHelperInt3 if (!m_pMap) return; - t_long2ptr * pMap = (t_long2ptr *)m_pMap; + t_long2ptr * pMap = static_cast<t_long2ptr *>(m_pMap); t_long2ptr::iterator iter = pMap->begin(); t_long2ptr::iterator end = pMap->end(); while( iter != end ) { - delete (OInterfaceContainerHelper*)(*iter).second; + delete static_cast<OInterfaceContainerHelper*>((*iter).second); (*iter).second = 0; ++iter; } @@ -545,7 +545,7 @@ OMultiTypeInterfaceContainerHelperInt32::~OMultiTypeInterfaceContainerHelperInt3 Sequence< sal_Int32 > OMultiTypeInterfaceContainerHelperInt32::getContainedTypes() const { - t_long2ptr * pMap = (t_long2ptr *)m_pMap; + t_long2ptr * pMap = static_cast<t_long2ptr *>(m_pMap); t_long2ptr::size_type nSize; ::osl::MutexGuard aGuard( rMutex ); @@ -562,7 +562,7 @@ Sequence< sal_Int32 > OMultiTypeInterfaceContainerHelperInt32::getContainedTypes while( iter != end ) { // are interfaces added to this container? - if( ((OInterfaceContainerHelper*)(*iter).second)->getLength() ) + if( static_cast<OInterfaceContainerHelper*>((*iter).second)->getLength() ) // yes, put the type in the array pArray[i++] = (*iter).first; ++iter; @@ -582,10 +582,10 @@ OInterfaceContainerHelper * OMultiTypeInterfaceContainerHelperInt32::getContaine if (!m_pMap) return 0; - t_long2ptr * pMap = (t_long2ptr *)m_pMap; + t_long2ptr * pMap = static_cast<t_long2ptr *>(m_pMap); t_long2ptr::iterator iter = findLong( pMap, rKey ); if( iter != pMap->end() ) - return (OInterfaceContainerHelper*) (*iter).second; + return static_cast<OInterfaceContainerHelper*>((*iter).second); return 0; } @@ -595,7 +595,7 @@ sal_Int32 OMultiTypeInterfaceContainerHelperInt32::addInterface( ::osl::MutexGuard aGuard( rMutex ); if (!m_pMap) m_pMap = new t_long2ptr(); - t_long2ptr * pMap = (t_long2ptr *)m_pMap; + t_long2ptr * pMap = static_cast<t_long2ptr *>(m_pMap); t_long2ptr::iterator iter = findLong( pMap, rKey ); if( iter == pMap->end() ) { @@ -604,7 +604,7 @@ sal_Int32 OMultiTypeInterfaceContainerHelperInt32::addInterface( return pLC->addInterface( rListener ); } else - return ((OInterfaceContainerHelper*)(*iter).second)->addInterface( rListener ); + return static_cast<OInterfaceContainerHelper*>((*iter).second)->addInterface( rListener ); } sal_Int32 OMultiTypeInterfaceContainerHelperInt32::removeInterface( @@ -615,11 +615,11 @@ sal_Int32 OMultiTypeInterfaceContainerHelperInt32::removeInterface( if (!m_pMap) return 0; // search container with id nUik - t_long2ptr * pMap = (t_long2ptr *)m_pMap; + t_long2ptr * pMap = static_cast<t_long2ptr *>(m_pMap); t_long2ptr::iterator iter = findLong( pMap, rKey ); // container found? if( iter != pMap->end() ) - return ((OInterfaceContainerHelper*)(*iter).second)->removeInterface( rListener ); + return static_cast<OInterfaceContainerHelper*>((*iter).second)->removeInterface( rListener ); // no container with this id. Always return 0 return 0; @@ -634,7 +634,7 @@ void OMultiTypeInterfaceContainerHelperInt32::disposeAndClear( const EventObject if (!m_pMap) return; - t_long2ptr * pMap = (t_long2ptr *)m_pMap; + t_long2ptr * pMap = static_cast<t_long2ptr *>(m_pMap); nSize = pMap->size(); if( nSize ) { @@ -647,7 +647,7 @@ void OMultiTypeInterfaceContainerHelperInt32::disposeAndClear( const EventObject t_long2ptr::size_type i = 0; while( iter != end ) { - ppListenerContainers[i++] = (OInterfaceContainerHelper*)(*iter).second; + ppListenerContainers[i++] = static_cast<OInterfaceContainerHelper*>((*iter).second); ++iter; } } @@ -667,13 +667,13 @@ void OMultiTypeInterfaceContainerHelperInt32::clear() ::osl::MutexGuard aGuard( rMutex ); if (!m_pMap) return; - t_long2ptr * pMap = (t_long2ptr *)m_pMap; + t_long2ptr * pMap = static_cast<t_long2ptr *>(m_pMap); t_long2ptr::iterator iter = pMap->begin(); t_long2ptr::iterator end = pMap->end(); while( iter != end ) { - ((OInterfaceContainerHelper*)(*iter).second)->clear(); + static_cast<OInterfaceContainerHelper*>((*iter).second)->clear(); ++iter; } } diff --git a/cppuhelper/source/macro_expander.cxx b/cppuhelper/source/macro_expander.cxx index 857e62d02dad..dc610a4ddc88 100644 --- a/cppuhelper/source/macro_expander.cxx +++ b/cppuhelper/source/macro_expander.cxx @@ -68,7 +68,7 @@ Bootstrap const & get_unorc() s_bstrap = bstrap; } } - return *(Bootstrap const *)&s_bstrap; + return *reinterpret_cast<Bootstrap const *>(&s_bstrap); } } diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx index bcc8f0fa1850..20be194b4b45 100644 --- a/cppuhelper/source/propshlp.cxx +++ b/cppuhelper/source/propshlp.cxx @@ -60,7 +60,7 @@ extern "C" { static int compare_OUString_Property_Impl( const void *arg1, const void *arg2 ) SAL_THROW_EXTERN_C() { - return ((OUString *)arg1)->compareTo( ((Property *)arg2)->Name ); + return static_cast<OUString const *>(arg1)->compareTo( static_cast<Property const *>(arg2)->Name ); } } @@ -107,9 +107,9 @@ Sequence< Property > OPropertySetHelperInfo_Impl::getProperties(void) throw(::co Property OPropertySetHelperInfo_Impl::getPropertyByName( const OUString & PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) { Property * pR; - pR = (Property *)bsearch( &PropertyName, aInfos.getConstArray(), aInfos.getLength(), + pR = static_cast<Property *>(bsearch( &PropertyName, aInfos.getConstArray(), aInfos.getLength(), sizeof( Property ), - compare_OUString_Property_Impl ); + compare_OUString_Property_Impl )); if( !pR ) { throw UnknownPropertyException(); } @@ -123,9 +123,9 @@ Property OPropertySetHelperInfo_Impl::getPropertyByName( const OUString & Proper sal_Bool OPropertySetHelperInfo_Impl::hasPropertyByName( const OUString & PropertyName ) throw(::com::sun::star::uno::RuntimeException, std::exception) { Property * pR; - pR = (Property *)bsearch( &PropertyName, aInfos.getConstArray(), aInfos.getLength(), + pR = static_cast<Property *>(bsearch( &PropertyName, aInfos.getConstArray(), aInfos.getLength(), sizeof( Property ), - compare_OUString_Property_Impl ); + compare_OUString_Property_Impl )); return pR != NULL; } @@ -1009,7 +1009,7 @@ extern "C" { static int compare_Property_Impl( const void *arg1, const void *arg2 ) SAL_THROW_EXTERN_C() { - return ((Property *)arg1)->Name.compareTo( ((Property *)arg2)->Name ); + return static_cast<Property const *>(arg1)->Name.compareTo( static_cast<Property const *>(arg2)->Name ); } } @@ -1118,9 +1118,9 @@ Property OPropertyArrayHelper::getPropertyByName(const OUString& aPropertyName) throw (UnknownPropertyException) { Property * pR; - pR = (Property *)bsearch( &aPropertyName, aInfos.getConstArray(), aInfos.getLength(), + pR = static_cast<Property *>(bsearch( &aPropertyName, aInfos.getConstArray(), aInfos.getLength(), sizeof( Property ), - compare_OUString_Property_Impl ); + compare_OUString_Property_Impl )); if( !pR ) { throw UnknownPropertyException(); } @@ -1131,9 +1131,9 @@ Property OPropertyArrayHelper::getPropertyByName(const OUString& aPropertyName) sal_Bool OPropertyArrayHelper::hasPropertyByName(const OUString& aPropertyName) { Property * pR; - pR = (Property *)bsearch( &aPropertyName, aInfos.getConstArray(), aInfos.getLength(), + pR = static_cast<Property *>(bsearch( &aPropertyName, aInfos.getConstArray(), aInfos.getLength(), sizeof( Property ), - compare_OUString_Property_Impl ); + compare_OUString_Property_Impl )); return pR != NULL; } @@ -1141,9 +1141,9 @@ sal_Bool OPropertyArrayHelper::hasPropertyByName(const OUString& aPropertyName) sal_Int32 OPropertyArrayHelper::getHandleByName( const OUString & rPropName ) { Property * pR; - pR = (Property *)bsearch( &rPropName, aInfos.getConstArray(), aInfos.getLength(), + pR = static_cast<Property *>(bsearch( &rPropName, aInfos.getConstArray(), aInfos.getLength(), sizeof( Property ), - compare_OUString_Property_Impl ); + compare_OUString_Property_Impl )); return pR ? pR->Handle : -1; } diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx index 4a454e616324..7e02154c0d97 100644 --- a/cppuhelper/source/tdmgr.cxx +++ b/cppuhelper/source/tdmgr.cxx @@ -88,8 +88,8 @@ inline static typelib_TypeDescription * createCTD( OUString aTypeName( xType->getName() ); - typelib_CompoundMember_Init * pMemberInits = (typelib_CompoundMember_Init *)alloca( - sizeof(typelib_CompoundMember_Init) * nMembers ); + typelib_CompoundMember_Init * pMemberInits = static_cast<typelib_CompoundMember_Init *>(alloca( + sizeof(typelib_CompoundMember_Init) * nMembers )); sal_Int32 nPos; for ( nPos = nMembers; nPos--; ) @@ -146,8 +146,8 @@ inline static typelib_TypeDescription * createCTD( OUString aTypeName( xType->getName() ); - typelib_StructMember_Init * pMemberInits = (typelib_StructMember_Init *)alloca( - sizeof(typelib_StructMember_Init) * nMembers ); + typelib_StructMember_Init * pMemberInits = static_cast<typelib_StructMember_Init *>(alloca( + sizeof(typelib_StructMember_Init) * nMembers )); Sequence< Reference< XTypeDescription > > templateMemberTypes; sal_Int32 i = aTypeName.indexOf('<'); @@ -249,8 +249,8 @@ static typelib_TypeDescription * createCTD( const Reference< XMethodParameter > * pParams = rParams.getConstArray(); sal_Int32 nParams = rParams.getLength(); - typelib_Parameter_Init * pParamInit = (typelib_Parameter_Init *)alloca( - sizeof(typelib_Parameter_Init) * nParams ); + typelib_Parameter_Init * pParamInit = static_cast<typelib_Parameter_Init *>(alloca( + sizeof(typelib_Parameter_Init) * nParams )); sal_Int32 nPos; for ( nPos = nParams; nPos--; ) @@ -272,8 +272,8 @@ static typelib_TypeDescription * createCTD( const Sequence<Reference< XTypeDescription > > & rExceptions = xMethod->getExceptions(); const Reference< XTypeDescription > * pExceptions = rExceptions.getConstArray(); sal_Int32 nExceptions = rExceptions.getLength(); - rtl_uString ** ppExceptionNames = (rtl_uString **)alloca( - sizeof(rtl_uString *) * nExceptions ); + rtl_uString ** ppExceptionNames = static_cast<rtl_uString **>(alloca( + sizeof(rtl_uString *) * nExceptions )); for ( nPos = nExceptions; nPos--; ) { @@ -335,8 +335,8 @@ inline static typelib_TypeDescription * createCTD( const Sequence<Reference< XInterfaceMemberTypeDescription > > & rMembers = xType->getMembers(); sal_Int32 nMembers = rMembers.getLength(); - typelib_TypeDescriptionReference ** ppMemberRefs = (typelib_TypeDescriptionReference **)alloca( - sizeof(typelib_TypeDescriptionReference *) * nMembers ); + typelib_TypeDescriptionReference ** ppMemberRefs = static_cast<typelib_TypeDescriptionReference **>(alloca( + sizeof(typelib_TypeDescriptionReference *) * nMembers )); const Reference< XInterfaceMemberTypeDescription > * pMembers = rMembers.getConstArray(); diff --git a/include/cppuhelper/proptypehlp.hxx b/include/cppuhelper/proptypehlp.hxx index c93a7961169f..feaa51ba36bc 100644 --- a/include/cppuhelper/proptypehlp.hxx +++ b/include/cppuhelper/proptypehlp.hxx @@ -63,7 +63,7 @@ inline void SAL_CALL convertPropertyValue( sal_Bool & b , const ::com::sun::st b = i32 != 0; } else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { - sal_Unicode c = *(sal_Unicode*) a.getValue(); + sal_Unicode c = *static_cast<sal_Unicode const *>(a.getValue()); b = c != 0; } else if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { @@ -72,7 +72,7 @@ inline void SAL_CALL convertPropertyValue( sal_Bool & b , const ::com::sun::st b = i16 != 0; } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - b = *((sal_Bool*)a.getValue()); + b = *static_cast<sal_Bool const *>(a.getValue()); } else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { sal_Int8 i8 = 0; @@ -113,7 +113,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int64 & i , const ::com::sun::st } else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { sal_Unicode c; - c = *(sal_Unicode *)a.getValue(); + c = *static_cast<sal_Unicode const *>(a.getValue()); i = ( sal_Int64 ) c; } else if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { @@ -123,7 +123,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int64 & i , const ::com::sun::st } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { bool b; - b = *((sal_Bool * )a.getValue()); + b = *static_cast<sal_Bool const *>(a.getValue()); i = ( sal_Int64 ) b; } else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { @@ -166,7 +166,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt64 & i , const ::com::sun::s } else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { sal_Unicode c; - c = *( sal_Unicode * ) a.getValue() ; + c = *static_cast<sal_Unicode const *>(a.getValue()); i = ( sal_uInt64 ) c; } else if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { @@ -176,7 +176,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt64 & i , const ::com::sun::s } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { bool b; - b = *((sal_Bool * )a.getValue()); + b = *static_cast<sal_Bool const *>(a.getValue()); i = ( sal_uInt64 ) b; } else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { @@ -210,7 +210,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int32 & i , const ::com::sun::st } else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { sal_Unicode c; - c = *(sal_Unicode*) a.getValue(); + c = *static_cast<sal_Unicode const *>(a.getValue()); i = ( sal_Int32 ) c; } else if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { @@ -220,7 +220,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int32 & i , const ::com::sun::st } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { bool b; - b = *((sal_Bool * )a.getValue()); + b = *static_cast<sal_Bool const *>(a.getValue()); i = ( sal_Int32 ) b; } else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { @@ -257,7 +257,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt32 & i , const ::com::sun::s } else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { sal_Unicode c; - c = *(sal_Unicode*) a.getValue(); + c = *static_cast<sal_Unicode const *>(a.getValue()); i = ( sal_uInt32 ) c; } else if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { @@ -267,7 +267,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt32 & i , const ::com::sun::s } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { bool b; - b = *((sal_Bool * )a.getValue()); + b = *static_cast<sal_Bool const *>(a.getValue()); i = ( sal_uInt32 ) b; } else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { @@ -295,12 +295,12 @@ inline void SAL_CALL convertPropertyValue( sal_Int16 & i , const ::com::sun::st } else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { sal_Unicode c; - c = *(sal_Unicode*) a.getValue(); + c = *static_cast<sal_Unicode const *>(a.getValue()); i = ( sal_Int16 ) c; } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { bool b; - b = *((sal_Bool * )a.getValue()); + b = *static_cast<sal_Bool const *>(a.getValue()); i = ( sal_Int16 ) b; } else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { @@ -327,12 +327,12 @@ inline void SAL_CALL convertPropertyValue( sal_uInt16 & i , const ::com::sun::s } else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { sal_Unicode c; - c = *(sal_Unicode *) a.getValue(); + c = *static_cast<sal_Unicode const *>(a.getValue()); i = ( sal_Int16 ) c; } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { bool b; - b = *((sal_Bool * )a.getValue()); + b = *static_cast<sal_Bool const *>(a.getValue()); i = ( sal_Int16 ) b; } else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { @@ -359,7 +359,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int8 & i , const ::com::sun::sta } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { bool b; - b = *((sal_Bool * )a.getValue()); + b = *static_cast<sal_Bool const *>(a.getValue()); i = ( sal_Int8 ) b; } else { @@ -397,7 +397,7 @@ inline void SAL_CALL convertPropertyValue( float &f , const ::com::sun::star::un } else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { sal_Unicode c; - c = *(sal_Unicode*) a.getValue(); + c = *static_cast<sal_Unicode const *>(a.getValue()); f = ( float ) c; } else if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { @@ -407,7 +407,7 @@ inline void SAL_CALL convertPropertyValue( float &f , const ::com::sun::star::un } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { bool b; - b = *((sal_Bool * )a.getValue()); + b = *static_cast<sal_Bool const *>(a.getValue()); f = ( float ) b; } else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { @@ -463,7 +463,7 @@ inline void SAL_CALL convertPropertyValue( double &d , const ::com::sun::star::u } else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { sal_Unicode c; - c = *(sal_Unicode*) a.getValue(); + c = *static_cast<sal_Unicode const *>(a.getValue()); d = (double) c; } else if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { @@ -473,7 +473,7 @@ inline void SAL_CALL convertPropertyValue( double &d , const ::com::sun::star::u } else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { bool b; - b = *((sal_Bool * )a.getValue()); + b = *static_cast<sal_Bool const *>(a.getValue()); d = (double) b; } else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { |