diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2020-11-16 15:59:43 +0100 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2020-11-16 16:04:51 +0100 |
commit | 0d071acc0bd422e6d9af14cc7d7f35b6b3356478 (patch) | |
tree | d765b6d2b6cc0cbeb3bbe3b908489bc55b64d93c /wizards | |
parent | 502da85432ed195213268272dda966fddc269716 (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.xba | 3 |
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) ' Needed when _NewDialog called from _EventManager If UBound(pvArgs) >= 0 Then vContainer = pvArgs(0) Else vContainer = "" - If UBound(pvArgs) >= 1 Then vLibrary = pvArgs(1) Else vLibrary = "Standard" + If UBound(pvArgs) >= 1 Then vLibrary = pvArgs(1) + If IsEmpty(vLibrary) Then vLibrary = "Standard" If UBound(pvArgs) >= 2 Then vDialogName = pvArgs(2) Else vDialogName = Empty ' Use Empty to force mandatory status If Not ScriptForge.SF_Utils._Validate(vContainer, "Container", Array(V_STRING, ScriptForge.V_OBJECT)) Then GoTo Finally If Not ScriptForge.SF_Utils._Validate(vLibrary, "Library", V_STRING) Then GoTo Finally |