Kaydet (Commit) fc02ae8f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

[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
üst 358b60b3
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
namespace codemaker { namespace java { namespace codemaker { namespace java {
rtl::OString translateUnoToJavaType( rtl::OString translateUnoToJavaType(
codemaker::UnoType::Sort sort, RTTypeClass typeClass, codemaker::UnoType::Sort sort, rtl::OString const & nucleus,
rtl::OString const & nucleus, bool referenceType); bool referenceType);
rtl::OString translateUnoToJavaIdentifier( rtl::OString translateUnoToJavaIdentifier(
rtl::OString const & identifier, rtl::OString const & prefix); rtl::OString const & identifier, rtl::OString const & prefix);
......
...@@ -79,15 +79,22 @@ public: ...@@ -79,15 +79,22 @@ public:
sal_Int32 getSize() const { return m_t2TypeClass.size(); } sal_Int32 getSize() const { return m_t2TypeClass.size(); }
void loadProvider(rtl::OUString const & uri, bool primary); void loadProvider(OUString const & uri, bool primary);
bool foundAtPrimaryProvider(rtl::OUString const & name) const; bool foundAtPrimaryProvider(OUString const & name) const;
codemaker::UnoType::Sort getSort( codemaker::UnoType::Sort getSort(
rtl::OUString const & name, OUString const & name, rtl::Reference< unoidl::Entity > * entity = 0,
rtl::Reference< unoidl::Entity > * entity = 0,
rtl::Reference< unoidl::MapCursor > * cursor = 0) const; rtl::Reference< unoidl::MapCursor > * cursor = 0) const;
codemaker::UnoType::Sort getSortResolveOuterSequences(
OUString const & name, OUString * nucleus, sal_Int32 * rank) const;
codemaker::UnoType::Sort getSortResolveAllSequencesTemplatesTypedefs(
OUString const & name, OUString * nucleus, sal_Int32 * rank,
std::vector< OUString > * arguments,
rtl::Reference< unoidl::Entity > * entity) const;
private: private:
virtual ~TypeManager(); virtual ~TypeManager();
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "sal/config.h" #include "sal/config.h"
#include <cstdlib> #include <cstdlib>
#include <cstring>
#include "rtl/alloc.h" #include "rtl/alloc.h"
#include "codemaker/typemanager.hxx" #include "codemaker/typemanager.hxx"
...@@ -344,7 +345,7 @@ bool TypeManager::foundAtPrimaryProvider(rtl::OUString const & name) const { ...@@ -344,7 +345,7 @@ bool TypeManager::foundAtPrimaryProvider(rtl::OUString const & name) const {
} }
codemaker::UnoType::Sort TypeManager::getSort( codemaker::UnoType::Sort TypeManager::getSort(
rtl::OUString const & name, rtl::Reference< unoidl::Entity > * entity, OUString const & name, rtl::Reference< unoidl::Entity > * entity,
rtl::Reference< unoidl::MapCursor > * cursor) const rtl::Reference< unoidl::MapCursor > * cursor) const
{ {
if (name.isEmpty()) { if (name.isEmpty()) {
...@@ -444,4 +445,122 @@ codemaker::UnoType::Sort TypeManager::getSort( ...@@ -444,4 +445,122 @@ codemaker::UnoType::Sort TypeManager::getSort(
} }
} }
codemaker::UnoType::Sort TypeManager::getSortResolveOuterSequences(
OUString const & name, OUString * nucleus, sal_Int32 * rank) const
{
assert(nucleus != 0);
assert(rank != 0);
*nucleus = name;
*rank = 0;
while (nucleus->startsWith("[]")) {
++rank;
*nucleus = nucleus->copy(std::strlen("[]"));
}
codemaker::UnoType::Sort s = getSort(*nucleus);
switch (s) {
case codemaker::UnoType::SORT_BOOLEAN:
case codemaker::UnoType::SORT_BYTE:
case codemaker::UnoType::SORT_SHORT:
case codemaker::UnoType::SORT_UNSIGNED_SHORT:
case codemaker::UnoType::SORT_LONG:
case codemaker::UnoType::SORT_UNSIGNED_LONG:
case codemaker::UnoType::SORT_HYPER:
case codemaker::UnoType::SORT_UNSIGNED_HYPER:
case codemaker::UnoType::SORT_FLOAT:
case codemaker::UnoType::SORT_DOUBLE:
case codemaker::UnoType::SORT_CHAR:
case codemaker::UnoType::SORT_STRING:
case codemaker::UnoType::SORT_TYPE:
case codemaker::UnoType::SORT_ANY:
case codemaker::UnoType::SORT_ENUM_TYPE:
case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
case codemaker::UnoType::SORT_INTERFACE_TYPE:
case codemaker::UnoType::SORT_TYPEDEF:
return s;
case codemaker::UnoType::SORT_SEQUENCE_TYPE:
assert(false); // this cannot happen
// fall through
default:
throw CannotDumpException(
"unexpected \"" + *nucleus + "\" resolved from \"" + name
+ "\"in call to TypeManager::getSortResolveOuterSequences");
}
}
codemaker::UnoType::Sort
TypeManager::getSortResolveAllSequencesTemplatesTypedefs(
OUString const & name, OUString * nucleus, sal_Int32 * rank,
std::vector< OUString > * arguments,
rtl::Reference< unoidl::Entity > * entity) const
{
assert(nucleus != 0);
assert(rank != 0);
assert(arguments != 0);
arguments->clear();
std::vector< OString > args;
*nucleus = b2u(codemaker::UnoType::decompose(u2b(name), rank, &args));
for (;;) {
rtl::Reference< unoidl::Entity > ent;
codemaker::UnoType::Sort s = getSort(*nucleus, &ent);
if (args.empty()
!= (s != codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE))
{
throw CannotDumpException(
"syntax error, \"" + *nucleus + "\" resolved from \""
+ name + "\"");
}
switch (s) {
case codemaker::UnoType::SORT_VOID:
case codemaker::UnoType::SORT_BOOLEAN:
case codemaker::UnoType::SORT_BYTE:
case codemaker::UnoType::SORT_SHORT:
case codemaker::UnoType::SORT_UNSIGNED_SHORT:
case codemaker::UnoType::SORT_LONG:
case codemaker::UnoType::SORT_UNSIGNED_LONG:
case codemaker::UnoType::SORT_HYPER:
case codemaker::UnoType::SORT_UNSIGNED_HYPER:
case codemaker::UnoType::SORT_FLOAT:
case codemaker::UnoType::SORT_DOUBLE:
case codemaker::UnoType::SORT_CHAR:
case codemaker::UnoType::SORT_STRING:
case codemaker::UnoType::SORT_TYPE:
case codemaker::UnoType::SORT_ANY:
case codemaker::UnoType::SORT_ENUM_TYPE:
case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
case codemaker::UnoType::SORT_INTERFACE_TYPE:
if (entity != 0) {
*entity = ent;
}
return s;
case codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
if (entity != 0) {
*entity = ent;
}
for (std::vector< OString >::iterator i(args.begin());
i != args.end(); ++i)
{
arguments->push_back(b2u(*i));
}
return
codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE;
case codemaker::UnoType::SORT_TYPEDEF:
*nucleus = dynamic_cast< unoidl::TypedefEntity * >(ent.get())->
getType();
while (nucleus->startsWith("[]")) {
++*rank; //TODO: overflow
*nucleus = nucleus->copy(std::strlen("[]"));
}
break;
case codemaker::UnoType::SORT_SEQUENCE_TYPE:
assert(false); // this cannot happen
// fall through
default:
throw CannotDumpException(
"unexpected \"" + *nucleus + "\" resolved from \"" + name
+ ("\"in call to TypeManager::"
"getSortResolveAllSequencesTemplatesTypedefs"));
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -40,20 +40,10 @@ ...@@ -40,20 +40,10 @@
namespace codemaker { namespace java { namespace codemaker { namespace java {
OString translateUnoToJavaType( OString translateUnoToJavaType(
codemaker::UnoType::Sort sort, RTTypeClass typeClass, codemaker::UnoType::Sort sort, OString const & nucleus, bool referenceType)
OString const & nucleus, bool referenceType)
{ {
OStringBuffer buf; OStringBuffer buf;
if (sort == codemaker::UnoType::SORT_COMPLEX) { if (sort <= codemaker::UnoType::SORT_ANY) {
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 {
OString const javaTypes[codemaker::UnoType::SORT_ANY + 1][2] = { OString const javaTypes[codemaker::UnoType::SORT_ANY + 1][2] = {
{ "void", "java/lang/Void" }, { "void", "java/lang/Void" },
{ "boolean", "java/lang/Boolean" }, { "boolean", "java/lang/Boolean" },
...@@ -71,6 +61,14 @@ OString translateUnoToJavaType( ...@@ -71,6 +61,14 @@ OString translateUnoToJavaType(
{ "com/sun/star/uno/Type", "com/sun/star/uno/Type" }, { "com/sun/star/uno/Type", "com/sun/star/uno/Type" },
{ "java/lang/Object", "java/lang/Object" } }; { "java/lang/Object", "java/lang/Object" } };
buf.append(javaTypes[sort][referenceType]); 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(); return buf.makeStringAndClear();
} }
......
...@@ -17,234 +17,87 @@ ...@@ -17,234 +17,87 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include "sal/config.h"
#include <stdio.h> #include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include "codemaker/generatedtypeset.hxx"
#include "codemaker/typemanager.hxx"
#include "rtl/ref.hxx" #include "rtl/ref.hxx"
#include "rtl/string.hxx"
#include "rtl/ustring.hxx"
#include "sal/main.h" #include "sal/main.h"
#include "sal/types.h"
#include "unoidl/unoidl.hxx"
#include "codemaker/typemanager.hxx"
#include "codemaker/generatedtypeset.hxx"
#include "javaoptions.hxx" #include "javaoptions.hxx"
#include "javatype.hxx" #include "javatype.hxx"
using ::rtl::OUString; SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
using ::rtl::OString; JavaOptions options;
sal_Bool produceAllTypes(RegistryKey& rTypeKey, sal_Bool bIsExtraType, try {
rtl::Reference< TypeManager > const & typeMgr, if (!options.initOptions(argc, argv)) {
codemaker::GeneratedTypeSet & generated, return EXIT_FAILURE;
JavaOptions* pOptions,
sal_Bool bFullScope)
{
OString typeName = typeMgr->getTypeName(rTypeKey);
if (!produceType(rTypeKey, bIsExtraType, typeMgr, generated, pOptions))
{
fprintf(stderr, "%s ERROR: %s\n",
pOptions->getProgramName().getStr(),
OString("cannot dump Type '" + typeName + "'").getStr());
exit(99);
}
RegistryKeyList typeKeys = typeMgr->getTypeKeys(typeName);
RegistryKeyList::const_iterator iter = typeKeys.begin();
RegistryKey key, subKey;
RegistryKeyArray subKeys;
while (iter != typeKeys.end())
{
key = (*iter).first;
if (!(*iter).second && !key.openSubKeys(OUString(), subKeys))
{
for (sal_uInt32 i = 0; i < subKeys.getLength(); i++)
{
subKey = subKeys.getElement(i);
if (bFullScope)
{
if (!produceAllTypes(
subKey, (*iter).second,
typeMgr, generated, pOptions, sal_True))
return sal_False;
} else
{
if (!produceType(subKey, (*iter).second,
typeMgr, generated, pOptions))
return sal_False;
}
}
} }
} catch (IllegalArgument & e) {
++iter; std::cerr << "Illegal option " << e.m_message << '\n';
} return EXIT_FAILURE;
return sal_True;
}
sal_Bool produceAllTypes(const OString& typeName,
rtl::Reference< TypeManager > const & typeMgr,
codemaker::GeneratedTypeSet & generated,
JavaOptions* pOptions,
sal_Bool bFullScope)
{
if (!produceType(typeName, typeMgr, generated, pOptions))
{
fprintf(stderr, "%s ERROR: %s\n",
pOptions->getProgramName().getStr(),
OString("cannot dump Type '" + typeName + "'").getStr());
exit(99);
} }
try {
RegistryKeyList typeKeys = typeMgr->getTypeKeys(typeName); rtl::Reference< TypeManager > typeMgr(new TypeManager);
RegistryKeyList::const_iterator iter = typeKeys.begin(); if (!typeMgr->init(
RegistryKey key, subKey; options.getInputFiles(), options.getExtraInputFiles()))
RegistryKeyArray subKeys;
while (iter != typeKeys.end())
{
key = (*iter).first;
if (!(*iter).second && !key.openSubKeys(OUString(), subKeys))
{ {
for (sal_uInt32 i = 0; i < subKeys.getLength(); i++) std::cerr << "Initialization of registries failed\n";
{ return EXIT_FAILURE;
subKey = subKeys.getElement(i);
if (bFullScope)
{
if (!produceAllTypes(
subKey, (*iter).second,
typeMgr, generated, pOptions, sal_True))
return sal_False;
} else
{
if (!produceType(subKey, (*iter).second,
typeMgr, generated, pOptions))
return sal_False;
}
}
} }
for (std::vector< rtl::OString >::const_iterator i(
++iter; options.getExtraInputFiles().begin());
} i != options.getExtraInputFiles().end(); ++i)
return sal_True;
}
SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
{
JavaOptions options;
try
{
if (!options.initOptions(argc, argv))
{ {
exit(1); typeMgr->loadProvider(b2u(*i), false);
} }
} for (std::vector< rtl::OString >::const_iterator i(
catch( IllegalArgument& e) options.getInputFiles().begin());
{ i != options.getInputFiles().end(); ++i)
fprintf(stderr, "Illegal option: %s\n", e.m_message.getStr());
exit(99);
}
rtl::Reference< TypeManager > typeMgr(new TypeManager);
if (!typeMgr->init(options.getInputFiles(), options.getExtraInputFiles()))
{
fprintf(stderr, "%s : init registries failed, check your registry files.\n", options.getProgramName().getStr());
exit(99);
}
if (options.isValid("-B"))
{
typeMgr->setBase(options.getOption("-B"));
}
for (std::vector< rtl::OString >::const_iterator i(
options.getExtraInputFiles().begin());
i != options.getExtraInputFiles().end(); ++i)
{
typeMgr->loadProvider(b2u(*i), false);
}
for (std::vector< rtl::OString >::const_iterator i(
options.getInputFiles().begin());
i != options.getInputFiles().end(); ++i)
{
typeMgr->loadProvider(b2u(*i), true);
}
try
{
if (options.isValid("-T"))
{ {
OString tOption(options.getOption("-T")); typeMgr->loadProvider(b2u(*i), true);
sal_Int32 nIndex = 0; }
codemaker::GeneratedTypeSet generated;
codemaker::GeneratedTypeSet generated; if (options.isValid("-T")) {
OString typeName, tmpName; OUString names(b2u(options.getOption("-T")));
sal_Bool ret = sal_False; for (sal_Int32 i = 0; i != -1;) {
do OUString name(names.getToken(0, ';', i));
{ if (!name.isEmpty()) {
typeName = tOption.getToken(0, ';', nIndex); produce(
(name == "*"
sal_Int32 nPos = typeName.lastIndexOf( '.' ); ? ""
tmpName = typeName.copy( nPos != -1 ? nPos+1 : 0 ); : name.endsWith(".*")
if (tmpName == "*") ? name.copy(0, name.getLength() - std::strlen(".*"))
{ : name),
// produce this type and his scope. typeMgr, generated, options);
if (typeName == "*")
{
tmpName = "/";
} else
{
tmpName = typeName.copy(0, typeName.lastIndexOf('.')).replace('.', '/');
if (tmpName.isEmpty())
tmpName = "/";
else
tmpName = tmpName.replace('.', '/');
}
// related to task #116780# the scope is recursively
// generated. bFullScope = true
ret = produceAllTypes(
tmpName, typeMgr, generated, &options, sal_True);
} else
{
// produce only this type
ret = produceType(
typeName.replace('.', '/'), typeMgr, generated,
&options);
}
if (!ret)
{
fprintf(stderr, "%s ERROR: %s\n",
options.getProgramName().getStr(),
OString("cannot dump Type '" + typeName + "'").getStr());
exit(99);
} }
} while( nIndex != -1 );
} else
{
// produce all types
codemaker::GeneratedTypeSet generated;
if (!produceAllTypes("/", typeMgr, generated, &options, sal_True))
{
fprintf(stderr, "%s ERROR: %s\n",
options.getProgramName().getStr(),
"an error occurs while dumping all types.");
exit(99);
} }
} else {
produce("", typeMgr, generated, options);
} }
} }
catch( CannotDumpException& e) catch (CannotDumpException & e) {
{ std::cerr << "ERROR: " << e.getMessage() << '\n';
fprintf(stderr, "%s ERROR: %s\n", return EXIT_FAILURE;
options.getProgramName().getStr(), } catch (unoidl::NoSuchFileException & e) {
u2b(e.getMessage()).getStr()); std::cerr << "ERROR: No such file <" << e.getUri() << ">\n";
exit(99); return EXIT_FAILURE;
} catch (unoidl::FileFormatException & e) {
std::cerr
<< "ERROR: Bad format of <" << e.getUri() << ">, \""
<< e.getDetail() << "\"\n";
return EXIT_FAILURE;
} }
return EXIT_SUCCESS;
return 0;
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -87,30 +87,6 @@ sal_Bool JavaOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile) ...@@ -87,30 +87,6 @@ sal_Bool JavaOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
m_options["-O"] = OString(s); m_options["-O"] = OString(s);
break; break;
case 'B':
if (av[i][2] == '\0')
{
if (i < ac - 1 && av[i+1][0] != '-')
{
i++;
s = av[i];
} else
{
OString tmp("'-B', please check");
if (i <= ac - 1)
{
tmp += " your input '" + OString(av[i+1]) + "'";
}
throw IllegalArgument(tmp);
}
} else
{
s = av[i] + 2;
}
m_options["-B"] = OString(s);
break;
case 'n': case 'n':
if (av[i][2] != 'D' || av[i][3] != '\0') if (av[i][2] != 'D' || av[i][3] != '\0')
{ {
...@@ -273,8 +249,6 @@ OString JavaOptions::prepareHelp() ...@@ -273,8 +249,6 @@ OString JavaOptions::prepareHelp()
help += " [t1;...] type and all dependent types are generated. If no '-T' option is \n"; help += " [t1;...] type and all dependent types are generated. If no '-T' option is \n";
help += " specified, then output for all types is generated.\n"; help += " specified, then output for all types is generated.\n";
help += " Example: 'com.sun.star.uno.XInterface' is a valid type.\n"; help += " Example: 'com.sun.star.uno.XInterface' is a valid type.\n";
help += " -B<name> = name specifies the base node. All types are searched under this\n";
help += " node. Default is the root '/' of the registry files.\n";
help += " -nD = no dependent types are generated.\n"; help += " -nD = no dependent types are generated.\n";
help += " -G = generate only target files which does not exists.\n"; help += " -G = generate only target files which does not exists.\n";
help += " -Gc = generate only target files which content will be changed.\n"; help += " -Gc = generate only target files which content will be changed.\n";
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -23,21 +23,16 @@ ...@@ -23,21 +23,16 @@
#include "sal/config.h" #include "sal/config.h"
#include "rtl/ref.hxx" #include "rtl/ref.hxx"
#include "rtl/string.hxx"
namespace codemaker { class GeneratedTypeSet; } namespace codemaker { class GeneratedTypeSet; }
namespace rtl { class OUString; }
class JavaOptions; class JavaOptions;
class TypeManager; class TypeManager;
class RegistryKey;
bool produceType( void produce(
OString const & type, rtl::Reference< TypeManager > const & manager, rtl::OUString const & name, rtl::Reference< TypeManager > const & manager,
codemaker::GeneratedTypeSet & generated, JavaOptions * pOptions); codemaker::GeneratedTypeSet & generated, JavaOptions const & options);
bool produceType(RegistryKey& typeName, bool bIsExtraType, rtl::Reference< TypeManager > const & typeMgr, #endif
codemaker::GeneratedTypeSet & generated,
JavaOptions* pOptions);
#endif // INCLUDED_CODEMAKER_SOURCE_JAVAMAKER_JAVATYPE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -37,7 +37,7 @@ $(jurt_TESTURP)/done : \ ...@@ -37,7 +37,7 @@ $(jurt_TESTURP)/done : \
$(call gb_Executable_get_runtime_dependencies,javamaker) $(call gb_Executable_get_runtime_dependencies,javamaker)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVM,1) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVM,1)
rm -rf $(jurt_TESTURP) && \ rm -rf $(jurt_TESTURP) && \
$(call gb_Helper_execute,javamaker -BUCR -O$(jurt_TESTURP) -nD $< -X$(OUTDIR)/bin/udkapi.rdb) && \ $(call gb_Helper_execute,javamaker -O$(jurt_TESTURP) -nD $< -X$(OUTDIR)/bin/udkapi.rdb) && \
touch $@ touch $@
# vim:set shiftwidth=4 tabstop=4 noexpandtab: # vim:set shiftwidth=4 tabstop=4 noexpandtab:
...@@ -37,6 +37,6 @@ $(ridljar_DIR)/done : $(OUTDIR)/bin/udkapi.rdb \ ...@@ -37,6 +37,6 @@ $(ridljar_DIR)/done : $(OUTDIR)/bin/udkapi.rdb \
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVM,1) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVM,1)
$(call gb_Helper_abbreviate_dirs, \ $(call gb_Helper_abbreviate_dirs, \
rm -r $(ridljar_DIR) && \ rm -r $(ridljar_DIR) && \
$(call gb_Helper_execute,javamaker -BUCR -O$(ridljar_DIR) $<) && touch $@) $(call gb_Helper_execute,javamaker -O$(ridljar_DIR) $<) && touch $@)
# vim:set shiftwidth=4 tabstop=4 noexpandtab: # vim:set shiftwidth=4 tabstop=4 noexpandtab:
...@@ -38,6 +38,6 @@ $(testtools_JAVADIR)/done : \ ...@@ -38,6 +38,6 @@ $(testtools_JAVADIR)/done : \
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVM,1) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVM,1)
$(call gb_Helper_abbreviate_dirs, \ $(call gb_Helper_abbreviate_dirs, \
rm -r $(testtools_JAVADIR) && \ rm -r $(testtools_JAVADIR) && \
$(call gb_Helper_execute,javamaker -BUCR -nD -O$(testtools_JAVADIR) -X$(OUTDIR)/bin/types.rdb $<) && touch $@) $(call gb_Helper_execute,javamaker -nD -O$(testtools_JAVADIR) -X$(OUTDIR)/bin/types.rdb $<) && touch $@)
# vim:set shiftwidth=4 tabstop=4 noexpandtab: # vim:set shiftwidth=4 tabstop=4 noexpandtab:
...@@ -82,7 +82,7 @@ void printType(std::ostream & o, ...@@ -82,7 +82,7 @@ void printType(std::ostream & o,
} }
OString sType(codemaker::java::translateUnoToJavaType( OString sType(codemaker::java::translateUnoToJavaType(
sort, typeClass, name, referenceType && rank==0).replace('/', '.')); sort, name, referenceType && rank==0).replace('/', '.'));
if ( sType.indexOf("java.lang.") == 0 ) if ( sType.indexOf("java.lang.") == 0 )
sType = sType.copy(10); sType = sType.copy(10);
o << sType.getStr(); o << sType.getStr();
......
...@@ -37,7 +37,7 @@ $(unoil_JAVADIR)/done : $(OUTDIR)/bin/offapi.rdb $(OUTDIR)/bin/udkapi.rdb \ ...@@ -37,7 +37,7 @@ $(unoil_JAVADIR)/done : $(OUTDIR)/bin/offapi.rdb $(OUTDIR)/bin/udkapi.rdb \
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVM,1) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVM,1)
$(call gb_Helper_abbreviate_dirs, \ $(call gb_Helper_abbreviate_dirs, \
rm -r $(unoil_JAVADIR) && \ rm -r $(unoil_JAVADIR) && \
$(call gb_Helper_execute,javamaker -BUCR -O$(unoil_JAVADIR) $(OUTDIR)/bin/offapi.rdb -X$(OUTDIR)/bin/udkapi.rdb) && \ $(call gb_Helper_execute,javamaker -O$(unoil_JAVADIR) $(OUTDIR)/bin/offapi.rdb -X$(OUTDIR)/bin/udkapi.rdb) && \
touch $@) touch $@)
# vim:set shiftwidth=4 tabstop=4 noexpandtab: # vim:set shiftwidth=4 tabstop=4 noexpandtab:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment