From 3c2290492612985757cbf0e790a8f844fc33a870 Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Fri, 4 Jun 2004 02:01:10 +0000 Subject: INTEGRATION: CWS sb18 (1.9.44); FILE MERGED 2004/05/21 10:11:12 sb 1.9.44.2: #i21150# m_base no longer needed for JNI_interface_type_info. 2004/05/13 16:53:32 sb 1.9.44.1: #i21150# Adapted to polymorphic struct types. --- bridges/source/jni_uno/jni_info.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'bridges/source') diff --git a/bridges/source/jni_uno/jni_info.h b/bridges/source/jni_uno/jni_info.h index e1c0d894ae21..e689e834fbb4 100644 --- a/bridges/source/jni_uno/jni_info.h +++ b/bridges/source/jni_uno/jni_info.h @@ -2,9 +2,9 @@ * * $RCSfile: jni_info.h,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: obo $ $Date: 2003-09-04 10:50:34 $ + * last change: $Author: obo $ $Date: 2004-06-04 03:01:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -104,7 +104,6 @@ inline bool is_XInterface( typelib_TypeDescriptionReference * type ) //============================================================================== struct JNI_type_info { - JNI_type_info const * m_base; ::com::sun::star::uno::TypeDescription m_td; jclass m_class; @@ -133,6 +132,7 @@ struct JNI_interface_type_info : public JNI_type_info //============================================================================== struct JNI_compound_type_info : public JNI_type_info { + JNI_type_info const * m_base; // ctor( msg ) for exceptions jmethodID m_exc_ctor; // sorted via typelib member index @@ -328,9 +328,19 @@ inline void JNI_info::append_sig( ::rtl::OUString const & uno_name = ::rtl::OUString::unacquired( &type->pTypeName ); buf->append( 'L' ); - buf->append( - ::rtl::OUStringToOString( - uno_name.replace( '.', '/' ), RTL_TEXTENCODING_JAVA_UTF8 ) ); + // Erase type arguments of instantiated polymorphic struct types: + sal_Int32 i = uno_name.indexOf( '<' ); + if ( i < 0 ) { + buf->append( + ::rtl::OUStringToOString( + uno_name.replace( '.', '/' ), + RTL_TEXTENCODING_JAVA_UTF8 ) ); + } else { + buf->append( + ::rtl::OUStringToOString( + uno_name.copy( 0, i ).replace( '.', '/' ), + RTL_TEXTENCODING_JAVA_UTF8 ) ); + } buf->append( ';' ); break; } -- cgit