summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-04-22 14:28:36 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-04-22 15:42:36 +0200
commit6a8719b12e2f24e926fccdfabc60b95c089320fc (patch)
tree6d16317f7bccb2132258ab4b7511ddad5c4ff460 /include
parent5dc81ae20145d66019d3853e033514a9b1bc9c57 (diff)
lok::Document::postUnoCommand: allow passing arguments
Change-Id: I6c24a8e392473f3985d3bde9b76a3148fd03bc9a
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h3
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx20
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitGtk.h2
3 files changed, 21 insertions, 4 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index c07831829af7..e576e0a91089 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -132,7 +132,8 @@ struct _LibreOfficeKitDocumentClass
/// @see lok::Document::postUnoCommand
void (*postUnoCommand) (LibreOfficeKitDocument* pThis,
- const char* pCommand);
+ const char* pCommand,
+ const char* pArguments);
/// @see lok::Document::setTextSelection
void (*setTextSelection) (LibreOfficeKitDocument* pThis,
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 4f0a77acba86..01403480096c 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -181,11 +181,27 @@ public:
/**
* Posts an UNO command to the document.
*
+ * Example argument string:
+ *
+ * {
+ * "SearchItem.SearchString":
+ * {
+ * "type": "string",
+ * "value": "foobar"
+ * },
+ * "SearchItem.Backward":
+ * {
+ * "type": "boolean",
+ * "value": "false"
+ * }
+ * }
+ *
* @param pCommand uno command to be posted to the document, like ".uno:Bold"
+ * @param pArguments arguments of the uno command.
*/
- inline void postUnoCommand(const char* pCommand)
+ inline void postUnoCommand(const char* pCommand, const char* pArguments = 0)
{
- mpDoc->pClass->postUnoCommand(mpDoc, pCommand);
+ mpDoc->pClass->postUnoCommand(mpDoc, pCommand, pArguments);
}
/**
diff --git a/include/LibreOfficeKit/LibreOfficeKitGtk.h b/include/LibreOfficeKit/LibreOfficeKitGtk.h
index f76c1fb147ab..a517fca8549b 100644
--- a/include/LibreOfficeKit/LibreOfficeKitGtk.h
+++ b/include/LibreOfficeKit/LibreOfficeKitGtk.h
@@ -68,7 +68,7 @@ void lok_docview_set_edit (LOKDocView* pDocView,
gboolean lok_docview_get_edit (LOKDocView* pDocView);
/// Posts the .uno: command to the LibreOfficeKit.
-void lok_docview_post_command (LOKDocView* pDocView, const char* pCommand);
+void lok_docview_post_command (LOKDocView* pDocView, const char* pCommand, const char* pArguments);
/// Posts a keyboard event to LibreOfficeKit.
void lok_docview_post_key (GtkWidget* pWidget, GdkEventKey* pEvent, gpointer pData);