[Libreoffice-commits] online.git: 2 commits - loleaflet/reference.html
Tor Lillqvist
tml at collabora.com
Tue Apr 3 13:36:09 UTC 2018
loleaflet/reference.html | 58 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
New commits:
commit 602923d1f838df572fe02a5e44fb2c36180d7bcb
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Apr 3 16:35:16 2018 +0300
Add CallPythonScript and CallPythonScript-Result
Change-Id: I95162cbf30a539be76a922a7b15f7db334b23d15
diff --git a/loleaflet/reference.html b/loleaflet/reference.html
index 22b509b43..1822806c3 100644
--- a/loleaflet/reference.html
+++ b/loleaflet/reference.html
@@ -3103,6 +3103,47 @@ Editor to WOPI host
</tr>
</table>
+<h3 id='loleaflet-postmessage-python'>Calling Python scripts</h3>
+WOPI host to editor
+<table data-id='postmessage-python-to-editor'>
+ <tr>
+ <th>MessageId</th>
+ <th>Values</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td><code><b>CallPythonScript</b></code></td>
+ <td><code>
+ <nobr>ScriptFile: <string></nobr><br/>
+ <nobr>Function: <string></nobr>
+ <nobr>Values: <object></nobr>
+ </code></td>
+ <td>
+ Calls a Python script. The Values parameter contains an
+ object with named parameters that are passed to the script.
+ </td>
+ </tr>
+</table>
+Editor to WOPI host
+<table data-id='postmessage-python-to-host'>
+ <tr>
+ <th>MessageId</th>
+ <th>Values</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td><code><b>CallPythonScript-Result</b></code></td>
+ <td><code>
+ <nobr>commandName: <string></nobr>
+ <nobr>Values: <object></nobr>
+ </code></td>
+ <td>
+ Returns the result of a Python script. The URL of the script called
+ is in the commandName parameter.
+ </td>
+ </tr>
+</table>
+
<h2 id="marker">Marker</h2>
<p>Used to put markers on the map. Extends <a href="#layer">Layer</a>.</p>
commit 89c67b87e4f7035b31d563e35152f01b11dc7a35
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Apr 3 16:25:17 2018 +0300
Add vnd.sun.star.script example
Change-Id: I4c8cc8606612afae0070a7db518d3db5d8269447
diff --git a/loleaflet/reference.html b/loleaflet/reference.html
index 51516b444..22b509b43 100644
--- a/loleaflet/reference.html
+++ b/loleaflet/reference.html
@@ -9183,6 +9183,23 @@ var unoCommands = [
description: 'Paint a shadow around Write page / Impress slide border.'
},
+{
+ header: 'Calling Python scripts',
+},
+
+{
+ uno: 'vnd.sun.star.script:<filename>$<function>?language=Python&location=share',
+ parameter: {
+ 'sheet': {'type': 'string', 'value': 'Sheet1'},
+ 'x0': {'type': 'long', 'value': 1},
+ 'y0': {'type': 'long', 'value': 2},
+ 'width': {'type': 'long', 'value': 3},
+ 'height': {'type': 'long', 'value': 4},
+ 'name': {'type': 'string', 'value': 'Alice'}
+ },
+ description: 'Calls a Python script. The parameter example here are those taken by the DefineNamedRange function in the NamedRanges.py file.'
+},
+
];
$(document).ready(function() {
var table = $('#uno-commands-table');
More information about the Libreoffice-commits
mailing list