[Libreoffice-commits] core.git: include/LibreOfficeKit libreofficekit/source
Corentin Noël (via logerrit)
logerrit at kemper.freedesktop.org
Tue Nov 19 08:56:10 UTC 2019
include/LibreOfficeKit/LibreOfficeKitGtk.h | 12 ++++++++++++
libreofficekit/source/gtk/lokdocview.cxx | 14 ++++++++++++++
2 files changed, 26 insertions(+)
New commits:
commit 4e14163ceff6bc05ed372358ed66272caa1b35c2
Author: Corentin Noël <corentin.noel at collabora.com>
AuthorDate: Sun Nov 10 11:46:37 2019 +0100
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Tue Nov 19 09:55:25 2019 +0100
lokdocview: Add support for get_command_values
Change-Id: I6a007724de8aea0e4de035313855acd6e9342ee7
Reviewed-on: https://gerrit.libreoffice.org/82377
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/include/LibreOfficeKit/LibreOfficeKitGtk.h b/include/LibreOfficeKit/LibreOfficeKitGtk.h
index fb18aae8aab6..15958e35644b 100644
--- a/include/LibreOfficeKit/LibreOfficeKitGtk.h
+++ b/include/LibreOfficeKit/LibreOfficeKitGtk.h
@@ -235,6 +235,18 @@ void lok_doc_view_post_command (LOKDocView*
const gchar* pArguments,
gboolean bNotifyWhenFinished);
+/**
+ * lok_doc_view_get_command_values:
+ * @pDocView: the #LOKDocView instance
+ * @pCommand: the command to issue to LO core
+ *
+ * Get a json mapping of the possible values for the given command.
+ * In the form of: {commandName: unoCmd, commandValues: {possible_values}}
+ *
+ * Returns: A json mapping of the possible values for the given command
+ */
+gchar * lok_doc_view_get_command_values (LOKDocView* pDocView,
+ const gchar* pCommand);
/**
* lok_doc_view_find_next:
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 8dc4516d0ca5..f6fc2d8160ea 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -3742,6 +3742,20 @@ lok_doc_view_post_command (LOKDocView* pDocView,
g_info ("LOK_POST_COMMAND: ignoring commands in view-only mode");
}
+SAL_DLLPUBLIC_EXPORT gchar *
+lok_doc_view_get_command_values (LOKDocView* pDocView,
+ const gchar* pCommand)
+{
+ g_return_val_if_fail (LOK_IS_DOC_VIEW (pDocView), nullptr);
+ g_return_val_if_fail (pCommand != nullptr, nullptr);
+
+ LibreOfficeKitDocument* pDocument = lok_doc_view_get_document(pDocView);
+ if (!pDocument)
+ return nullptr;
+
+ return pDocument->pClass->getCommandValues(pDocument, pCommand);
+}
+
SAL_DLLPUBLIC_EXPORT void
lok_doc_view_find_prev (LOKDocView* pDocView,
const gchar* pText,
More information about the Libreoffice-commits
mailing list