diff options
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/source/jni_uno/jni_bridge.cxx | 10 | ||||
-rw-r--r-- | bridges/source/jni_uno/jni_info.cxx | 3 | ||||
-rw-r--r-- | bridges/source/jni_uno/jni_info.h | 3 | ||||
-rw-r--r-- | bridges/source/jni_uno/jni_java2uno.cxx | 3 | ||||
-rw-r--r-- | bridges/test/java_uno/acquire/testacquire.cxx | 12 |
5 files changed, 9 insertions, 22 deletions
diff --git a/bridges/source/jni_uno/jni_bridge.cxx b/bridges/source/jni_uno/jni_bridge.cxx index a4548e17361b..87d210d300c7 100644 --- a/bridges/source/jni_uno/jni_bridge.cxx +++ b/bridges/source/jni_uno/jni_bridge.cxx @@ -512,10 +512,7 @@ void SAL_CALL uno_ext_getMapping( try { - if (from_env_typename.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(UNO_LB_JAVA) ) && - to_env_typename.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(UNO_LB_UNO) )) + if ( from_env_typename == UNO_LB_JAVA && to_env_typename == UNO_LB_UNO ) { Bridge * bridge = new Bridge( pFrom, pTo->pExtEnv, true ); // ref count = 1 @@ -524,10 +521,7 @@ void SAL_CALL uno_ext_getMapping( &mapping, Bridge_free, pFrom, (uno_Environment *)pTo->pExtEnv, 0 ); } - else if (from_env_typename.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(UNO_LB_UNO) ) && - to_env_typename.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(UNO_LB_JAVA) )) + else if ( from_env_typename == UNO_LB_UNO && to_env_typename == UNO_LB_JAVA ) { Bridge * bridge = new Bridge( pTo, pFrom->pExtEnv, false ); // ref count = 1 diff --git a/bridges/source/jni_uno/jni_info.cxx b/bridges/source/jni_uno/jni_info.cxx index c3f34edd62d7..1e0378db0850 100644 --- a/bridges/source/jni_uno/jni_info.cxx +++ b/bridges/source/jni_uno/jni_info.cxx @@ -461,8 +461,7 @@ JNI_type_info const * JNI_info::get_type_info( JNI_type_info const * JNI_info::get_type_info( JNI_context const & jni, OUString const & uno_name ) const { - if (uno_name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("com.sun.star.uno.XInterface") )) + if ( uno_name == "com.sun.star.uno.XInterface" ) { return m_XInterface_type_info; } diff --git a/bridges/source/jni_uno/jni_info.h b/bridges/source/jni_uno/jni_info.h index a356be272e04..f890e49f898d 100644 --- a/bridges/source/jni_uno/jni_info.h +++ b/bridges/source/jni_uno/jni_info.h @@ -66,8 +66,7 @@ inline bool type_equals( inline bool is_XInterface( typelib_TypeDescriptionReference * type ) { return ((typelib_TypeClass_INTERFACE == type->eTypeClass) && - ::rtl::OUString::unacquired( &type->pTypeName ).equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("com.sun.star.uno.XInterface") )); + ::rtl::OUString::unacquired( &type->pTypeName ) == "com.sun.star.uno.XInterface"); } //============================================================================== diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx index 55674b44dd3d..26b757fa29e5 100644 --- a/bridges/source/jni_uno/jni_java2uno.cxx +++ b/bridges/source/jni_uno/jni_java2uno.cxx @@ -425,8 +425,7 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call( #endif // special IQueryInterface.queryInterface() - if (method_name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("queryInterface") )) + if ( method_name == "queryInterface" ) { // oid JLocalAutoRef jo_oid( diff --git a/bridges/test/java_uno/acquire/testacquire.cxx b/bridges/test/java_uno/acquire/testacquire.cxx index ed046fb28fb1..fcf7fde15099 100644 --- a/bridges/test/java_uno/acquire/testacquire.cxx +++ b/bridges/test/java_uno/acquire/testacquire.cxx @@ -119,8 +119,7 @@ private: css::uno::Any Interface::queryInterface(css::uno::Type const & type) throw (css::uno::RuntimeException) { - return type.getTypeName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( - "com.sun.star.uno.XInterface")) + return type.getTypeName() == "com.sun.star.uno.XInterface" ? css::uno::makeAny(css::uno::Reference< css::uno::XInterface >(this)) : css::uno::Any(); } @@ -153,10 +152,8 @@ protected: css::uno::Any Base::queryInterface(css::uno::Type const & type) throw (css::uno::RuntimeException) { - return type.getTypeName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( - "test.javauno.acquire.XBase")) - ? css::uno::makeAny( - css::uno::Reference< test::javauno::acquire::XBase >(this)) + return type.getTypeName() == "test.javauno.acquire.XBase" + ? css::uno::makeAny(css::uno::Reference< test::javauno::acquire::XBase >(this)) : Interface::queryInterface(type); } @@ -182,8 +179,7 @@ private: css::uno::Any Derived::queryInterface(css::uno::Type const & type) throw (css::uno::RuntimeException) { - return (type.getTypeName().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("test.javauno.acquire.XDerived"))) + return ( type.getTypeName() == "test.javauno.acquire.XDerived" ) ? css::uno::makeAny( css::uno::Reference< test::javauno::acquire::XDerived >(this)) : Interface::queryInterface(type); |