diff options
author | sb <sb@openoffice.org> | 2010-01-29 11:40:11 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-01-29 11:40:11 +0100 |
commit | 2c26ce97ea32279613673a3697977893556fb37f (patch) | |
tree | 271c4b737be5b4a76171829460161e30080292f0 /stoc | |
parent | b39e08ec6d36eb7a52dd26e6b6ad129733b8b2a7 (diff) |
sb119: #i108764# avoid casts that are not strict-aliasing safe (patch by cmc)
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/invocation_adapterfactory/iafactory.cxx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx index 24e6e71ed..2ce3a9c6d 100644 --- a/stoc/source/invocation_adapterfactory/iafactory.cxx +++ b/stoc/source/invocation_adapterfactory/iafactory.cxx @@ -769,27 +769,28 @@ FactoryImpl::FactoryImpl( Reference< XComponentContext > const & xContext ) ::getCppuType( (const Sequence< sal_Int16 > *)0 ); rShortSeqType.getDescription( &m_pShortSeqTD ); // script.XInvocation - typelib_InterfaceTypeDescription * pTD = 0; + typelib_TypeDescription * pTD = 0; const Type & rInvType = ::getCppuType( (const Reference< script::XInvocation > *)0 ); - TYPELIB_DANGER_GET( - (typelib_TypeDescription **)&pTD, rInvType.getTypeLibType() ); - if( ! pTD->aBase.bComplete ) - typelib_typedescription_complete( (typelib_TypeDescription **)&pTD ); + TYPELIB_DANGER_GET( &pTD, rInvType.getTypeLibType() ); + typelib_InterfaceTypeDescription * pITD; + pITD = reinterpret_cast<typelib_InterfaceTypeDescription*>(pTD); + if( ! pITD->aBase.bComplete ) + typelib_typedescription_complete( &pTD ); ::typelib_typedescriptionreference_getDescription( - &m_pInvokMethodTD, pTD->ppMembers[ 1 ] ); // invoke() + &m_pInvokMethodTD, pITD->ppMembers[ 1 ] ); // invoke() ::typelib_typedescriptionreference_getDescription( - &m_pSetValueTD, pTD->ppMembers[ 2 ] ); // setValue() + &m_pSetValueTD, pITD->ppMembers[ 2 ] ); // setValue() ::typelib_typedescriptionreference_getDescription( - &m_pGetValueTD, pTD->ppMembers[ 3 ] ); // getValue() + &m_pGetValueTD, pITD->ppMembers[ 3 ] ); // getValue() // script.XTypeConverter const Type & rTCType = ::getCppuType( (const Reference< script::XTypeConverter > *)0 ); - TYPELIB_DANGER_GET( - (typelib_TypeDescription **)&pTD, rTCType.getTypeLibType() ); + TYPELIB_DANGER_GET( &pTD, rTCType.getTypeLibType() ); + pITD = reinterpret_cast<typelib_InterfaceTypeDescription*>(pTD); ::typelib_typedescriptionreference_getDescription( - &m_pConvertToTD, pTD->ppMembers[ 0 ] ); // convertTo() - TYPELIB_DANGER_RELEASE( (typelib_TypeDescription *)pTD ); + &m_pConvertToTD, pITD->ppMembers[ 0 ] ); // convertTo() + TYPELIB_DANGER_RELEASE( pTD ); if (!m_pInvokMethodTD || !m_pSetValueTD || !m_pGetValueTD || !m_pConvertToTD || |