diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-09-12 17:44:55 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-09-12 17:45:12 +0200 |
commit | c4113906d7f15f8aa0eb385a4caf474b3505ede1 (patch) | |
tree | 7e61c7d59084f7f94dfc82c07d384f8b7aa8b556 /codemaker/source/cppumaker | |
parent | 5c2ba4aad61ce2c7c661202ae7ed26e1859c5216 (diff) |
WIP: add cppumaker -U to directly read from .idl files
Change-Id: I420847515b6b691ae81a249a8820cf9a3d132372
Diffstat (limited to 'codemaker/source/cppumaker')
-rw-r--r-- | codemaker/source/cppumaker/cppumaker.cxx | 6 | ||||
-rw-r--r-- | codemaker/source/cppumaker/cppuoptions.cxx | 25 |
2 files changed, 27 insertions, 4 deletions
diff --git a/codemaker/source/cppumaker/cppumaker.cxx b/codemaker/source/cppumaker/cppumaker.cxx index 2a698f415f03..733eb853dc92 100644 --- a/codemaker/source/cppumaker/cppumaker.cxx +++ b/codemaker/source/cppumaker/cppumaker.cxx @@ -52,13 +52,15 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { options.getExtraInputFiles().begin()); i != options.getExtraInputFiles().end(); ++i) { - typeMgr->loadProvider(convertToFileUrl(*i), false); + typeMgr->loadProvider( + convertToFileUrl(*i), options.isValid("-U"), false); } for (std::vector< OString >::const_iterator i( options.getInputFiles().begin()); i != options.getInputFiles().end(); ++i) { - typeMgr->loadProvider(convertToFileUrl(*i), true); + typeMgr->loadProvider( + convertToFileUrl(*i), options.isValid("-U"), true); } codemaker::GeneratedTypeSet generated; if (options.isValid("-T")) { diff --git a/codemaker/source/cppumaker/cppuoptions.cxx b/codemaker/source/cppumaker/cppuoptions.cxx index 3e70b68c5131..36439542b2f9 100644 --- a/codemaker/source/cppumaker/cppuoptions.cxx +++ b/codemaker/source/cppumaker/cppuoptions.cxx @@ -139,6 +139,19 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile) m_options["-T"] = OString(s); } break; + case 'U': + if (av[i][2] != '\0') + { + OString tmp("'-U', please check"); + if (i <= ac - 1) + { + tmp += " your input '" + OString(av[i]) + "'"; + } + + throw IllegalArgument(tmp); + } + m_options["-U"] = ""; + break; case 'L': if (av[i][2] != '\0') { @@ -321,9 +334,17 @@ OString CppuOptions::prepareHelp() help += " -O<path> = path describes the root directory for the generated output.\n"; help += " The output directory tree is generated under this directory.\n"; help += " -T<name> = name specifies a type or a list of types. The output for this\n"; - help += " [t1;...] type is generated. If no '-T' option is specified,\n"; - help += " then output for all types is generated.\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 += " Example: 'com.sun.star.uno.XInterface' is a valid type.\n"; + help += " -U = instead of interpreting file_1 ... file_n as type rdb files,\n"; + help += " interpret them as (directories of) UNOIDL source files. If no\n"; + help += " '-T' option is given, each file_i must denote a UNOIDL file, and\n"; + help += " headers are generated for all entities defined in those files."; + help += " Otherwise, each file_i must denote a directory, and an entity\n"; + help += " com.sun.star.uno.XInterface specified with '-T' would be searched\n"; + help += " for as com/sun/star/uno/XInterface.idl under each of those\n"; + help += " directories in turn."; help += " -L = UNO type functions are generated lightweight, that means only\n"; help += " the name and typeclass are given and everything else is retrieved\n"; help += " from the type library dynamically. The default is that UNO type\n"; |