diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2021-11-10 17:42:28 +0100 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2021-11-11 10:29:23 +0100 |
commit | 760fc80d167a6bc63305fe3a45dd4df6f87d9f68 (patch) | |
tree | 9d2c2622f9b2d8e87a4cdc70f8323ac0b0d2d487 /wizards | |
parent | 4cdca3702cda246ecc490c65973e525ff5cf25ab (diff) |
ScriptForge - (SFWidgets) fix New PopupMenu without event
Invoking the service without an event object was supposed to work.
For instance:
Dim myPopup As Object
Set myPopup = CreateScriptService("PopupMenu", , 300, 300)
This would create the PopupMenu in position (300, 300)
without an event object... however this does not work.
Getting an error saying that "Event is EMPTY"
=> Add an IsEmpty() test.
Change-Id: I86a1baf83264921088facbd35bf8fa299a5aa132
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125005
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/source/sfwidgets/SF_Register.xba | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/wizards/source/sfwidgets/SF_Register.xba b/wizards/source/sfwidgets/SF_Register.xba index b7f366102be4..4dbb84f03104 100644 --- a/wizards/source/sfwidgets/SF_Register.xba +++ b/wizards/source/sfwidgets/SF_Register.xba @@ -79,6 +79,7 @@ Check: If IsMissing(pvArgs) Or IsEmpty(pvArgs) Then pvArgs = Array() If Not IsArray(pvArgs) Then pvArgs = Array(pvArgs) If UBound(pvArgs) >= 0 Then Event = pvArgs(0) Else Event = Nothing + If IsEmpty(Event) Then Event = Nothing If UBound(pvArgs) >= 1 Then X = pvArgs(1) Else X = 0 If UBound(pvArgs) >= 2 Then Y = pvArgs(2) Else Y = 0 If UBound(pvArgs) >= 3 Then SubmenuChar = pvArgs(3) Else SubmenuChar = "" |