summaryrefslogtreecommitdiff
path: root/bridges/source/jni_uno/jni_info.h
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-06-04 02:01:10 +0000
committerOliver Bolte <obo@openoffice.org>2004-06-04 02:01:10 +0000
commit3c2290492612985757cbf0e790a8f844fc33a870 (patch)
tree4fd67c89ae030723699ffb5af775812c64f53701 /bridges/source/jni_uno/jni_info.h
parent85c2b4c869757471b2d8c3672ec2b905c906e306 (diff)
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.
Diffstat (limited to 'bridges/source/jni_uno/jni_info.h')
-rw-r--r--bridges/source/jni_uno/jni_info.h22
1 files changed, 16 insertions, 6 deletions
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;
}