summaryrefslogtreecommitdiff
path: root/javaunohelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-17 18:48:27 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-20 09:06:48 +0100
commit62edaa0f8fd95a7f0c980d2bd36535f173a99003 (patch)
treed5436cae8669bd3cf2dac82ee20b9994bf5a6299 /javaunohelper
parent14c12fac0e76cb5f9533c942f1421d7ce09154df (diff)
Some more loplugin:cstylecast: javaunohelper
Change-Id: If0728af19ba48896678cc3196c922185e403a885
Diffstat (limited to 'javaunohelper')
-rw-r--r--javaunohelper/source/bootstrap.cxx4
-rw-r--r--javaunohelper/source/javaunohelper.cxx20
-rw-r--r--javaunohelper/source/preload.cxx6
3 files changed, 15 insertions, 15 deletions
diff --git a/javaunohelper/source/bootstrap.cxx b/javaunohelper/source/bootstrap.cxx
index 1e800ddb3563..22dd83e196be 100644
--- a/javaunohelper/source/bootstrap.cxx
+++ b/javaunohelper/source/bootstrap.cxx
@@ -126,8 +126,8 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
OUString cpp_env_name = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
OUString java_env_name = UNO_LB_JAVA;
Environment java_env, cpp_env;
- uno_getEnvironment((uno_Environment **)&cpp_env, cpp_env_name.pData, NULL);
- uno_getEnvironment( (uno_Environment **)&java_env, java_env_name.pData, vm_access.get() );
+ uno_getEnvironment(reinterpret_cast<uno_Environment **>(&cpp_env), cpp_env_name.pData, NULL);
+ uno_getEnvironment(reinterpret_cast<uno_Environment **>(&java_env), java_env_name.pData, vm_access.get() );
// map to java
Mapping mapping( cpp_env.get(), java_env.get() );
diff --git a/javaunohelper/source/javaunohelper.cxx b/javaunohelper/source/javaunohelper.cxx
index d55fe3bd40de..71914272646f 100644
--- a/javaunohelper/source/javaunohelper.cxx
+++ b/javaunohelper/source/javaunohelper.cxx
@@ -79,12 +79,12 @@ jboolean Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo(
Environment java_env, loader_env;
const sal_Char * pEnvTypeName = 0;
- (*((component_getImplementationEnvironmentFunc)pSym))(
- &pEnvTypeName, (uno_Environment **)&loader_env );
+ (*reinterpret_cast<component_getImplementationEnvironmentFunc>(pSym))(
+ &pEnvTypeName, reinterpret_cast<uno_Environment **>(&loader_env) );
if (! loader_env.is())
{
OUString aEnvTypeName( OUString::createFromAscii( pEnvTypeName ) );
- uno_getEnvironment( (uno_Environment **)&loader_env, aEnvTypeName.pData, 0 );
+ uno_getEnvironment( reinterpret_cast<uno_Environment **>(&loader_env), aEnvTypeName.pData, 0 );
}
// create vm access
@@ -92,7 +92,7 @@ jboolean Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo(
::javaunohelper::create_vm_access( pJEnv, loader ) );
OUString java_env_name = UNO_LB_JAVA;
uno_getEnvironment(
- (uno_Environment **)&java_env, java_env_name.pData, vm_access.get() );
+ reinterpret_cast<uno_Environment **>(&java_env), java_env_name.pData, vm_access.get() );
OUString aWriteInfoName( COMPONENT_WRITEINFO );
pSym = lib.getFunctionSymbol(aWriteInfoName);
@@ -114,7 +114,7 @@ jboolean Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo(
uno_ExtEnvironment * env = loader_env.get()->pExtEnv;
if (pKey)
{
- bRet = (*((component_writeInfoFunc)pSym))( pSMgr, pKey );
+ bRet = (*reinterpret_cast<component_writeInfoFunc>(pSym))( pSMgr, pKey );
if (env)
(*env->releaseInterface)( env, pKey );
@@ -171,13 +171,13 @@ jobject Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
Environment java_env, loader_env;
const sal_Char * pEnvTypeName = 0;
- (*((component_getImplementationEnvironmentFunc)pSym))(
- &pEnvTypeName, (uno_Environment **)&loader_env );
+ (*reinterpret_cast<component_getImplementationEnvironmentFunc>(pSym))(
+ &pEnvTypeName, reinterpret_cast<uno_Environment **>(&loader_env) );
if (! loader_env.is())
{
OUString aEnvTypeName( OUString::createFromAscii( pEnvTypeName ) );
- uno_getEnvironment( (uno_Environment **)&loader_env, aEnvTypeName.pData, 0 );
+ uno_getEnvironment( reinterpret_cast<uno_Environment **>(&loader_env), aEnvTypeName.pData, 0 );
}
// create vm access
@@ -185,7 +185,7 @@ jobject Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
::javaunohelper::create_vm_access( pJEnv, loader ) );
OUString java_env_name = UNO_LB_JAVA;
uno_getEnvironment(
- (uno_Environment **)&java_env, java_env_name.pData, vm_access.get() );
+ reinterpret_cast<uno_Environment **>(&java_env), java_env_name.pData, vm_access.get() );
OUString aGetFactoryName( COMPONENT_GETFACTORY );
pSym = lib.getFunctionSymbol(aGetFactoryName);
@@ -207,7 +207,7 @@ jobject Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
const char* pImplName = pJEnv->GetStringUTFChars( jImplName, NULL );
- void * pSSF = (*((component_getFactoryFunc)pSym))(
+ void * pSSF = (*reinterpret_cast<component_getFactoryFunc>(pSym))(
pImplName, pSMgr, pKey );
pJEnv->ReleaseStringUTFChars( jImplName, pImplName );
diff --git a/javaunohelper/source/preload.cxx b/javaunohelper/source/preload.cxx
index a4e9c2008a18..3858d8f9ce0a 100644
--- a/javaunohelper/source/preload.cxx
+++ b/javaunohelper/source/preload.cxx
@@ -63,14 +63,14 @@ static bool inited_juhx( JNIEnv * jni_env )
{
OUString symbol =
"Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo";
- s_writeInfo = (javaunohelper::detail::Func_writeInfo *)aModule.getFunctionSymbol(symbol);
+ s_writeInfo = reinterpret_cast<javaunohelper::detail::Func_writeInfo *>(aModule.getFunctionSymbol(symbol));
symbol =
"Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory";
- s_getFactory = (javaunohelper::detail::Func_getFactory *)aModule.getFunctionSymbol(symbol);
+ s_getFactory = reinterpret_cast<javaunohelper::detail::Func_getFactory *>(aModule.getFunctionSymbol(symbol));
symbol =
"Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap";
s_bootstrap =
- (javaunohelper::detail::Func_bootstrap *)aModule.getFunctionSymbol(symbol);
+ reinterpret_cast<javaunohelper::detail::Func_bootstrap *>(aModule.getFunctionSymbol(symbol));
if (0 == s_writeInfo ||
0 == s_getFactory ||