From 7dac241ca0dd0e8c53c246d8490e954d5b594862 Mon Sep 17 00:00:00 2001 From: "Chr. Rossmanith" Date: Sun, 31 Mar 2013 20:41:33 +0200 Subject: Remove RTL_CONSTASCII_(U)STRINGPARAM in bridges MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id8777ee7f587846399e95cf3b1b37d669a76bae5 Reviewed-on: https://gerrit.libreoffice.org/3139 Reviewed-by: Christina Roßmanith Tested-by: Christina Roßmanith --- bridges/inc/bridges/cpp_uno/bridge.hxx | 2 +- bridges/source/cpp_uno/gcc3_aix_powerpc/except.cxx | 2 +- bridges/source/cpp_uno/gcc3_ios_arm/except.cxx | 2 +- bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx | 2 +- bridges/source/cpp_uno/gcc3_linux_arm/except.cxx | 2 +- bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx | 2 +- bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx | 2 +- bridges/source/cpp_uno/gcc3_linux_intel/except.cxx | 2 +- bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx | 2 +- bridges/source/cpp_uno/gcc3_linux_mips/except.cxx | 2 +- .../source/cpp_uno/gcc3_linux_powerpc/except.cxx | 2 +- .../source/cpp_uno/gcc3_linux_powerpc64/except.cxx | 2 +- bridges/source/cpp_uno/gcc3_linux_s390/except.cxx | 2 +- bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx | 2 +- bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx | 2 +- .../source/cpp_uno/gcc3_linux_x86-64/except.cxx | 2 +- .../source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx | 4 +- .../source/cpp_uno/gcc3_macosx_intel/except.cxx | 2 +- .../source/cpp_uno/gcc3_macosx_powerpc/except.cxx | 2 +- .../source/cpp_uno/gcc3_macosx_x86-64/except.cxx | 2 +- .../source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx | 4 +- .../source/cpp_uno/gcc3_solaris_intel/except.cxx | 2 +- .../source/cpp_uno/gcc3_solaris_sparc/except.cxx | 2 +- bridges/source/cpp_uno/mingw_intel/except.cxx | 2 +- bridges/source/cpp_uno/msvc_win32_intel/except.cxx | 17 +++-- .../source/cpp_uno/msvc_win32_x86-64/except.cxx | 17 +++-- bridges/source/cpp_uno/shared/component.cxx | 2 +- bridges/source/jni_uno/jni_data.cxx | 72 ++++++++++------------ bridges/source/jni_uno/jni_info.cxx | 23 +++---- bridges/source/jni_uno/jni_info.h | 18 +++--- bridges/source/jni_uno/jni_java2uno.cxx | 28 ++++----- bridges/source/jni_uno/jni_uno2java.cxx | 29 ++++----- bridges/test/java_uno/any/transport.cxx | 4 +- bridges/test/testclient.cxx | 6 +- bridges/test/testoffice.cxx | 6 +- bridges/test/testsameprocess.cxx | 8 +-- bridges/test/testserver.cxx | 6 +- 37 files changed, 127 insertions(+), 161 deletions(-) (limited to 'bridges') diff --git a/bridges/inc/bridges/cpp_uno/bridge.hxx b/bridges/inc/bridges/cpp_uno/bridge.hxx index 3fe9bc59bc82..3e8eca450f3e 100644 --- a/bridges/inc/bridges/cpp_uno/bridge.hxx +++ b/bridges/inc/bridges/cpp_uno/bridge.hxx @@ -399,7 +399,7 @@ inline const OUString & SAL_CALL cppu_cppenv_getStaticOIdPart() SAL_THROW(()) if (! s_pStaticOidPart) { OUStringBuffer aRet( 64 ); - aRet.appendAscii( RTL_CONSTASCII_STRINGPARAM("];") ); + aRet.append( "];" ); // good guid sal_uInt8 ar[16]; ::rtl_getGlobalProcessId( ar ); diff --git a/bridges/source/cpp_uno/gcc3_aix_powerpc/except.cxx b/bridges/source/cpp_uno/gcc3_aix_powerpc/except.cxx index 5afea9d5c337..9ce12f618540 100644 --- a/bridges/source/cpp_uno/gcc3_aix_powerpc/except.cxx +++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/except.cxx @@ -129,7 +129,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx index 41af149ebcc2..45c6956f122e 100644 --- a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx +++ b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx @@ -122,7 +122,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx b/bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx index 72774e3083e6..95e44d40c9b9 100644 --- a/bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx @@ -129,7 +129,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx index 1e8917e0fba5..bb3694e72fe2 100644 --- a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx @@ -136,7 +136,7 @@ namespace CPPU_CURRENT_NAMESPACE { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx index 73124c4afe63..73ddede13810 100644 --- a/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx @@ -130,7 +130,7 @@ namespace CPPU_CURRENT_NAMESPACE { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx index 72774e3083e6..95e44d40c9b9 100644 --- a/bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx @@ -129,7 +129,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx index 95259f9dcb32..3eaceb4afc9c 100644 --- a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx @@ -135,7 +135,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx b/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx index 73124c4afe63..73ddede13810 100644 --- a/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx @@ -130,7 +130,7 @@ namespace CPPU_CURRENT_NAMESPACE { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx b/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx index 3014c1306c41..e8608b3eabb1 100644 --- a/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_mips/except.cxx @@ -127,7 +127,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx index 72774e3083e6..95e44d40c9b9 100644 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx @@ -129,7 +129,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx index 72774e3083e6..95e44d40c9b9 100644 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx @@ -129,7 +129,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/except.cxx b/bridges/source/cpp_uno/gcc3_linux_s390/except.cxx index 72774e3083e6..95e44d40c9b9 100644 --- a/bridges/source/cpp_uno/gcc3_linux_s390/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_s390/except.cxx @@ -129,7 +129,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx b/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx index 72774e3083e6..95e44d40c9b9 100644 --- a/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx @@ -129,7 +129,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx index 2870b38aca14..5c4ad93bc6ea 100644 --- a/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx @@ -128,7 +128,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx index 6991d5becfc1..ea38f2973e92 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx @@ -137,7 +137,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx index d5711a5e7ac8..cbf45bb094d2 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx @@ -239,9 +239,9 @@ static void cpp_call( throw; } catch (const std::exception & e) { OUStringBuffer buf; - buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("C++ code threw ")); + buf.append("C++ code threw "); appendCString(buf, typeid(e).name()); - buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(": ")); + buf.append(": "); appendCString(buf, e.what()); throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface >()); diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx index c5dd24630ff3..f00c0ed4ff46 100644 --- a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx +++ b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx @@ -183,7 +183,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx index 04ad578b16e2..a4ba995c5a23 100644 --- a/bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx +++ b/bridges/source/cpp_uno/gcc3_macosx_powerpc/except.cxx @@ -128,7 +128,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx index 1c2c54c69a8e..3147d6d7541f 100644 --- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx +++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx @@ -186,7 +186,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx index d5711a5e7ac8..cbf45bb094d2 100644 --- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx @@ -239,9 +239,9 @@ static void cpp_call( throw; } catch (const std::exception & e) { OUStringBuffer buf; - buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("C++ code threw ")); + buf.append("C++ code threw "); appendCString(buf, typeid(e).name()); - buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(": ")); + buf.append(": "); appendCString(buf, e.what()); throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface >()); diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx b/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx index d3058e4b3e49..97fbbc98c3b5 100644 --- a/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx +++ b/bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx @@ -130,7 +130,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx b/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx index 5bce4876d3d5..996eb5aac46c 100644 --- a/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx +++ b/bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx @@ -127,7 +127,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") ); + buf.append( "_ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/mingw_intel/except.cxx b/bridges/source/cpp_uno/mingw_intel/except.cxx index e86ab574a862..ae82fbb13483 100644 --- a/bridges/source/cpp_uno/mingw_intel/except.cxx +++ b/bridges/source/cpp_uno/mingw_intel/except.cxx @@ -130,7 +130,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR { // RTTI symbol OStringBuffer buf( 64 ); - buf.append( RTL_CONSTASCII_STRINGPARAM("__ZTIN") ); + buf.append( "__ZTIN" ); sal_Int32 index = 0; do { diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx index 497958d0307f..c6345e2fb3e0 100644 --- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx +++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx @@ -67,7 +67,7 @@ static inline OUString toUNOname( OUString const & rRTTIname ) throw () static inline OUString toRTTIname( OUString const & rUNOname ) throw () { OUStringBuffer aRet( 64 ); - aRet.appendAscii( RTL_CONSTASCII_STRINGPARAM(".?AV") ); // class ".?AV"; struct ".?AU" + aRet.appendAscii( ".?AV" ); // class ".?AV"; struct ".?AU" sal_Int32 nPos = rUNOname.getLength(); while (nPos > 0) { @@ -550,15 +550,13 @@ int msci_filterCppException( if (pExcTypeDescr == 0) { OUStringBuffer buf; - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM( + buf.append( "[msci_uno bridge error] UNO type of " - "C++ exception unknown: \"") ); + "C++ exception unknown: \"" ); buf.append( aUNOname ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( - "\", RTTI-name=\"") ); + buf.append( "\", RTTI-name=\"" ); buf.append( aRTTIname ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\"!") ); + buf.append( "\"!" ); RuntimeException exc( buf.makeStringAndClear(), Reference< XInterface >() ); uno_type_any_constructAndConvert( @@ -586,9 +584,8 @@ int msci_filterCppException( // though this unknown exception leaks now, no user-defined exception // is ever thrown thru the binary C-UNO dispatcher call stack. RuntimeException exc( - OUString( RTL_CONSTASCII_USTRINGPARAM( - "[msci_uno bridge error] unexpected " - "C++ exception occurred!") ), + OUString( "[msci_uno bridge error] unexpected " + "C++ exception occurred!" ), Reference< XInterface >() ); uno_type_any_constructAndConvert( pUnoExc, &exc, ::getCppuType( &exc ).getTypeLibType(), pCpp2Uno ); diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx index 5f47dc52d252..fa3f3ae8824b 100644 --- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx +++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx @@ -285,7 +285,7 @@ static inline OUString toRTTIname( throw () { OUStringBuffer aRet( 64 ); - aRet.appendAscii( RTL_CONSTASCII_STRINGPARAM(".?AV") ); // class ".?AV"; struct ".?AU" + aRet.append( ".?AV" ); // class ".?AV"; struct ".?AU" sal_Int32 nPos = rUNOname.getLength(); while (nPos > 0) { @@ -776,15 +776,13 @@ int mscx_filterCppException( if (pExcTD == NULL) { OUStringBuffer buf; - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM( + buf.append( "[mscx_uno bridge error] UNO type of " - "C++ exception unknown: \"") ); + "C++ exception unknown: \"" ); buf.append( aUNOname ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( - "\", RTTI-name=\"") ); + buf.append( "\", RTTI-name=\"" ); buf.append( aRTTIname ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\"!") ); + buf.append( "\"!" ); RuntimeException exc( buf.makeStringAndClear(), Reference< XInterface >() ); uno_type_any_constructAndConvert( @@ -807,9 +805,8 @@ int mscx_filterCppException( // though this unknown exception leaks now, no user-defined exception // is ever thrown thru the binary C-UNO dispatcher call stack. RuntimeException exc( - OUString( RTL_CONSTASCII_USTRINGPARAM( - "[mscx_uno bridge error] unexpected " - "C++ exception occurred!") ), + OUString( "[mscx_uno bridge error] unexpected " + "C++ exception occurred!" ), Reference< XInterface >() ); uno_type_any_constructAndConvert( pUnoExc, &exc, ::getCppuType( &exc ).getTypeLibType(), pCpp2Uno ); diff --git a/bridges/source/cpp_uno/shared/component.cxx b/bridges/source/cpp_uno/shared/component.cxx index fe89c7bc764d..89422eb50983 100644 --- a/bridges/source/cpp_uno/shared/component.cxx +++ b/bridges/source/cpp_uno/shared/component.cxx @@ -64,7 +64,7 @@ const OUString & SAL_CALL cppu_cppenv_getStaticOIdPart() SAL_THROW(()) if (! s_pStaticOidPart) { OUStringBuffer aRet( 64 ); - aRet.appendAscii( RTL_CONSTASCII_STRINGPARAM("];") ); + aRet.append( "];" ); // good guid sal_uInt8 ar[16]; ::rtl_getGlobalProcessId( ar ); diff --git a/bridges/source/jni_uno/jni_data.cxx b/bridges/source/jni_uno/jni_data.cxx index be63f0382462..b73866cbc76c 100644 --- a/bridges/source/jni_uno/jni_data.cxx +++ b/bridges/source/jni_uno/jni_data.cxx @@ -386,9 +386,9 @@ void Bridge::map_to_uno( if (0 == java_data.l) { OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[map_to_uno():") ); + buf.append( "[map_to_uno():" ); buf.append( OUString::unacquired( &type->pTypeName ) ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("] null-ref given!") ); + buf.append( "] null-ref given!" ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); } @@ -411,9 +411,9 @@ void Bridge::map_to_uno( if (0 == java_data.l) { OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[map_to_uno():") ); + buf.append( "[map_to_uno():" ); buf.append( OUString::unacquired( &type->pTypeName ) ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("] null-ref given!") ); + buf.append( "] null-ref given!" ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); } @@ -425,11 +425,10 @@ void Bridge::map_to_uno( if (! jo_type_name.is()) { OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[map_to_uno():") ); + buf.append( "[map_to_uno():" ); buf.append( OUString::unacquired( &type->pTypeName ) ); - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("] incomplete type object: " - "no type name!") ); + buf.append("] incomplete type object: " + "no type name!" ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); } @@ -439,10 +438,9 @@ void Bridge::map_to_uno( if (! td.is()) { OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[map_to_uno():") ); + buf.append( "[map_to_uno():" ); buf.append( OUString::unacquired( &type->pTypeName ) ); - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("] UNO type not found: ") ); + buf.append( "] UNO type not found: " ); buf.append( type_name ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); @@ -489,11 +487,9 @@ void Bridge::map_to_uno( if (! jo_type.is()) { OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[map_to_uno():") ); + buf.append( "[map_to_uno():" ); buf.append( OUString::unacquired( &type->pTypeName ) ); - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("] no type set at " - "com.sun.star.uno.Any!") ); + buf.append( "] no type set at " "com.sun.star.uno.Any!" ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); } @@ -532,10 +528,9 @@ void Bridge::map_to_uno( if (! value_td.is()) { OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[map_to_uno():") ); + buf.append( "[map_to_uno():" ); buf.append( OUString::unacquired( &type->pTypeName ) ); - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("] UNO type not found: ") ); + buf.append( "] UNO type not found: " ); buf.append( type_name ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); @@ -684,11 +679,9 @@ void Bridge::map_to_uno( default: { OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[map_to_uno():") ); + buf.append( "[map_to_uno():" ); buf.append( type_name ); - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("] unsupported value type " - "of any!") ); + buf.append( "] unsupported value type " "of any!" ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); } @@ -720,9 +713,9 @@ void Bridge::map_to_uno( if (0 == java_data.l) { OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[map_to_uno():") ); + buf.append( "[map_to_uno():" ); buf.append( OUString::unacquired( &type->pTypeName ) ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("] null-ref given!") ); + buf.append( "] null-ref given!" ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); } @@ -745,9 +738,9 @@ void Bridge::map_to_uno( if (0 == java_data.l) { OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[map_to_uno():") ); + buf.append( "[map_to_uno():" ); buf.append( OUString::unacquired( &type->pTypeName ) ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("] null-ref given!") ); + buf.append( "] null-ref given!" ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); } @@ -1017,9 +1010,9 @@ void Bridge::map_to_uno( if (0 == java_data.l) { OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[map_to_uno():") ); + buf.append( "[map_to_uno():" ); buf.append( OUString::unacquired( &type->pTypeName ) ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("] null-ref given!") ); + buf.append( "] null-ref given!" ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); } @@ -1155,11 +1148,9 @@ void Bridge::map_to_uno( default: { OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[map_to_uno():") ); + buf.append( "[map_to_uno():" ); buf.append( OUString::unacquired( &type->pTypeName ) ); - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("] unsupported sequence element" - " type: ") ); + buf.append( "] unsupported sequence element" " type: " ); buf.append( OUString::unacquired( &element_type->pTypeName ) ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); @@ -1212,9 +1203,9 @@ void Bridge::map_to_uno( default: { OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[map_to_uno():") ); + buf.append( "[map_to_uno():" ); buf.append( OUString::unacquired( &type->pTypeName ) ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("] unsupported type!") ); + buf.append( "] unsupported type!" ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); } @@ -1878,7 +1869,7 @@ void Bridge::map_to_java( { // call static .fromInt( int ) OStringBuffer sig_buf( 5 + class_name.getLength() ); - sig_buf.append( RTL_CONSTASCII_STRINGPARAM("(I)L") ); + sig_buf.append( "(I)L" ); sig_buf.append( class_name.replace( '.', '/' ) ); sig_buf.append( ';' ); OString sig( sig_buf.makeStringAndClear() ); @@ -2367,7 +2358,7 @@ void Bridge::map_to_java( { // call static .fromInt( int ) OStringBuffer sig_buf( 5 + class_name.getLength() ); - sig_buf.append( RTL_CONSTASCII_STRINGPARAM("(I)L") ); + sig_buf.append( "(I)L" ); sig_buf.append( class_name.replace( '.', '/' ) ); sig_buf.append( ';' ); OString sig( sig_buf.makeStringAndClear() ); @@ -2486,10 +2477,9 @@ void Bridge::map_to_java( default: { OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[map_to_java():") ); + buf.append( "[map_to_java():" ); buf.append( OUString::unacquired( &type->pTypeName ) ); - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("] unsupported element type: ") ); + buf.append( "] unsupported element type: " ); buf.append( OUString::unacquired( &element_type->pTypeName ) ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); @@ -2568,9 +2558,9 @@ void Bridge::map_to_java( default: { OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[map_to_java():") ); + buf.append( "[map_to_java():" ); buf.append( OUString::unacquired( &type->pTypeName ) ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("] unsupported type!") ); + buf.appendAscii( "] unsupported type!" ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); } diff --git a/bridges/source/jni_uno/jni_info.cxx b/bridges/source/jni_uno/jni_info.cxx index 61dd3e8420be..ad0b52b46368 100644 --- a/bridges/source/jni_uno/jni_info.cxx +++ b/bridges/source/jni_uno/jni_info.cxx @@ -46,8 +46,7 @@ JNI_type_info::JNI_type_info( if (! m_td.get()->bComplete) { OUStringBuffer buf( 128 ); - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("cannot make type complete: ") ); + buf.append( "cannot make type complete: " ); buf.append( OUString::unacquired( &m_td.get()->pTypeName ) ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); @@ -168,11 +167,11 @@ JNI_interface_type_info::JNI_interface_type_info( &attribute_td->aBase.pMemberName ); // getter - sig_buf.append( RTL_CONSTASCII_STRINGPARAM("()") ); + sig_buf.append( "()" ); sig_buf.append( type_sig ); OString method_signature( sig_buf.makeStringAndClear() ); OUStringBuffer name_buf( 3 + member_name.getLength() ); - name_buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("get") ); + name_buf.append( "get" ); name_buf.append( member_name ); OString method_name( OUStringToOString( @@ -190,11 +189,10 @@ JNI_interface_type_info::JNI_interface_type_info( sig_buf.ensureCapacity( 64 ); sig_buf.append( '(' ); sig_buf.append( type_sig ); - sig_buf.append( RTL_CONSTASCII_STRINGPARAM(")V") ); + sig_buf.append( ")V" ); method_signature = sig_buf.makeStringAndClear(); name_buf.ensureCapacity( 3 + member_name.getLength() ); - name_buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("set") ); + name_buf.append( "set" ); name_buf.append( member_name ); method_name = OUStringToOString( name_buf.makeStringAndClear(), @@ -312,8 +310,7 @@ JNI_compound_type_info::JNI_compound_type_info( && reinterpret_cast< typelib_StructTypeDescription * >( td)->pParameterizedTypes[nPos]) { - sig = OString( - RTL_CONSTASCII_STRINGPARAM("Ljava/lang/Object;")); + sig = OString( "Ljava/lang/Object;" ); } else { OStringBuffer sig_buf( 32 ); JNI_info::append_sig( &sig_buf, td->ppTypeRefs[ nPos ] ); @@ -366,8 +363,7 @@ JNI_type_info const * JNI_info::create_type_info( default: { OUStringBuffer buf( 128 ); - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("type info not supported for ") ); + buf.append( "type info not supported for " ); buf.append( uno_name ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); @@ -466,8 +462,7 @@ JNI_type_info const * JNI_info::get_type_info( if (! td.is()) { OUStringBuffer buf( 128 ); - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("UNO type not found: ") ); + buf.append( "UNO type not found: " ); buf.append( uno_name ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); @@ -756,7 +751,7 @@ JNI_info::JNI_info( OSL_ASSERT( 0 != m_field_JNI_proxy_m_oid ); // get java env - OUString java_env_type_name( RTL_CONSTASCII_USTRINGPARAM(UNO_LB_JAVA) ); + OUString java_env_type_name( UNO_LB_JAVA ); JLocalAutoRef jo_java( jni, ustring_to_jstring( jni, java_env_type_name.pData ) ); jvalue args[ 2 ]; diff --git a/bridges/source/jni_uno/jni_info.h b/bridges/source/jni_uno/jni_info.h index de63914631a4..ecc1cc2d74e8 100644 --- a/bridges/source/jni_uno/jni_info.h +++ b/bridges/source/jni_uno/jni_info.h @@ -279,25 +279,23 @@ inline void JNI_info::append_sig( break; case typelib_TypeClass_STRING: if ( use_slashes ) { - buf->append( RTL_CONSTASCII_STRINGPARAM("Ljava/lang/String;") ); + buf->append( "Ljava/lang/String;" ); } else { - buf->append( RTL_CONSTASCII_STRINGPARAM("Ljava.lang.String;") ); + buf->append( "Ljava.lang.String;" ); } break; case typelib_TypeClass_TYPE: if ( use_slashes ) { - buf->append( - RTL_CONSTASCII_STRINGPARAM("Lcom/sun/star/uno/Type;") ); + buf->append( "Lcom/sun/star/uno/Type;" ); } else { - buf->append( - RTL_CONSTASCII_STRINGPARAM("Lcom.sun.star.uno.Type;") ); + buf->append( "Lcom.sun.star.uno.Type;" ); } break; case typelib_TypeClass_ANY: if ( use_slashes ) { - buf->append( RTL_CONSTASCII_STRINGPARAM("Ljava/lang/Object;") ); + buf->append( "Ljava/lang/Object;" ); } else { - buf->append( RTL_CONSTASCII_STRINGPARAM("Ljava.lang.Object;") ); + buf->append( "Ljava.lang.Object;" ); } break; case typelib_TypeClass_ENUM: @@ -337,9 +335,9 @@ inline void JNI_info::append_sig( if (use_Object_for_type_XInterface && is_XInterface( type )) { if ( use_slashes ) { - buf->append( RTL_CONSTASCII_STRINGPARAM("Ljava/lang/Object;") ); + buf->append( "Ljava/lang/Object;" ); } else { - buf->append( RTL_CONSTASCII_STRINGPARAM("Ljava.lang.Object;") ); + buf->append( "Ljava.lang.Object;" ); } } else diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx index 9107cc796b0d..b6a200ea46f5 100644 --- a/bridges/source/jni_uno/jni_java2uno.cxx +++ b/bridges/source/jni_uno/jni_java2uno.cxx @@ -97,10 +97,9 @@ void Bridge::handle_uno_exc( JNI_context const & jni, uno_Any * uno_exc ) const #if OSL_DEBUG_LEVEL > 1 { OUStringBuffer buf( 128 ); - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("exception occurred java->uno: [") ); + buf.append( "exception occurred java->uno: [" ); buf.append( OUString::unacquired( &uno_exc->pType->pTypeName ) ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("] ") ); + buf.append( "] " ); buf.append( reinterpret_cast< ::com::sun::star::uno::Exception const * >( uno_exc->pData )->Message ); @@ -135,8 +134,7 @@ void Bridge::handle_uno_exc( JNI_context const & jni, uno_Any * uno_exc ) const jo_exc.get(), m_jni_info->m_method_Object_toString, 0 ) ); jni.ensure_no_exception(); OUStringBuffer buf( 128 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( - "throwing java exception failed: ") ); + buf.append( "throwing java exception failed: " ); buf.append( jstring_to_oustring( jni, (jstring) jo_descr.get() ) ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); @@ -401,9 +399,9 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call( #if OSL_DEBUG_LEVEL > 1 { OUStringBuffer trace_buf( 64 ); - trace_buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("java->uno call: ") ); + trace_buf.append( "java->uno call: " ); trace_buf.append( method_name ); - trace_buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" on oid ") ); + trace_buf.append( " on oid " ); JLocalAutoRef jo_oid( jni, jni->GetObjectField( jo_proxy, jni_info->m_field_JNI_proxy_m_oid ) ); @@ -596,11 +594,10 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call( } // the thing that should not be... no method info found! OUStringBuffer buf( 64 ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( - "calling undeclared function on interface ") ); + buf.append( "calling undeclared function on interface " ); buf.append( OUString::unacquired( &((typelib_TypeDescription *)td)->pTypeName ) ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(": ") ); + buf.append( ": " ); buf.append( method_name ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); @@ -608,11 +605,9 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call( catch (const BridgeRuntimeError & err) { OUStringBuffer buf( 128 ); - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("[jni_uno bridge error] " - "Java calling UNO method ") ); + buf.append( "[jni_uno bridge error] " "Java calling UNO method " ); buf.append( method_name ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(": ") ); + buf.append( ": " ); buf.append( err.m_message ); // notify RuntimeException OString cstr_msg( @@ -629,9 +624,8 @@ JNICALL Java_com_sun_star_bridges_jni_1uno_JNI_1proxy_dispatch_1call( catch (const ::jvmaccess::VirtualMachine::AttachGuard::CreationException &) { OString cstr_msg( - OString( RTL_CONSTASCII_STRINGPARAM( - "[jni_uno bridge error] " - "attaching current thread to java failed!") ) + + OString( "[jni_uno bridge error] " + "attaching current thread to java failed!" ) + OUStringToOString( jni.get_stack_trace(), RTL_TEXTENCODING_JAVA_UTF8 ) ); OSL_FAIL( cstr_msg.getStr() ); diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx index 88922ca371fc..9ba852f1f7ac 100644 --- a/bridges/source/jni_uno/jni_uno2java.cxx +++ b/bridges/source/jni_uno/jni_uno2java.cxx @@ -88,8 +88,7 @@ void Bridge::handle_java_exc( jo_exc.get(), m_jni_info->m_method_Object_toString, 0 ) ); jni.ensure_no_exception(); OUStringBuffer buf( 128 ); - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("non-UNO exception occurred: ") ); + buf.append( "non-UNO exception occurred: " ); buf.append( jstring_to_oustring( jni, (jstring) jo_descr.get() ) ); buf.append( jni.get_stack_trace( jo_exc.get() ) ); throw BridgeRuntimeError( buf.makeStringAndClear() ); @@ -116,10 +115,9 @@ void Bridge::handle_java_exc( #if OSL_DEBUG_LEVEL > 1 OUStringBuffer trace_buf( 128 ); - trace_buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("exception occurred uno->java: [") ); + trace_buf.append( "exception occurred uno->java: [" ); trace_buf.append( exc_name ); - trace_buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("] ") ); + trace_buf.append( "] " ); trace_buf.append( reinterpret_cast< ::com::sun::star::uno::Exception const * >( uno_exc->pData )->Message ); @@ -152,8 +150,7 @@ void Bridge::call_java( iface_holder.makeComplete(); if (! iface_holder.get()->bComplete) { OUStringBuffer buf; - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("cannot make type complete: ") ); + buf.append( "cannot make type complete: " ); buf.append( OUString::unacquired(&iface_holder.get()->pTypeName) ); buf.append( jni.get_stack_trace() ); throw BridgeRuntimeError( buf.makeStringAndClear() ); @@ -226,7 +223,7 @@ void Bridge::call_java( #if OSL_DEBUG_LEVEL > 1 OUStringBuffer trace_buf( 128 ); - trace_buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("calling ") ); + trace_buf.append( "calling " ); JLocalAutoRef jo_method( jni, jni->ToReflectedMethod( info->m_class, method_id, JNI_FALSE ) ); jni.ensure_no_exception(); @@ -235,20 +232,20 @@ void Bridge::call_java( jo_method.get(), m_jni_info->m_method_Object_toString, 0 ) ); jni.ensure_no_exception(); trace_buf.append( jstring_to_oustring( jni, (jstring) jo_descr.get() ) ); - trace_buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" on ") ); + trace_buf.append( " on " ); jo_descr.reset( jni->CallObjectMethodA( javaI, m_jni_info->m_method_Object_toString, 0 ) ); jni.ensure_no_exception(); trace_buf.append( jstring_to_oustring( jni, (jstring) jo_descr.get() ) ); - trace_buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" (") ); + trace_buf.append( " (" ); JLocalAutoRef jo_class( jni, jni->GetObjectClass( javaI ) ); jo_descr.reset( jni->CallObjectMethodA( jo_class.get(), m_jni_info->m_method_Object_toString, 0 ) ); jni.ensure_no_exception(); trace_buf.append( jstring_to_oustring( jni, (jstring) jo_descr.get() ) ); - trace_buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(")") ); + trace_buf.append( ")" ); OString cstr_trace( OUStringToOString( trace_buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); @@ -612,9 +609,9 @@ void SAL_CALL UNO_proxy_dispatch( #if OSL_DEBUG_LEVEL > 1 OUStringBuffer trace_buf( 64 ); - trace_buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("uno->java call: ") ); + trace_buf.append( "uno->java call: " ); trace_buf.append( OUString::unacquired( &member_td->pTypeName ) ); - trace_buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" on oid ") ); + trace_buf.append( " on oid " ); trace_buf.append( that->m_oid ); OString cstr_msg( OUStringToOString( @@ -815,9 +812,7 @@ void SAL_CALL UNO_proxy_dispatch( catch (BridgeRuntimeError & err) { OUStringBuffer buf( 128 ); - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM( - "[jni_uno bridge error] UNO calling Java method ") ); + buf.append( "[jni_uno bridge error] UNO calling Java method " ); if (typelib_TypeClass_INTERFACE_METHOD == member_td->eTypeClass || typelib_TypeClass_INTERFACE_ATTRIBUTE == member_td->eTypeClass) { @@ -826,7 +821,7 @@ void SAL_CALL UNO_proxy_dispatch( typelib_InterfaceMemberTypeDescription const * >( member_td )->pMemberName ) ); } - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(": ") ); + buf.append( ": " ); buf.append( err.m_message ); // binary identical struct ::com::sun::star::uno::RuntimeException exc( diff --git a/bridges/test/java_uno/any/transport.cxx b/bridges/test/java_uno/any/transport.cxx index dbf900ad6d82..fda624987eca 100644 --- a/bridges/test/java_uno/any/transport.cxx +++ b/bridges/test/java_uno/any/transport.cxx @@ -77,8 +77,8 @@ extern "C" JNIEXPORT jobject JNICALL Java_test_java_1uno_anytest_TestJni_create_ throw; } // create uno envs - OUString java_name( RTL_CONSTASCII_USTRINGPARAM(UNO_LB_JAVA) ); - OUString cpp_name( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) ); + OUString java_name( UNO_LB_JAVA ); + OUString cpp_name( CPPU_CURRENT_LANGUAGE_BINDING_NAME ); Environment java_env, cpp_env; uno_getEnvironment( (uno_Environment **)&java_env, java_name.pData, vm.get() ); OSL_ASSERT( java_env.is() ); diff --git a/bridges/test/testclient.cxx b/bridges/test/testclient.cxx index 052f598ba5e2..52f70bff08f9 100644 --- a/bridges/test/testclient.cxx +++ b/bridges/test/testclient.cxx @@ -132,7 +132,7 @@ int main( int argc, char *argv[] ) Reference < XConnector > rConnector( createComponent( OUString("com.sun.star.connection.Connector"), - OUString( RTL_CONSTASCII_USTRINGPARAM("connector.uno" SAL_DLLEXTENSION)), + OUString( "connector.uno" SAL_DLLEXTENSION), rSMgr ), UNO_QUERY ); @@ -155,12 +155,12 @@ int main( int argc, char *argv[] ) { // just ensure that it is registered createComponent( OUString("com.sun.star.bridge.Bridge.iiop"), - OUString( RTL_CONSTASCII_USTRINGPARAM("remotebridge.uno" SAL_DLLEXTENSION)), + OUString( "remotebridge.uno" SAL_DLLEXTENSION), rSMgr ); Reference < XBridgeFactory > rFactory( createComponent( OUString("com.sun.star.bridge.BridgeFactory"), - OUString( RTL_CONSTASCII_USTRINGPARAM("bridgefac.uno" SAL_DLLEXTENSION)), + OUString( "bridgefac.uno" SAL_DLLEXTENSION), rSMgr ), UNO_QUERY ); diff --git a/bridges/test/testoffice.cxx b/bridges/test/testoffice.cxx index 3f9157d01c3b..8c18fbf25a6d 100644 --- a/bridges/test/testoffice.cxx +++ b/bridges/test/testoffice.cxx @@ -209,17 +209,17 @@ int main( int argc, char *argv[] ) Reference < XConnector > rConnector( createComponent( OUString("com.sun.star.connection.Connector"), - OUString( RTL_CONSTASCII_USTRINGPARAM("connector.uno" SAL_DLLEXTENSION)), + OUString( "connector.uno" SAL_DLLEXTENSION), rSMgr ), UNO_QUERY ); createComponent( OUString("com.sun.star.bridge.Bridge.iiop"), - OUString( RTL_CONSTASCII_USTRINGPARAM("remotebridge.uno" SAL_DLLEXTENSION)), + OUString( "remotebridge.uno" SAL_DLLEXTENSION), rSMgr ); Reference < XBridgeFactory > rFactory( createComponent( OUString("com.sun.star.bridge.BridgeFactory"), - OUString( RTL_CONSTASCII_USTRINGPARAM("bridgefac.uno" SAL_DLLEXTENSION)), + OUString( "bridgefac.uno" SAL_DLLEXTENSION), rSMgr ), UNO_QUERY ); diff --git a/bridges/test/testsameprocess.cxx b/bridges/test/testsameprocess.cxx index 00d399b25400..675ec857e08e 100644 --- a/bridges/test/testsameprocess.cxx +++ b/bridges/test/testsameprocess.cxx @@ -123,24 +123,24 @@ int main( int argc, char *argv[] ) Reference < XConnector > rConnector( createComponent( OUString("com.sun.star.connection.Connector"), - OUString( RTL_CONSTASCII_USTRINGPARAM("connector.uno" SAL_DLLEXTENSION)), + OUString( "connector.uno" SAL_DLLEXTENSION), rSMgr ), UNO_QUERY ); Reference < XAcceptor > rAcceptor( createComponent( OUString("com.sun.star.connection.Acceptor"), - OUString( RTL_CONSTASCII_USTRINGPARAM("acceptor.uno" SAL_DLLEXTENSION)), + OUString( "acceptor.uno" SAL_DLLEXTENSION), rSMgr ), UNO_QUERY ); // just ensure that it is registered // createComponent( OUString("com.sun.star.bridge.Bridge.iiop"), -// OUString( RTL_CONSTASCII_USTRINGPARAM("iiopbrdg" SAL_DLLEXTENSION)), +// OUString( "iiopbrdg" SAL_DLLEXTENSION), // rSMgr ); Reference < XBridgeFactory > rFactory( createComponent( OUString("com.sun.star.bridge.BridgeFactory"), - OUString( RTL_CONSTASCII_USTRINGPARAM("bridgefac.uno" SAL_DLLEXTENSION)), + OUString( "bridgefac.uno" SAL_DLLEXTENSION), rSMgr ), UNO_QUERY ); diff --git a/bridges/test/testserver.cxx b/bridges/test/testserver.cxx index 4617b2350739..8aefdfd909b1 100644 --- a/bridges/test/testserver.cxx +++ b/bridges/test/testserver.cxx @@ -194,19 +194,19 @@ int main( int argc, char *argv[] ) Reference < XBridgeFactory > rBridgeFactory ( createComponent( OUString("com.sun.star.bridge.BridgeFactory"), - OUString( RTL_CONSTASCII_USTRINGPARAM("bridgefac.uno" SAL_DLLEXTENSION )), + OUString( "bridgefac.uno" SAL_DLLEXTENSION ), rSMgr ), UNO_QUERY ); createComponent( OUString("com.sun.star.bridge.Bridge.iiop"), - OUString( RTL_CONSTASCII_USTRINGPARAM("remotebridge.uno" SAL_DLLEXTENSION)), + OUString( "remotebridge.uno" SAL_DLLEXTENSION), rSMgr ); Reference < XAcceptor > rAcceptor( createComponent( OUString("com.sun.star.connection.Acceptor"), - OUString( RTL_CONSTASCII_USTRINGPARAM("acceptor.uno" SAL_DLLEXTENSION)), + OUString( "acceptor.uno" SAL_DLLEXTENSION), rSMgr ) , UNO_QUERY ); -- cgit