diff options
author | Mihai Varga <mihai.varga@collabora.com> | 2015-09-10 09:21:45 +0300 |
---|---|---|
committer | Mihai Varga <mihai.mv13@gmail.com> | 2015-09-10 11:34:20 +0300 |
commit | 39975c477a38be613e9e162acb6de241999f0ae1 (patch) | |
tree | a7f0cddb5b73252476254a8a6252ba0d5b3718ad /include | |
parent | 76eff026062c2bb755256cf9b335711d5421d27f (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}}
I've fixed the unit test this time
Change-Id: I30b0fba8ba1db33dd79f4b46026d293b9ea72402
Diffstat (limited to 'include')
-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 }; |