From 9640dcea46dd3201aa4c27f6a3918f7419288a2a Mon Sep 17 00:00:00 2001 From: Mihai Varga Date: Fri, 4 Sep 2015 10:27:58 +0300 Subject: 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 --- include/LibreOfficeKit/LibreOfficeKit.h | 2 +- include/LibreOfficeKit/LibreOfficeKit.hxx | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'include/LibreOfficeKit') 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 }; -- cgit