summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorJean-Noël Rouvignac <jn.rouvignac@gmail.com>2013-01-30 11:44:23 +0100
committerLuboš Luňák <l.lunak@suse.cz>2013-01-30 12:54:40 +0000
commit97eb8a6e0eb830f37dcba64a51d725aab4c5ff53 (patch)
treea1a95b8249052d846a997ad1729758168d6a3b24 /bridges
parentf8569cd9a28a3a8856dba4ad53218aa6cc073521 (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')
-rw-r--r--bridges/source/jni_uno/jni_base.h6
-rw-r--r--bridges/source/jni_uno/jni_bridge.cxx16
-rw-r--r--bridges/source/jni_uno/jni_info.h2
-rw-r--r--bridges/source/jni_uno/jni_java2uno.cxx8
-rw-r--r--bridges/source/jni_uno/jni_uno2java.cxx12
-rw-r--r--bridges/test/inter_libs_exc/inter.cxx8
-rw-r--r--bridges/test/inter_libs_exc/share.h2
-rw-r--r--bridges/test/inter_libs_exc/thrower.cxx2
8 files changed, 25 insertions, 31 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 );
diff --git a/bridges/test/inter_libs_exc/inter.cxx b/bridges/test/inter_libs_exc/inter.cxx
index fe60c8ccc50a..3c1190dabb4b 100644
--- a/bridges/test/inter_libs_exc/inter.cxx
+++ b/bridges/test/inter_libs_exc/inter.cxx
@@ -35,18 +35,18 @@ extern "C" int main( int argc, char const * argv [] )
#define SAL_DLLPREFIX ""
#endif
Module mod_starter(
- OUSTR(SAL_DLLPREFIX "starter" SAL_DLLEXTENSION),
+ SAL_DLLPREFIX "starter" SAL_DLLEXTENSION,
SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL );
Module mod_thrower(
- OUSTR(SAL_DLLPREFIX "thrower" SAL_DLLEXTENSION),
+ SAL_DLLPREFIX "thrower" SAL_DLLEXTENSION,
SAL_LOADMODULE_LAZY | SAL_LOADMODULE_GLOBAL );
typedef t_throws_exc (SAL_CALL * t_get_thrower)();
- t_get_thrower get_thrower = (t_get_thrower)mod_thrower.getSymbol( OUSTR("get_thrower") );
+ t_get_thrower get_thrower = (t_get_thrower)mod_thrower.getSymbol( "get_thrower" );
t_throws_exc thrower = (*get_thrower)();
typedef void (SAL_CALL * t_starter)( t_throws_exc );
- t_starter start = (t_starter)mod_starter.getSymbol( OUSTR("start") );
+ t_starter start = (t_starter)mod_starter.getSymbol( "start" );
(*start)( thrower );
diff --git a/bridges/test/inter_libs_exc/share.h b/bridges/test/inter_libs_exc/share.h
index fffa41b5bf82..260883df0a04 100644
--- a/bridges/test/inter_libs_exc/share.h
+++ b/bridges/test/inter_libs_exc/share.h
@@ -20,8 +20,6 @@
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/uno/DeploymentException.hpp>
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
-
typedef void (SAL_CALL * t_throws_exc)();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/test/inter_libs_exc/thrower.cxx b/bridges/test/inter_libs_exc/thrower.cxx
index 5f42f4a44892..de37e1d90a70 100644
--- a/bridges/test/inter_libs_exc/thrower.cxx
+++ b/bridges/test/inter_libs_exc/thrower.cxx
@@ -27,7 +27,7 @@ using namespace ::com::sun::star::uno;
static void SAL_CALL throws_exc()
{
throw lang::IllegalArgumentException(
- OUSTR("bla"), Reference< XInterface >(), 0 );
+ "bla", Reference< XInterface >(), 0 );
}
extern "C" t_throws_exc SAL_CALL get_thrower()