bridges/source/jni_uno/jni_bridge.cxx   |    1 -
 bridges/source/jni_uno/jni_info.cxx     |    5 +----
 bridges/source/jni_uno/jni_java2uno.cxx |    2 +-
 bridges/source/jni_uno/jni_uno2java.cxx |   24 ++++++++++++------------
 4 files changed, 14 insertions(+), 18 deletions(-)

New commits:
commit 642017c88a303cf10d291d94836564edea9df0d8
Author:     Arnaud VERSINI <arnaud.vers...@libreoffice.org>
AuthorDate: Sun Jul 31 17:42:53 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Aug 13 09:11:58 2022 +0200

    bridges/jni : remove useless using and use css instead of com::sun::star
    
    Change-Id: I1b73d68b007ba0dfa54f99ff8f8fea55e94a1ed2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137651
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/bridges/source/jni_uno/jni_bridge.cxx 
b/bridges/source/jni_uno/jni_bridge.cxx
index 341c466aa90c..be2e3d37ec12 100644
--- a/bridges/source/jni_uno/jni_bridge.cxx
+++ b/bridges/source/jni_uno/jni_bridge.cxx
@@ -31,7 +31,6 @@
 #include <rtl/strbuf.hxx>
 #include <uno/lbnames.h>
 
-using namespace ::osl;
 using namespace ::jni_uno;
 
 namespace
diff --git a/bridges/source/jni_uno/jni_info.cxx 
b/bridges/source/jni_uno/jni_info.cxx
index 434322f3003c..4fd935987463 100644
--- a/bridges/source/jni_uno/jni_info.cxx
+++ b/bridges/source/jni_uno/jni_info.cxx
@@ -33,9 +33,6 @@
 #include <uno/lbnames.h>
 
 
-using namespace ::std;
-using namespace ::osl;
-
 namespace jni_uno
 {
 
@@ -942,7 +939,7 @@ JNI_info const * JNI_info::get_jni_info(
             jni_env, static_cast< jobject >(uno_vm->getClassLoader()), 
jo_class,
             jo_forName );
 
-        ClearableMutexGuard g( Mutex::getGlobalMutex() );
+        osl::ClearableMutexGuard g( osl::Mutex::getGlobalMutex() );
         jni_info =
             reinterpret_cast< JNI_info const * >(
                 jni->GetStaticLongField(
diff --git a/bridges/source/jni_uno/jni_java2uno.cxx 
b/bridges/source/jni_uno/jni_java2uno.cxx
index b6c4c6ea9b35..5edb2b7b3453 100644
--- a/bridges/source/jni_uno/jni_java2uno.cxx
+++ b/bridges/source/jni_uno/jni_java2uno.cxx
@@ -94,7 +94,7 @@ void Bridge::handle_uno_exc( JNI_context const & jni, uno_Any 
* uno_exc ) const
     {
 #if OSL_DEBUG_LEVEL > 0
         // append java stack trace to Message member
-        static_cast< ::com::sun::star::uno::Exception * >(
+        static_cast< css::uno::Exception * >(
             uno_exc->pData )->Message += jni.get_stack_trace();
 #endif
         SAL_INFO(
diff --git a/bridges/source/jni_uno/jni_uno2java.cxx 
b/bridges/source/jni_uno/jni_uno2java.cxx
index 8fd38ec31b15..bc908fc5db98 100644
--- a/bridges/source/jni_uno/jni_uno2java.cxx
+++ b/bridges/source/jni_uno/jni_uno2java.cxx
@@ -84,7 +84,7 @@ void Bridge::handle_java_exc(
     OUString exc_name(
         jstring_to_oustring( jni, static_cast<jstring>(jo_class_name.get()) ) 
);
 
-    ::com::sun::star::uno::TypeDescription td( exc_name.pData );
+    css::uno::TypeDescription td( exc_name.pData );
     if (!td.is() || (td.get()->eTypeClass != typelib_TypeClass_EXCEPTION))
     {
         // call toString()
@@ -107,7 +107,7 @@ void Bridge::handle_java_exc(
 
 #if OSL_DEBUG_LEVEL > 0
     // patch Message, append stack trace
-    reinterpret_cast< ::com::sun::star::uno::Exception * >(
+    reinterpret_cast< css::uno::Exception * >(
         uno_data.get() )->Message += jni.get_stack_trace( jo_exc.get() );
 #endif
 
@@ -137,9 +137,9 @@ void Bridge::call_java(
         static_cast<JniUnoEnvironmentData *>(m_java_env->pContext)->machine);
 
     // assure fully initialized iface_td:
-    ::com::sun::star::uno::TypeDescription iface_holder;
+    css::uno::TypeDescription iface_holder;
     if (! iface_td->aBase.bComplete) {
-        iface_holder = ::com::sun::star::uno::TypeDescription(
+        iface_holder = css::uno::TypeDescription(
             reinterpret_cast<typelib_TypeDescription *>(iface_td) );
         iface_holder.makeComplete();
         if (! iface_holder.get()->bComplete) {
@@ -778,22 +778,22 @@ void UNO_proxy_dispatch(
         buf.append( ": " );
         buf.append( err.m_message );
         // binary identical struct
-        ::com::sun::star::uno::RuntimeException exc(
+        css::uno::RuntimeException exc(
             buf.makeStringAndClear(),
-            ::com::sun::star::uno::Reference<
-              ::com::sun::star::uno::XInterface >() );
-        ::com::sun::star::uno::Type const & exc_type = 
cppu::UnoType<decltype(exc)>::get();
+            css::uno::Reference<
+              css::uno::XInterface >() );
+        css::uno::Type const & exc_type = cppu::UnoType<decltype(exc)>::get();
         uno_type_any_construct( *uno_exc, &exc, exc_type.getTypeLibType(), 
nullptr );
         SAL_INFO("bridges", exc.Message);
     }
     catch (::jvmaccess::VirtualMachine::AttachGuard::CreationException &)
     {
         // binary identical struct
-        ::com::sun::star::uno::RuntimeException exc(
+        css::uno::RuntimeException exc(
             "[jni_uno bridge error] attaching current thread to java failed!",
-            ::com::sun::star::uno::Reference<
-              ::com::sun::star::uno::XInterface >() );
-        ::com::sun::star::uno::Type const & exc_type = 
cppu::UnoType<decltype(exc)>::get();
+            css::uno::Reference<
+              css::uno::XInterface >() );
+        css::uno::Type const & exc_type = cppu::UnoType<decltype(exc)>::get();
         uno_type_any_construct( *uno_exc, &exc, exc_type.getTypeLibType(), 
nullptr );
         SAL_WARN("bridges", exc.Message);
     }

Reply via email to