diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-04-16 13:48:49 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-04-16 13:52:29 +0200 |
commit | 30a7c6ba6b95ade8e59f9e28108470165dc9a175 (patch) | |
tree | f62070e3ab38f92df50d36a48c59751553c71444 /codemaker/source/commoncpp | |
parent | bnc#793414: Fixed the left margin of bullet (diff) | |
download | core-30a7c6ba6b95ade8e59f9e28108470165dc9a175.tar.gz core-30a7c6ba6b95ade8e59f9e28108470165dc9a175.zip |
WIP: Experimental new binary type.rdb format
Make uno-skeletonmaker work on top of unoidl/ instead of registry/.
These changes have only been tested so far rather lightly. Basic
uno-skeletonmaker still works, but more thorough testing of the various input
flags is needed.
Change-Id: Id7f3aee863a10f8c649325db2d6f34a4057f70ff
Diffstat (limited to 'codemaker/source/commoncpp')
-rw-r--r-- | codemaker/source/commoncpp/commoncpp.cxx | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/codemaker/source/commoncpp/commoncpp.cxx b/codemaker/source/commoncpp/commoncpp.cxx index 6f530409f745..295488d28890 100644 --- a/codemaker/source/commoncpp/commoncpp.cxx +++ b/codemaker/source/commoncpp/commoncpp.cxx @@ -67,36 +67,26 @@ OString scopedCppName(OString const & type, bool ns_alias) OString translateUnoToCppType( - codemaker::UnoType::Sort sort, RTTypeClass typeClass, - OString const & nucleus, bool shortname) + codemaker::UnoType::Sort sort, OUString const & nucleus) { OStringBuffer buf; - if (sort == codemaker::UnoType::SORT_COMPLEX) { - if (typeClass == RT_TYPE_INTERFACE - && nucleus == OString("com/sun/star/uno/XInterface")) - { - buf.append("::com::sun::star::uno::XInterface"); - } else { - //TODO: check that nucleus is a valid (UTF-8) identifier - buf.append(nucleus); - } - } else { + if (sort <= codemaker::UnoType::SORT_ANY) { static char const * const cppTypes[codemaker::UnoType::SORT_ANY + 1] = { "void", "::sal_Bool", "::sal_Int8", "::sal_Int16", "::sal_uInt16", "::sal_Int32", "::sal_uInt32", "::sal_Int64", "::sal_uInt64", "float", "double", "::sal_Unicode", "rtl::OUString", "::com::sun::star::uno::Type", "::com::sun::star::uno::Any" }; buf.append(cppTypes[sort]); + } else { + if (sort == codemaker::UnoType::SORT_INTERFACE_TYPE + && nucleus == "com.sun.star.uno.XInterface") + { + buf.append("::com::sun::star::uno::XInterface"); + } else { + //TODO: check that nucleus is a valid (UTF-8) identifier + buf.append(u2b(nucleus)); + } } - - if (shortname) { - OString s(buf.makeStringAndClear()); - if (s.indexOf("::com::sun::star") == 0) - return s.replaceAt(0, 16, "css"); - else - return s; - } - return buf.makeStringAndClear(); } |