From fc02ae8f825b9325c3f3d6b690a1bffeb0520253 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 11 Apr 2013 09:27:11 +0200 Subject: [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 --- codemaker/source/commonjava/commonjava.cxx | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'codemaker/source/commonjava') 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(); } -- cgit