diff options
author | Jean-Noël Rouvignac <jn.rouvignac@gmail.com> | 2013-01-30 11:44:23 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-01-30 12:54:40 +0000 |
commit | 97eb8a6e0eb830f37dcba64a51d725aab4c5ff53 (patch) | |
tree | a1a95b8249052d846a997ad1729758168d6a3b24 /javaunohelper/source | |
parent | f8569cd9a28a3a8856dba4ad53218aa6cc073521 (diff) |
Removed several useless macros: A2OU, A2S, C2U, C2S, OUSTR, OUSTRING
Change-Id: Ie859cb2dfdc7103c379fce56be88eef8fe390afd
Reviewed-on: https://gerrit.libreoffice.org/1924
Tested-by: Luboš Luňák <l.lunak@suse.cz>
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'javaunohelper/source')
-rw-r--r-- | javaunohelper/source/bootstrap.cxx | 12 | ||||
-rw-r--r-- | javaunohelper/source/javaunohelper.cxx | 6 | ||||
-rw-r--r-- | javaunohelper/source/preload.cxx | 12 |
3 files changed, 12 insertions, 18 deletions
diff --git a/javaunohelper/source/bootstrap.cxx b/javaunohelper/source/bootstrap.cxx index 558a853e6f53..323cc8011eca 100644 --- a/javaunohelper/source/bootstrap.cxx +++ b/javaunohelper/source/bootstrap.cxx @@ -38,8 +38,6 @@ #include "vm.hxx" -#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) ) - using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -83,7 +81,7 @@ extern "C" SAL_JNI_EXPORT jobject JNICALL Java_com_sun_star_comp_helper_Bootstra { jni_env->ExceptionClear(); throw RuntimeException( - OUSTR("index out of bounds?!"), Reference< XInterface >() ); + "index out of bounds?!", Reference< XInterface >() ); } if (0 != jstr) { @@ -94,7 +92,7 @@ extern "C" SAL_JNI_EXPORT jobject JNICALL Java_com_sun_star_comp_helper_Bootstra { jni_env->ExceptionClear(); throw RuntimeException( - OUSTR("index out of bounds?!"), Reference< XInterface >() ); + "index out of bounds?!", Reference< XInterface >() ); } if (0 != jstr) { @@ -127,8 +125,8 @@ extern "C" SAL_JNI_EXPORT jobject JNICALL Java_com_sun_star_comp_helper_Bootstra xContext = ::javaunohelper::install_vm_singleton( xContext, vm_access ); // get uno envs - OUString cpp_env_name = OUSTR(CPPU_CURRENT_LANGUAGE_BINDING_NAME); - OUString java_env_name = OUSTR(UNO_LB_JAVA); + 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() ); @@ -141,7 +139,7 @@ extern "C" SAL_JNI_EXPORT jobject JNICALL Java_com_sun_star_comp_helper_Bootstra if (xComp.is()) xComp->dispose(); throw RuntimeException( - OUSTR("cannot get mapping C++ <-> Java!"), + "cannot get mapping C++ <-> Java!", Reference< XInterface >() ); } diff --git a/javaunohelper/source/javaunohelper.cxx b/javaunohelper/source/javaunohelper.cxx index c1afc4aba720..02af62e67b3a 100644 --- a/javaunohelper/source/javaunohelper.cxx +++ b/javaunohelper/source/javaunohelper.cxx @@ -37,8 +37,6 @@ #include "vm.hxx" -#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) ) - using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -91,7 +89,7 @@ Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo( // create vm access ::rtl::Reference< ::jvmaccess::UnoVirtualMachine > vm_access( ::javaunohelper::create_vm_access( pJEnv, loader ) ); - OUString java_env_name = OUSTR(UNO_LB_JAVA); + OUString java_env_name = UNO_LB_JAVA; uno_getEnvironment( (uno_Environment **)&java_env, java_env_name.pData, vm_access.get() ); @@ -185,7 +183,7 @@ Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory( // create vm access ::rtl::Reference< ::jvmaccess::UnoVirtualMachine > vm_access( ::javaunohelper::create_vm_access( pJEnv, loader ) ); - OUString java_env_name = OUSTR(UNO_LB_JAVA); + OUString java_env_name = UNO_LB_JAVA; uno_getEnvironment( (uno_Environment **)&java_env, java_env_name.pData, vm_access.get() ); diff --git a/javaunohelper/source/preload.cxx b/javaunohelper/source/preload.cxx index c188d82a4ea7..aa34d33c7df9 100644 --- a/javaunohelper/source/preload.cxx +++ b/javaunohelper/source/preload.cxx @@ -27,8 +27,6 @@ // probably because java.lang.System.loadLibrary uses RTLD_LOCAL, so uniqueness // of GCC RTTI symbols needed for exception handling would not be guaranteed. -#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) ) - #if ! defined SAL_DLLPREFIX #define SAL_DLLPREFIX "" #endif @@ -59,7 +57,7 @@ static bool inited_juhx( JNIEnv * jni_env ) { if (s_inited) return true; - OUString lib_name = OUSTR(SAL_DLLPREFIX "juhx" SAL_DLLEXTENSION); + OUString lib_name = SAL_DLLPREFIX "juhx" SAL_DLLEXTENSION; oslModule hModule = osl_loadModuleRelative( &thisModule, lib_name.pData, SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL ); if (0 == hModule) @@ -72,20 +70,20 @@ static bool inited_juhx( JNIEnv * jni_env ) else { OUString symbol = - OUSTR("Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo"); + "Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo"; s_writeInfo = (fptr_writeInfo)osl_getFunctionSymbol( hModule, symbol.pData ); symbol = - OUSTR("Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory"); + "Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory"; s_getFactory = (fptr_getFactory)osl_getFunctionSymbol( hModule, symbol.pData ); symbol = - OUSTR("Java_com_sun_star_comp_helper_RegistryServiceFactory_createRegistryServiceFactory"); + "Java_com_sun_star_comp_helper_RegistryServiceFactory_createRegistryServiceFactory"; s_createRegistryServiceFactory = (fptr_createRegistryServiceFactory)osl_getFunctionSymbol( hModule, symbol.pData ); symbol = - OUSTR("Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap"); + "Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap"; s_bootstrap = (fptr_bootstrap)osl_getFunctionSymbol( hModule, symbol.pData ); |