diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-04-11 09:27:11 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-04-11 09:29:44 +0200 |
commit | fc02ae8f825b9325c3f3d6b690a1bffeb0520253 (patch) | |
tree | ce1d8a59480232a0e6cc35f1ce60056b0f87e63e /codemaker/source/commonjava | |
parent | 358b60b3b172968a7605b428af01df456d7669b2 (diff) |
[API CHANGE] WIP: Experimental new binary type.rdb format
Make javamaker work on top of unoidl/ instead of registry/.
API CHANGE: javamaker no longer supports the -B switch, as that is meaningless
with the new format. When reading from an old-format .rdb file, /UCR is hard-
coded as the prefix now.
Change-Id: I8cca39f8ebacd0476934f7bd493d206928d063a9
Diffstat (limited to 'codemaker/source/commonjava')
-rw-r--r-- | codemaker/source/commonjava/commonjava.cxx | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/codemaker/source/commonjava/commonjava.cxx b/codemaker/source/commonjava/commonjava.cxx index 8c8a630d1bda..84722d5908e0 100644 --- a/codemaker/source/commonjava/commonjava.cxx +++ b/codemaker/source/commonjava/commonjava.cxx @@ -40,20 +40,10 @@ namespace codemaker { namespace java { OString translateUnoToJavaType( - codemaker::UnoType::Sort sort, RTTypeClass typeClass, - OString const & nucleus, bool referenceType) + codemaker::UnoType::Sort sort, OString const & nucleus, bool referenceType) { OStringBuffer buf; - if (sort == codemaker::UnoType::SORT_COMPLEX) { - if (typeClass == RT_TYPE_INTERFACE && nucleus == "com/sun/star/uno/XInterface") - { - buf.append("java/lang/Object"); - } else { - //TODO: check that nucleus is a valid (Java-modified UTF-8) - // identifier - buf.append(nucleus); - } - } else { + if (sort <= codemaker::UnoType::SORT_ANY) { OString const javaTypes[codemaker::UnoType::SORT_ANY + 1][2] = { { "void", "java/lang/Void" }, { "boolean", "java/lang/Boolean" }, @@ -71,6 +61,14 @@ OString translateUnoToJavaType( { "com/sun/star/uno/Type", "com/sun/star/uno/Type" }, { "java/lang/Object", "java/lang/Object" } }; buf.append(javaTypes[sort][referenceType]); + } else { + if (nucleus == "com/sun/star/uno/XInterface") { + buf.append("java/lang/Object"); + } else { + //TODO: check that nucleus is a valid (Java-modified UTF-8) + // identifier + buf.append(nucleus); + } } return buf.makeStringAndClear(); } |