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 /bridges/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 'bridges/source')
-rw-r--r-- | bridges/source/jni_uno/jni_base.h | 6 | ||||
-rw-r--r-- | bridges/source/jni_uno/jni_bridge.cxx | 16 | ||||
-rw-r--r-- | bridges/source/jni_uno/jni_info.h | 2 | ||||
-rw-r--r-- | bridges/source/jni_uno/jni_java2uno.cxx | 8 | ||||
-rw-r--r-- | bridges/source/jni_uno/jni_uno2java.cxx | 12 |
5 files changed, 20 insertions, 24 deletions
diff --git a/bridges/source/jni_uno/jni_base.h b/bridges/source/jni_uno/jni_base.h index ad0fd8df753d..7b668c17270d 100644 --- a/bridges/source/jni_uno/jni_base.h +++ b/bridges/source/jni_uno/jni_base.h @@ -41,8 +41,6 @@ typedef __va_list va_list; #include "uno/environment.h" #include "typelib/typedescription.h" -#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) ) - namespace jni_uno { @@ -244,7 +242,7 @@ inline ::std::auto_ptr< rtl_mem > rtl_mem::allocate( ::std::size_t bytes ) { void * p = rtl_allocateMemory( bytes ); if (0 == p) - throw BridgeRuntimeError( OUSTR("out of memory!") ); + throw BridgeRuntimeError( "out of memory!" ); return ::std::auto_ptr< rtl_mem >( (rtl_mem *)p ); } @@ -274,7 +272,7 @@ inline TypeDescr::TypeDescr( typelib_TypeDescriptionReference * td_ref ) if (0 == m_td) { throw BridgeRuntimeError( - OUSTR("cannot get comprehensive type description for ") + + "cannot get comprehensive type description for " + ::rtl::OUString::unacquired( &td_ref->pTypeName ) ); } } diff --git a/bridges/source/jni_uno/jni_bridge.cxx b/bridges/source/jni_uno/jni_bridge.cxx index 4ba0f7b1ac4b..a8bef0c0b8b7 100644 --- a/bridges/source/jni_uno/jni_bridge.cxx +++ b/bridges/source/jni_uno/jni_bridge.cxx @@ -102,7 +102,7 @@ void SAL_CALL Mapping_map_to_uno( #if OSL_DEBUG_LEVEL > 0 OString cstr_msg( OUStringToOString( - OUSTR("[jni_uno bridge error] ") + err.m_message, + "[jni_uno bridge error] " + err.m_message, RTL_TEXTENCODING_ASCII_US ) ); OSL_FAIL( cstr_msg.getStr() ); #else @@ -171,7 +171,7 @@ void SAL_CALL Mapping_map_to_java( #if OSL_DEBUG_LEVEL > 0 OString cstr_msg( OUStringToOString( - OUSTR("[jni_uno bridge error] ") + err.m_message, + "[jni_uno bridge error] " + err.m_message, RTL_TEXTENCODING_ASCII_US ) ); OSL_FAIL( cstr_msg.getStr() ); #else @@ -289,7 +289,7 @@ void JNI_context::java_exc_occurred() const if (! jo_exc.is()) { throw BridgeRuntimeError( - OUSTR("java exception occurred, but not available!?") + + "java exception occurred, but not available!?" + get_stack_trace() ); } @@ -299,7 +299,7 @@ void JNI_context::java_exc_occurred() const { m_env->ExceptionClear(); throw BridgeRuntimeError( - OUSTR("cannot get class java.lang.Object!") + get_stack_trace() ); + "cannot get class java.lang.Object!" + get_stack_trace() ); } JLocalAutoRef jo_Object( *this, jo_class ); // method Object.toString() @@ -309,7 +309,7 @@ void JNI_context::java_exc_occurred() const { m_env->ExceptionClear(); throw BridgeRuntimeError( - OUSTR("cannot get method id of java.lang.Object.toString()!") + + "cannot get method id of java.lang.Object.toString()!" + get_stack_trace() ); } OSL_ASSERT( 0 != method_Object_toString ); @@ -321,7 +321,7 @@ void JNI_context::java_exc_occurred() const { m_env->ExceptionClear(); throw BridgeRuntimeError( - OUSTR("error examining java exception object!") + + "error examining java exception object!" + get_stack_trace() ); } @@ -337,7 +337,7 @@ void JNI_context::java_exc_occurred() const { m_env->ExceptionClear(); throw BridgeRuntimeError( - OUSTR("invalid java string object!") + get_stack_trace() ); + "invalid java string object!" + get_stack_trace() ); } ustr->refCount = 1; ustr->length = len; @@ -535,7 +535,7 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL uno_ext_getMapping( #if OSL_DEBUG_LEVEL > 0 OString cstr_msg( OUStringToOString( - OUSTR("[jni_uno bridge error] ") + err.m_message, + "[jni_uno bridge error] " + err.m_message, RTL_TEXTENCODING_ASCII_US ) ); OSL_FAIL( cstr_msg.getStr() ); #else diff --git a/bridges/source/jni_uno/jni_info.h b/bridges/source/jni_uno/jni_info.h index b02bb88eb3a4..de63914631a4 100644 --- a/bridges/source/jni_uno/jni_info.h +++ b/bridges/source/jni_uno/jni_info.h @@ -356,7 +356,7 @@ inline void JNI_info::append_sig( break; default: throw BridgeRuntimeError( - OUSTR("unsupported type: ") + + "unsupported type: " + ::rtl::OUString::unacquired( &type->pTypeName ) ); } } diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx index 589cd753bbf6..9107cc796b0d 100644 --- a/bridges/source/jni_uno/jni_java2uno.cxx +++ b/bridges/source/jni_uno/jni_java2uno.cxx @@ -145,7 +145,7 @@ void Bridge::handle_uno_exc( JNI_context const & jni, uno_Any * uno_exc ) const else { OUString message( - OUSTR("thrown exception is no uno exception: ") + + "thrown exception is no uno exception: " + OUString::unacquired( &uno_exc->pType->pTypeName ) + jni.get_stack_trace() ); uno_any_destruct( uno_exc, 0 ); @@ -433,7 +433,7 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call( if (! jo_type_name.is()) { throw BridgeRuntimeError( - OUSTR("incomplete type object: no type name!") + + "incomplete type object: no type name!" + jni.get_stack_trace() ); } OUString type_name( @@ -443,7 +443,7 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call( if (typelib_TypeClass_INTERFACE != info->m_td.get()->eTypeClass) { throw BridgeRuntimeError( - OUSTR("queryInterface() call demands an INTERFACE type!") ); + "queryInterface() call demands an INTERFACE type!" ); } JNI_interface_type_info const * iface_info = static_cast< JNI_interface_type_info const * >( info ); @@ -674,7 +674,7 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_finalize__J( OUString oid( jstring_to_oustring( jni, (jstring) jo_oid.get() ) ); OString cstr_msg( OUStringToOString( - OUSTR("freeing java uno proxy: ") + oid, + "freeing java uno proxy: " + oid, RTL_TEXTENCODING_ASCII_US ) ); OSL_TRACE( "%s", cstr_msg.getStr() ); } diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx index b6e3745e86f0..88922ca371fc 100644 --- a/bridges/source/jni_uno/jni_uno2java.cxx +++ b/bridges/source/jni_uno/jni_uno2java.cxx @@ -67,7 +67,7 @@ void Bridge::handle_java_exc( if (! jo_exc.is()) { throw BridgeRuntimeError( - OUSTR("java exception occurred, but no java exception available!?") + + "java exception occurred, but no java exception available!?" + jni.get_stack_trace() ); } @@ -547,7 +547,7 @@ void SAL_CALL UNO_proxy_free( uno_ExtEnvironment * env, void * proxy ) #if OSL_DEBUG_LEVEL > 1 OString cstr_msg( OUStringToOString( - OUSTR("freeing binary uno proxy: ") + that->m_oid, + "freeing binary uno proxy: " + that->m_oid, RTL_TEXTENCODING_ASCII_US ) ); OSL_TRACE( "%s", cstr_msg.getStr() ); #endif @@ -699,8 +699,7 @@ void SAL_CALL UNO_proxy_dispatch( demanded_td.get()->eTypeClass) { throw BridgeRuntimeError( - OUSTR("queryInterface() call demands " - "an INTERFACE type!") ); + "queryInterface() call demands an INTERFACE type!" ); } uno_Interface * pInterface = 0; @@ -809,7 +808,7 @@ void SAL_CALL UNO_proxy_dispatch( default: { throw BridgeRuntimeError( - OUSTR("illegal member type description!") ); + "illegal member type description!" ); } } } @@ -846,8 +845,7 @@ void SAL_CALL UNO_proxy_dispatch( { // binary identical struct ::com::sun::star::uno::RuntimeException exc( - OUSTR("[jni_uno bridge error] attaching current thread " - "to java failed!"), + "[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 = ::getCppuType( &exc ); |