diff options
Diffstat (limited to 'bridges/source/jni_uno/jni_data.cxx')
-rw-r--r-- | bridges/source/jni_uno/jni_data.cxx | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/bridges/source/jni_uno/jni_data.cxx b/bridges/source/jni_uno/jni_data.cxx index 0b19a8d99c2d..aca455d154ed 100644 --- a/bridges/source/jni_uno/jni_data.cxx +++ b/bridges/source/jni_uno/jni_data.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -560,45 +561,45 @@ void Bridge::map_to_uno( pAny->pData = &pAny->pReserved; break; case typelib_TypeClass_CHAR: - *(jchar *) &pAny->pReserved = jni->CallCharMethodA( + pAny->pData = &pAny->pReserved; + *(jchar *) pAny->pData = jni->CallCharMethodA( java_data.l, m_jni_info->m_method_Character_charValue, 0 ); jni.ensure_no_exception(); - pAny->pData = &pAny->pReserved; break; case typelib_TypeClass_BOOLEAN: - *(jboolean *) &pAny->pReserved = jni->CallBooleanMethodA( + pAny->pData = &pAny->pReserved; + *(jboolean *) pAny->pData = jni->CallBooleanMethodA( java_data.l, m_jni_info->m_method_Boolean_booleanValue, 0 ); jni.ensure_no_exception(); - pAny->pData = &pAny->pReserved; break; case typelib_TypeClass_BYTE: - *(jbyte *) &pAny->pReserved = jni->CallByteMethodA( + pAny->pData = &pAny->pReserved; + *(jbyte *) pAny->pData = jni->CallByteMethodA( java_data.l, m_jni_info->m_method_Byte_byteValue, 0 ); jni.ensure_no_exception(); - pAny->pData = &pAny->pReserved; break; case typelib_TypeClass_SHORT: case typelib_TypeClass_UNSIGNED_SHORT: - *(jshort *) &pAny->pReserved = jni->CallShortMethodA( + pAny->pData = &pAny->pReserved; + *(jshort *) pAny->pData = jni->CallShortMethodA( java_data.l, m_jni_info->m_method_Short_shortValue, 0 ); jni.ensure_no_exception(); - pAny->pData = &pAny->pReserved; break; case typelib_TypeClass_LONG: case typelib_TypeClass_UNSIGNED_LONG: - *(jint *) &pAny->pReserved = jni->CallIntMethodA( + pAny->pData = &pAny->pReserved; + *(jint *) pAny->pData = jni->CallIntMethodA( java_data.l, m_jni_info->m_method_Integer_intValue, 0 ); jni.ensure_no_exception(); - pAny->pData = &pAny->pReserved; break; case typelib_TypeClass_HYPER: case typelib_TypeClass_UNSIGNED_HYPER: if (sizeof (sal_Int64) <= sizeof (void *)) { - *(jlong *) &pAny->pReserved = jni->CallLongMethodA( + pAny->pData = &pAny->pReserved; + *(jlong *) pAny->pData = jni->CallLongMethodA( java_data.l, m_jni_info->m_method_Long_longValue, 0 ); jni.ensure_no_exception(); - pAny->pData = &pAny->pReserved; } else { @@ -613,10 +614,10 @@ void Bridge::map_to_uno( case typelib_TypeClass_FLOAT: if (sizeof (float) <= sizeof (void *)) { - *(jfloat *) &pAny->pReserved = jni->CallFloatMethodA( + pAny->pData = &pAny->pReserved; + *(jfloat *) pAny->pData = jni->CallFloatMethodA( java_data.l, m_jni_info->m_method_Float_floatValue, 0 ); jni.ensure_no_exception(); - pAny->pData = &pAny->pReserved; } else { @@ -631,12 +632,12 @@ void Bridge::map_to_uno( case typelib_TypeClass_DOUBLE: if (sizeof (double) <= sizeof (void *)) { - *(jdouble *) &pAny->pReserved = + pAny->pData = &pAny->pReserved; + *(jdouble *) pAny->pData = jni->CallDoubleMethodA( java_data.l, m_jni_info->m_method_Double_doubleValue, 0 ); jni.ensure_no_exception(); - pAny->pData = &pAny->pReserved; } else { @@ -653,20 +654,20 @@ void Bridge::map_to_uno( case typelib_TypeClass_STRING: // opt: anies often contain strings; copy string directly pAny->pReserved = 0; + pAny->pData = &pAny->pReserved; jstring_to_ustring( - jni, (rtl_uString **)&pAny->pReserved, + jni, (rtl_uString **)pAny->pData, (jstring) java_data.l ); - pAny->pData = &pAny->pReserved; break; case typelib_TypeClass_TYPE: case typelib_TypeClass_ENUM: case typelib_TypeClass_SEQUENCE: case typelib_TypeClass_INTERFACE: + pAny->pData = &pAny->pReserved; map_to_uno( - jni, &pAny->pReserved, java_data, + jni, pAny->pData, java_data, value_td.get()->pWeakRef, 0, false /* no assign */, false /* no out param */ ); - pAny->pData = &pAny->pReserved; break; case typelib_TypeClass_STRUCT: case typelib_TypeClass_EXCEPTION: @@ -1657,7 +1658,7 @@ void Bridge::map_to_java( case typelib_TypeClass_UNSIGNED_SHORT: { jvalue args[ 2 ]; - args[ 0 ].s = *(jshort const *) &pAny->pReserved; + args[ 0 ].s = *(jshort const *) pAny->pData; JLocalAutoRef jo_val( jni, jni->NewObjectA( m_jni_info->m_class_Short, @@ -1676,7 +1677,7 @@ void Bridge::map_to_java( case typelib_TypeClass_UNSIGNED_LONG: { jvalue args[ 2 ]; - args[ 0 ].i = *(jint const *) &pAny->pReserved; + args[ 0 ].i = *(jint const *) pAny->pData; JLocalAutoRef jo_val( jni, jni->NewObjectA( m_jni_info->m_class_Integer, @@ -2574,3 +2575,5 @@ void Bridge::map_to_java( } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |