summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2020-11-16 15:59:43 +0100
committerJean-Pierre Ledure <jp@ledure.be>2020-11-16 16:04:51 +0100
commit0d071acc0bd422e6d9af14cc7d7f35b6b3356478 (patch)
treed765b6d2b6cc0cbeb3bbe3b908489bc55b64d93c /wizards
parent502da85432ed195213268272dda966fddc269716 (diff)
ScriptForge: (dialog) Better manage default values of service
When an argument is absent in a varying list of arguments, it is not missing, it is EMPTY Change-Id: Ib46a692292886739e69f38a9a12c6ea4a9922a41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105948 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/sfdialogs/SF_Register.xba3
1 files changed, 2 insertions, 1 deletions
diff --git a/wizards/source/sfdialogs/SF_Register.xba b/wizards/source/sfdialogs/SF_Register.xba
index e95966d835c6..a1a454c8f006 100644
--- a/wizards/source/sfdialogs/SF_Register.xba
+++ b/wizards/source/sfdialogs/SF_Register.xba
@@ -246,7 +246,8 @@ Check:
If IsMissing(pvArgs) Or IsEmpty(pvArgs) Then pvArgs = Array()
If Not IsArray(pvArgs) Then pvArgs = Array(pvArgs) &apos; Needed when _NewDialog called from _EventManager
If UBound(pvArgs) &gt;= 0 Then vContainer = pvArgs(0) Else vContainer = &quot;&quot;
- If UBound(pvArgs) &gt;= 1 Then vLibrary = pvArgs(1) Else vLibrary = &quot;Standard&quot;
+ If UBound(pvArgs) &gt;= 1 Then vLibrary = pvArgs(1)
+ If IsEmpty(vLibrary) Then vLibrary = &quot;Standard&quot;
If UBound(pvArgs) &gt;= 2 Then vDialogName = pvArgs(2) Else vDialogName = Empty &apos; Use Empty to force mandatory status
If Not ScriptForge.SF_Utils._Validate(vContainer, &quot;Container&quot;, Array(V_STRING, ScriptForge.V_OBJECT)) Then GoTo Finally
If Not ScriptForge.SF_Utils._Validate(vLibrary, &quot;Library&quot;, V_STRING) Then GoTo Finally