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 | 28c608e8703d036d5475cf93bc278d0177cc48da (patch) | |
tree | a1e4cf9a1c1bd92bd5fbc25a4a5d3a58104e277a /stoc | |
parent | 51686bbd2b0ed0b233237b2607b1f4b0ef2a2ff8 (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 5f2057a915dd..4102efc3251d 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 || |