diff options
author | Mihai Varga <mihai.varga@collabora.com> | 2015-09-04 10:27:58 +0300 |
---|---|---|
committer | Mihai Varga <mihai.varga@collabora.com> | 2015-09-04 12:22:28 +0300 |
commit | 9640dcea46dd3201aa4c27f6a3918f7419288a2a (patch) | |
tree | 6752a61fb2e4311d9aecb6086de83f345beb5e41 /include/LibreOfficeKit | |
parent | 51ac2bf234a98d8f7629132b59f6961597ecea14 (diff) |
LOK: added a general getCommandValues method
This method returns a JSON mapping of the posible values for the given
command (e.g. .uno:StyleApply, etc).
returns:
{commandName: "cmdName", commandValues: {json_of_cmd_values}}
Change-Id: Ic8f970d077af6be9bc226f72f725b6cdf2d4c160
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 2 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index af7155c4db67..8060f0e6ec7c 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -161,7 +161,7 @@ struct _LibreOfficeKitDocumentClass void (*resetSelection) (LibreOfficeKitDocument* pThis); /// @see lok::Document:getStyles - char* (*getStyles) (LibreOfficeKitDocument* pThis); + char* (*getCommandValues) (LibreOfficeKitDocument* pThis, const char* pCommand); #endif // LOK_USE_UNSTABLE_API }; diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index c526bda95593..44599948e659 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -248,11 +248,14 @@ public: } /** - * Returns a json map, {"familyName1" : ["list of style names in the family1"], etc.} + * Returns a json mapping of the possible values for the given command + * e.g. {commandName: ".uno:StyleApply", commandValues: {"familyName1" : ["list of style names in the family1"], etc.}} + * @param pCommand a uno command for which the possible values are requested + * @return {commandName: unoCmd, commandValues: {possible_values}} */ - inline char* getStyles() + inline char* getCommandValues(const char* pCommand) { - return mpDoc->pClass->getStyles(mpDoc); + return mpDoc->pClass->getCommandValues(mpDoc, pCommand); } #endif // LOK_USE_UNSTABLE_API }; |