Software Development Kit %PRODUCT_RELEASE%

Development Tools

unopkg The new UNO package deployment tool. It comes with the office installation and can be found in the program directory of the office installation.
uno Tool to provide a UNO runtime environment and provide configured (deployed) or single components. This tool comes with the office installation and can be found in the program directory of the office installation.
regmerge Tool to merge several registry (e.g. type libraries) files into one file. Note: Since OpenOffice.org 3 it is not longer part of the SDK but it comes directly with the office as part of the ure.
regview Tool to view the content of a registry file in a human readable manner. Special support for type library nodes. Note: Since OpenOffice.org 3 it is not longer part of the SDK but it comes directly with the office as part of the ure.
idlc The UNOIDL compiler, generates a common binary type library format as base for all codemaker tools and the UNO runtime type library.
cppumaker Tool for generating C++ code for the UNOIDL types stored in a type library.
javamaker Tool for generating Java class files for the UNOIDL types stored in a type library.
climaker Tool for generating CLI assemblies for the UNOIDL types stored in a type library (windows only).
uno-skeletonmaker Tool for dumping type definitions on stdout or generating complete code skeletons for Java/C++.
regmerge Tool to merge several registry (e.g. type libraries) files into one file.
regview Tool to view the content of a registry file in a human readable manner. Special support for type library nodes.
unopkg

'unopkg' is a tool for easy deployment of UNO packages in an existing office installation. UNO packages are UNO components (single libraries or Jar files or more complex zip files that contains one or more libraries| Jar files, type libraries and configuration items), scripts and LibreOffice %PRODUCT_RELEASE% Basic libraries as zip package. 'unopkg' is not part of the SDK but comes with the office directly and is a development tool as well as an end user tool to deploy extension into an office installation.

More details concerning deployment and this tool can be find in the Developer's Guide: Extension Manager - unopkg.

Note: This tool works only in the <office>/program directory!

Usage:

unopkg add <options> package-path...
unopkg remove <options> package-name...
unopkg list <options> package-name...
unopkg reinstall <options>
unopkg gui
unopkg -V
unopkg -h

Sub-commands:

add add packages
remove remove packages by name
reinstall export feature: reinstall all deployed packages
list list information about deployed packages
gui raise Package Manager Graphical User Interface (GUI)

Options:

-h, --help show this help on the command line
-V, --version shows version information
-v, --verbose dump verbose output to stdout
-f, --force force overwriting existing packages
--log-file <file> custom log file; default: <cache-dir>/log.txt.
--shared expert feature: operate on shared installation deployment context; run only when no concurrent Office process(es) are running!
--deployment-context <context> expert feature: explicit deployment context
uno

The UNO-starter is for running a component or service process, and providing a runtime environment. Raising a component might look like this

[c:\] uno.exe -c MyComponent -l mycomp.dll -r myregistry.rdb -- foo bar

or

[c:\] uno.exe -s foo.bar.FooBarService -r myregistry.rdb -- foo bar

The starter loads the component and instantiates it. The component must export the interface com.sun.star.lang.XMain:

interface XMain : com::sun::star::uno::XInterface
{
    /** This method is called to run the component.
       
        @param aArguments command line arguments
        @return process error code to be returned to system
    */
    long run( [in] sequence< string > arguments );
};

Method run() will be called and returns the error code given, back to the system. If the uno starter is executed with the -u (URL) option, then XInitialization is used instead of XMain. The -u option is described later.

Usage:

uno (-c<ComponentImplementationName> -l <LocationUrl> | -s <ServiceName>)
[-u uno:(socket[,host=<HostName>][,port=<nnn>]|pipe[,name=<PipeName>]);iiop|urp;<Name>
[--singleaccept] [--singleinstance]]
[-- <Argument1 Argument2 ...>]

Options:

<HostName> Specifying a host name might be necessary to distinguish the network interface to be used,if a machine is part of two networks.
<PipeName> Name of a named pipe.
<Name> Identifier for demanded called component instances.
--singleaccept The uno starter will accept one connection, provide the component instance and die.
--singleinstance The uno starter will accept any number of connections, but will provide the same single component instance any time instead of creating a new instance for each connection.

Service com.sun.star.bridge.UnoUrlResolver

You can easily connect to a server started with the -u (url) option by using this service, giving the same url to resolve. The service provides you an instance from remote.

idlc

'idlc' is the UNOIDL compiler. It is a full featured compiler used to check UNODL type definitions and transform valid type definitions into a binary type library format, which is later used by all codemaker tools. It is also used as a dynamic type library for UNO at runtime.
You can find a syntax description for UNOIDL here.

Usage:

idlc [-options] file_1 ... file_n | @<filename>
file_1 ... file_n specifies one or more idl files. Only files with the extension '.idl' are valid.
@<filename> filename specifies the name of a command file.

Options:

-O<path> path describes the output directory. The generated output is a registry file with the same name as the idl input file.
-I<path> path specifies a directory where included files that will be searched by the preprocessor are located. Multiple directories can be combined with ';'.
-D<name> name defines a macro for the preprocessor.
-C generates complete type information, including additional service information and documentation.
-h|? print this help message and exit.
cppumaker

The 'cppumaker' generates a C++ representation for idl types. The cppumaker works on a typelibrary, which is generated by the UNOIDL compiler ( idlc). It generates the output for all specified types and for all types the specified types depend on.

Usage:

cppumaker [-options] file_1 ... file_n

Options:

-O<path> path describes the root directory for the generated output. The output directory tree is generated under this directory.
-T<name>
|-T<t1>;<t2>...
name specifies a type or a list of types. The output for this type and all dependent types are generated. If no '-T' option is specified, then output for all types is generated. It is also possible to use a wildcard 'xy.*' to generate a complete module inclusive all subdirectories. The use of '-T*' is equivalent to no '-T' option. Example: 'com.sun.star.uno.XInterface' or 'com.sun.star.uno.*' are valid types.
-B<name> name specifies the base node. All types are searched under this node. Default is the root '/' of the registry files.
-L UNO type functions are generated lightweight, that means only the name and typeclass are given and everything else is retrieved from the type library dynamically. The default is that UNO type functions provides enough type information for bootstrapping C++. '-L' should be the default for external components.
-C UNO type functions are generated comprehensive that means all necessary information is available for bridging the type in UNO.
-G generate only target files which do not exist.
-Gc generate only target files whose content will be changed.
-X<name> extra types, which are not be taken into account for generation.
javamaker

The 'javamaker' generates the appropriate Java class file for each idl type. The javamaker works on a typelibrary which is generated by the UNOIDL compiler ( idlc). It generates the output for all specified types and for all types the specified types depend on.

Usage:

javamaker [-options] file_1 ... file_n -Xfile_n+1 -Xfile_n+2

Options:

-O<path> path describes the root directory for the generated output. The output directory tree is generated under this directory.
-T<name>|-T<t1>;<t2>... name specifies a type or a list of types. The output for this type and all dependent types are generated. If no '-T' option is specified, then output for all types is generated. It is also possible to use a wildcard 'xy.*' to generate a complete module inclusive all subdirectories. The use of '-T*' is equivalent to no '-T' option. Example: 'com.sun.star.uno.XInterface' or 'com.sun.star.uno.*' are valid types.
-B<name> name specifies the base node. All types are searched under this node. Default is the root '/' of the registry files.
-nD no dependent types are generated.
-G generate only target files which do not exist.
-Gc generate only target files whose content will be changed.
-X<name> extra types, which will not be taken into account for generation.
climaker

The 'climaker' (windows only) generates the appropriate CLI assemblies file for each idl type. The climaker works on a typelibrary which is generated by the UNOIDL compiler ( idlc). It generates the output for all specified types and for all types the specified types depend on.

Usage:

climaker <switches> [registry-file-1 registry-file-2 ...]

Options:

-O, --out <output_file> output assembly file;
defaults to cli_unotypes.dll if more than one registry-file is given, else <registry-file>.dll
-T, --types <type1[;type2;...]> types to be generated (if none is given, then all types of given registries are emitted
-X, --extra <rdb-file>> additional rdb to saturate referenced types in given registry file(s); these types will not be emitted into the output assembly file
-r, --reference <assembly-file> reference metadata from assembly file
-k, --keyfile keyfile needed for strong name
--assembly-version <version> sets assembly version
--assembly-description <text> sets assembly description text
--assembly-product <text> sets assembly product name
--assembly-company <text> sets assembly company
--assembly-copyright <text> sets assembly copyright
--assembly-trademark <text> sets assembly trademark
-v, --verbose verbose output to stdout
-h, --help this message

Example: climaker --out cli_mytypes.dll --reference cli_uretypes.dll --extra types.rdb mytypes.rdb

uno-skeletonmaker

The 'uno-skeletonmaker' is a tool to simplify the UNO component development. It has different modes, from simply dumping code definitions for different languages on stdout up to generating complete code skeletons. The generation of code skeletons support common component skeletons as well as specialized skeletons for special service provider interfaces.

Usage:

uno-skeletonmaker (-env:INIFILENAME=<url>) dump [<options>] -t <type> ...
uno-skeletonmaker (-env:INIFILENAME=<url>) component [<options>] -n <name> -t <type> ...
uno-skeletonmaker (-env:INIFILENAME=<url>) calc-add-in [<options>] -n <name> -t <add-in_service>
uno-skeletonmaker (-env:INIFILENAME=<url>) add-on [<options>] -n <name> -p <protocol_name:command,...> uno-skeletonmaker -V, --version
uno-skeletonmaker -h, --help

Sub-commands:

dump dump declarations on stdout (e.g. constructors, methods, type mapping for properties) or complete method bodies with method forwarding.
component generates language specific code skeleton files using the implementation name as the file and class name
calc-add-in generates a language specific code skeleton for a Calc Add-Ins using the implementation name as the file and class name. A service type is necessary, referencing an interface which defines the new add-in functions.
add-on generates a language specific code skeleton for an add-on compnent using the implementation name as the file and class name. The protocol name(s) and the corresponding command(s) have to be specified with the '-p' option.

Options:

-env:INIFILENAME=<url> url specifies a URL to an UNO ini|rc file of an existing UNO environment (URE, office installation).
-a, --all list all interface methods, not only the direct ones
--(java5|cpp) select the target language
--java5 generate output for Java 1.5 or later (is currently the default)
--cpp generate output for C++
-sn, --shortnames using namespace abbreviation 'css:': for '::com::sun::star::', only valid for sub-command 'dump' and target language 'cpp'. It is default for the sub-command 'component'.
--propertysetmixin the generated skeleton implements the cppu::PropertySetMixin helper if a referenced new style service specifies an interface which provides attributes (directly or inherited).
-lh --licenseheader generates a default LibreOffice MPLv2 license header at the beginning of a component source file. This option is taken into account in 'component' mode only and if -o is unequal 'stdout'.
-bc
--backward-compatible
specifies that the generated calc add-in is backward compatible to older office versions and implement the former required add-in interfaces where the implementation is mapped on the new add-in configuration. In this case the config schema needs to be bundled with the extension add-in as well. Default is a minimal add-in component skeleton based on the add-in configuration coming with the office since OO.org 2.0.4.
-o <path> path specifies an existing directory where the output files are generated to, only valid for sub-command 'component'. If path=stdout the generated code is generated on standard out instead of a file.
-l <file> specifies a binary type library (can be used more than once). The type library is integrated as an additional type provider in the bootstrapped type system.
-n <name> specifies an implementation name for the component (used as classname, filename and package|namespace name). In 'dump' mode it is used as classname (e.g. "MyBase::", C++ only) to generate method bodies not inline.
-d <name> specifies a base classname or a delegator. In 'dump' mode it is used as a delegator to forward methods. It can be used as '<name>::' for base forwarding, or '<name>->|.' for composition. Using "_" means that a default bodies with default return values are dumped.
-t <name> specifies an UNOIDL type name, e.g. com.sun.star.text.XText (can be used more than once).
-p <protocol:cmd(s)> specifies an add-on protocol name and the corresponding command names, where the commands are a ',' separated list of unique commands. This option is only valid for add-ons.
-V, --version print version number and exit.
-h, --help print this help and exit.
regmerge

'regmerge' is a small tool to merge different registry files under a specified key into another registry file. If a value already exists in the target file the value is overwritten by the value of the source file.

Usage:

regmerge [-v|--verbose] <mergefile> <mergeKeyName> <regfile_1> ... <regfile_n>

Options:

-v|--verbose verbose output on stdout.
<mergefile> specifies the merged registry file. If this file doesn't exist, it is created.
<mergeKeyName> specifies the merge key, everything is merged under this key. If this key doesn't exist, it is created.
<regfile_1> ... <regfile_n> specifies one or more registry files that are merged.
regview

'regview' is a tool to show the contents of a registry file. The tool dumps the hierarchical structure and the values of the nodes in a human readable manner to stdout.

Usage:

regview <registryfile> [<keyName>]

Options:

-br<registryfile> the name of the registry whose contents should be viewed.
<keyName> the name of a registry key. The name must be fully qualified; for example, '/' means the root key and '/UCR/com/sun/star/uno/XInterface' shows the type specification of the XInterface type. If no key is specified, the tool dumps the whole content of the registry file.
autodoc

The legacy 'autodoc' tool was used for creating javadoc-like documentation from C++ and UNO IDL source code in previous versions of the SDK.

Because this tool was buggy and unmaintained it has been removed from the SDK. Users are advised to use Doxygen instead, which supports UNO IDL since April 2013.

n value='private/ajrhunt/c4'>private/ajrhunt/c4 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/udkapi/com
AgeCommit message (Collapse)Author
2017-10-19Fix typosAndrea Gelmini
Change-Id: I101357736813bfd47fb15d347fd2c0a33133de56 Reviewed-on: https://gerrit.libreoffice.org/43506 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-04Translate German comments/debug strings (leftovers in dirs test to uui)Johnny_M
Translates leftovers found using a custom regex. Additionally: - A few spelling fixes Change-Id: I3772e1b914acc487d80ab14efb815cb178ca3dcb Reviewed-on: https://gerrit.libreoffice.org/41831 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-08-17Fix typosAndrea Gelmini
Change-Id: Iaa9c0aea3ea1a239e378bd714ba335f91bb1faf3 Reviewed-on: https://gerrit.libreoffice.org/41194 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-06-26s/catched/caughtNoel Grandin
Change-Id: I7ea6977a9749e86f8058b78cdb91cd2c62da8264 Reviewed-on: https://gerrit.libreoffice.org/39164 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-05Fix typosAndrea Gelmini
Change-Id: I9eb05432732a04e816946fbb13001df100a31f73 Reviewed-on: https://gerrit.libreoffice.org/38395 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-05-18Revert "Fix typos"Stephan Bergmann
This reverts commit 26a67002fcb9381b54de6cae1aaa37120d49066a. "Iff" is not a typo, see 2a65bf32ec270484dcea4d22d3c93552dc0c24dd "Revert 'Typo: iff->if'".
2017-05-18Fix typosAndrea Gelmini
Only replaced "iff" with "if" Change-Id: Ib9dfa5c12b05500043147fe3b65f923b1b12a581 Reviewed-on: https://gerrit.libreoffice.org/37782 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-05-03remove empty commentsNoel Grandin
found with: git ls-files | xargs grep -Pzl '/\*\* (\*|\s| )*\*/' Change-Id: I1f47bcb94d5a7b290a6c622c6941195fbb578597 Reviewed-on: https://gerrit.libreoffice.org/37159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-25Fix typosAndrea Gelmini
Change-Id: I6455332160bb232cddf816e9f6dafa3ce68331a0 Reviewed-on: https://gerrit.libreoffice.org/35661 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25Fix typosAndrea Gelmini
Change-Id: Ieea40e1b7282267157810f9f58ca083e68ae6715 Reviewed-on: https://gerrit.libreoffice.org/35659 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-02Fix typosAndrea Gelmini
Change-Id: I139e6948e92a7bcdce5a2197b9d3754cb9549a33 Reviewed-on: https://gerrit.libreoffice.org/34781 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>