diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-09 13:37:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-09 17:59:45 +0200 |
commit | 227078bc8d1e37d80eab2d50478ec5fc6345a616 (patch) | |
tree | 738624d1af9f9e2206e72ec5cd423df4d35e7810 /javaunohelper/source | |
parent | 38c980d472b5d311de60ee7cfcce880f66a55df8 (diff) |
loplugin:ostr in javaunohelper
Change-Id: I641f2d107e3a8aaabdd2f8ede10e7e6b13078602
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167384
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'javaunohelper/source')
-rw-r--r-- | javaunohelper/source/bootstrap.cxx | 8 | ||||
-rw-r--r-- | javaunohelper/source/javaunohelper.cxx | 4 | ||||
-rw-r--r-- | javaunohelper/source/preload.cxx | 2 | ||||
-rw-r--r-- | javaunohelper/source/vm.cxx | 10 |
4 files changed, 12 insertions, 12 deletions
diff --git a/javaunohelper/source/bootstrap.cxx b/javaunohelper/source/bootstrap.cxx index 1cacea950c0d..3b6c10bc95de 100644 --- a/javaunohelper/source/bootstrap.cxx +++ b/javaunohelper/source/bootstrap.cxx @@ -88,7 +88,7 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap( if (jni_env->ExceptionCheck()) { jni_env->ExceptionClear(); - throw RuntimeException( "index out of bounds?!" ); + throw RuntimeException( u"index out of bounds?!"_ustr ); } if (nullptr != jstr) { @@ -98,7 +98,7 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap( if (jni_env->ExceptionCheck()) { jni_env->ExceptionClear(); - throw RuntimeException( "index out of bounds?!" ); + throw RuntimeException( u"index out of bounds?!"_ustr ); } if (nullptr != jstr) { @@ -132,7 +132,7 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap( // get uno envs OUString cpp_env_name = CPPU_CURRENT_LANGUAGE_BINDING_NAME; - OUString java_env_name = UNO_LB_JAVA; + OUString java_env_name = u"" UNO_LB_JAVA ""_ustr; Environment java_env, cpp_env; uno_getEnvironment(reinterpret_cast<uno_Environment **>(&cpp_env), cpp_env_name.pData, nullptr); uno_getEnvironment(reinterpret_cast<uno_Environment **>(&java_env), java_env_name.pData, vm_access.get() ); @@ -144,7 +144,7 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap( Reference< lang::XComponent > xComp( xContext, UNO_QUERY ); if (xComp.is()) xComp->dispose(); - throw RuntimeException("cannot get mapping C++ <-> Java!" ); + throw RuntimeException(u"cannot get mapping C++ <-> Java!"_ustr ); } jobject jret = static_cast<jobject>(mapping.mapInterface( xContext.get(), cppu::UnoType<decltype(xContext)>::get() )); diff --git a/javaunohelper/source/javaunohelper.cxx b/javaunohelper/source/javaunohelper.cxx index 8db57c5b78f3..970b20b64b14 100644 --- a/javaunohelper/source/javaunohelper.cxx +++ b/javaunohelper/source/javaunohelper.cxx @@ -94,7 +94,7 @@ jboolean 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 = UNO_LB_JAVA; + OUString java_env_name = u"" UNO_LB_JAVA ""_ustr; uno_getEnvironment( reinterpret_cast<uno_Environment **>(&java_env), java_env_name.pData, vm_access.get() ); @@ -184,7 +184,7 @@ jobject 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 = UNO_LB_JAVA; + OUString java_env_name = u"" UNO_LB_JAVA ""_ustr; uno_getEnvironment( reinterpret_cast<uno_Environment **>(&java_env), java_env_name.pData, vm_access.get() ); diff --git a/javaunohelper/source/preload.cxx b/javaunohelper/source/preload.cxx index f73b44b34647..58d77885a0c1 100644 --- a/javaunohelper/source/preload.cxx +++ b/javaunohelper/source/preload.cxx @@ -68,7 +68,7 @@ static bool inited_juhx( JNIEnv * jni_env ) else { OUString symbol = - "Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo"; + u"Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo"_ustr; s_writeInfo = reinterpret_cast<javaunohelper::detail::Func_writeInfo *>(aModule.getFunctionSymbol(symbol)); symbol = "Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory"; diff --git a/javaunohelper/source/vm.cxx b/javaunohelper/source/vm.cxx index 7191e5860273..3d7a57498dc3 100644 --- a/javaunohelper/source/vm.cxx +++ b/javaunohelper/source/vm.cxx @@ -65,9 +65,9 @@ css::uno::Reference< css::uno::XInterface > SingletonFactory::createInstanceWith css::uno::Reference< css::uno::XComponentContext > const & xContext ) { sal_Int64 handle = reinterpret_cast< sal_Int64 >( m_vm_access.get() ); - css::uno::Any arg( css::beans::NamedValue( "UnoVirtualMachine", css::uno::Any( handle ) ) ); + css::uno::Any arg( css::beans::NamedValue( u"UnoVirtualMachine"_ustr, css::uno::Any( handle ) ) ); return xContext->getServiceManager()->createInstanceWithArgumentsAndContext( - "com.sun.star.java.JavaVirtualMachine", + u"com.sun.star.java.JavaVirtualMachine"_ustr, css::uno::Sequence< css::uno::Any >( &arg, 1 ), xContext ); } @@ -75,7 +75,7 @@ css::uno::Reference< css::uno::XInterface > SingletonFactory::createInstanceWith css::uno::Sequence< css::uno::Any > const & args, css::uno::Reference< css::uno::XComponentContext > const & xContext ) { return xContext->getServiceManager()->createInstanceWithArgumentsAndContext( - "com.sun.star.java.JavaVirtualMachine", + u"com.sun.star.java.JavaVirtualMachine"_ustr, args, xContext ); } @@ -94,7 +94,7 @@ namespace javaunohelper { vm, JNI_VERSION_1_2, false, jni_env ), loader ); } catch ( ::jvmaccess::UnoVirtualMachine::CreationException & ) { - throw css::uno::RuntimeException( "jvmaccess::UnoVirtualMachine::CreationException occurred" ); + throw css::uno::RuntimeException( u"jvmaccess::UnoVirtualMachine::CreationException occurred"_ustr ); } } @@ -104,7 +104,7 @@ css::uno::Reference< css::uno::XComponentContext > install_vm_singleton( { css::uno::Reference< css::lang::XSingleComponentFactory > xFac( new SingletonFactory( vm_access ) ); ::cppu::ContextEntry_Init entry( - "/singletons/com.sun.star.java.theJavaVirtualMachine", + u"/singletons/com.sun.star.java.theJavaVirtualMachine"_ustr, css::uno::Any( xFac ), true ); return ::cppu::createComponentContext( &entry, 1, xContext ); } |