Kaydet (Commit) 5209884f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Reduce to static_cast any reinterpret_cast from void pointers

Change-Id: I24dc3a9b16abb1397cdd6a4f6cfafb81cc61d0f9
üst 581c5075
......@@ -178,21 +178,21 @@ bool SQLExceptionInfo::isKindOf(TYPE _eType) const
SQLExceptionInfo::operator const ::com::sun::star::sdbc::SQLException*() const
{
OSL_ENSURE(isKindOf(SQL_EXCEPTION), "SQLExceptionInfo::operator SQLException* : invalid call !");
return reinterpret_cast<const ::com::sun::star::sdbc::SQLException*>(m_aContent.getValue());
return static_cast<const ::com::sun::star::sdbc::SQLException*>(m_aContent.getValue());
}
SQLExceptionInfo::operator const ::com::sun::star::sdbc::SQLWarning*() const
{
OSL_ENSURE(isKindOf(SQL_WARNING), "SQLExceptionInfo::operator SQLException* : invalid call !");
return reinterpret_cast<const ::com::sun::star::sdbc::SQLWarning*>(m_aContent.getValue());
return static_cast<const ::com::sun::star::sdbc::SQLWarning*>(m_aContent.getValue());
}
SQLExceptionInfo::operator const ::com::sun::star::sdb::SQLContext*() const
{
OSL_ENSURE(isKindOf(SQL_CONTEXT), "SQLExceptionInfo::operator SQLException* : invalid call !");
return reinterpret_cast<const ::com::sun::star::sdb::SQLContext*>(m_aContent.getValue());
return static_cast<const ::com::sun::star::sdb::SQLContext*>(m_aContent.getValue());
}
......
......@@ -46,7 +46,7 @@ struct ProviderRequest
void* pServiceManager,
sal_Char const* pImplementationName
)
: xServiceManager(reinterpret_cast<XMultiServiceFactory*>(pServiceManager))
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
{
}
......
......@@ -46,7 +46,7 @@ struct ProviderRequest
void* pServiceManager,
sal_Char const* pImplementationName
)
: xServiceManager(reinterpret_cast<XMultiServiceFactory*>(pServiceManager))
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
{
}
......
......@@ -47,7 +47,7 @@ struct ProviderRequest
void* pServiceManager,
sal_Char const* pImplementationName
)
: xServiceManager(reinterpret_cast<XMultiServiceFactory*>(pServiceManager))
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
{
}
......
......@@ -50,7 +50,7 @@ struct ProviderRequest
void* pServiceManager,
sal_Char const* pImplementationName
)
: xServiceManager(reinterpret_cast<XMultiServiceFactory*>(pServiceManager))
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
{
}
......
......@@ -46,7 +46,7 @@ struct ProviderRequest
void* pServiceManager,
sal_Char const* pImplementationName
)
: xServiceManager(reinterpret_cast<XMultiServiceFactory*>(pServiceManager))
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
{
}
......
......@@ -47,7 +47,7 @@ struct ProviderRequest
void* pServiceManager,
sal_Char const* pImplementationName
)
: xServiceManager(reinterpret_cast<XMultiServiceFactory*>(pServiceManager))
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
{
}
......
......@@ -46,7 +46,7 @@ struct ProviderRequest
void* pServiceManager,
sal_Char const* pImplementationName
)
: xServiceManager(reinterpret_cast<XMultiServiceFactory*>(pServiceManager))
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
{
}
......
......@@ -54,7 +54,7 @@ struct ProviderRequest
void* pServiceManager,
sal_Char const* pImplementationName
)
: xServiceManager(reinterpret_cast<XMultiServiceFactory*>(pServiceManager))
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
{
}
......
......@@ -224,7 +224,7 @@ using ::com::sun::star::lang::XMultiServiceFactory;
static Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager )
{
MozillaBootstrap * pBootstrap = reinterpret_cast<MozillaBootstrap*>(OMozillaBootstrap_CreateInstance(rServiceManager));
MozillaBootstrap * pBootstrap = static_cast<MozillaBootstrap*>(OMozillaBootstrap_CreateInstance(rServiceManager));
return *pBootstrap;
}
......@@ -245,7 +245,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL mozbootstrap_component_getFactory
aSNS[0] = "com.sun.star.mozilla.MozillaBootstrap";
xFactory = ::cppu::createSingleFactory(
reinterpret_cast< XMultiServiceFactory* > ( pServiceManager),
static_cast< XMultiServiceFactory* > ( pServiceManager),
aImplName, createInstance, aSNS );
}
if ( xFactory.is() )
......
......@@ -46,7 +46,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL mysql_component_getFactory(
}
Reference< XSingleServiceFactory > xRet;
const Reference< XMultiServiceFactory > xServiceManager( reinterpret_cast<XMultiServiceFactory*>(pServiceManager) );
const Reference< XMultiServiceFactory > xServiceManager( static_cast<XMultiServiceFactory*>(pServiceManager) );
const OUString sImplementationName( OUString::createFromAscii(pImplementationName) );
if( ODriverDelegator::getImplementationName_Static() == sImplementationName )
......
......@@ -47,7 +47,7 @@ struct ProviderRequest
void* pServiceManager,
sal_Char const* pImplementationName
)
: xServiceManager(reinterpret_cast<XMultiServiceFactory*>(pServiceManager))
: xServiceManager(static_cast<XMultiServiceFactory*>(pServiceManager))
, sImplementationName(OUString::createFromAscii(pImplementationName))
{
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment