summaryrefslogtreecommitdiff
path: root/wizards/source/sfdocuments/script.xlb
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2021-11-14 17:28:04 +0100
committerJean-Pierre Ledure <jp@ledure.be>2021-11-15 13:47:26 +0100
commit6b4f02396b1c0e113be88c82126e23099dc78737 (patch)
tree008f83cee65557b0e83c936e62e710969072237a /wizards/source/sfdocuments/script.xlb
parent97c59688a074dc24092c2887ed665b6940f4c97f (diff)
ScriptForge - (SF_Calc) new OpenRangeSelector() method
The method activates the Calc document, opens a non-modal dialog with a text box, let the user make a selection in the current or another sheet and returns the selected area as a string. This method does not change the current selection. Arguments: Title: the title to display on the top of the dialog Selection: a default preselection as a String. When absent, the first element of the current selection is preselected. SingleCell: When True, only a single cell may be selected. Default = False CloseAfterSelect: When True (default-, the dialog is closed immediately after the selection. When False, the user may change his/her mind and must close the dialog manually. Returns: The selected range as a string, or the empty string when the user cancelled the request (close window button) Example: Dim sSelect As String, vValues As Variant sSelect = oDoc.OpenRangeSelector("Select a range ...") If sSelect = "" Then Exit Function vValues = oDoc.GetValue(sSelect) The implementation requires a new module: SF_DocumentListener.xba The method is available for Basic and Python user scripts. Change-Id: I2d67a9c900ea8ac661cd6b6fb43bb4a34e6abd8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125201 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Diffstat (limited to 'wizards/source/sfdocuments/script.xlb')
-rw-r--r--wizards/source/sfdocuments/script.xlb1
1 files changed, 1 insertions, 0 deletions
diff --git a/wizards/source/sfdocuments/script.xlb b/wizards/source/sfdocuments/script.xlb
index 0663d7b64e6a..ff4495124f98 100644
--- a/wizards/source/sfdocuments/script.xlb
+++ b/wizards/source/sfdocuments/script.xlb
@@ -10,4 +10,5 @@
<library:element library:name="SF_FormControl"/>
<library:element library:name="SF_Writer"/>
<library:element library:name="SF_Chart"/>
+ <library:element library:name="SF_DocumentListener"/>
</library:library> \ No newline at end of file