summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2021-11-10 17:42:28 +0100
committerJean-Pierre Ledure <jp@ledure.be>2021-11-11 10:29:23 +0100
commit760fc80d167a6bc63305fe3a45dd4df6f87d9f68 (patch)
tree9d2c2622f9b2d8e87a4cdc70f8323ac0b0d2d487
parentUse o3tl::convert (diff)
downloadcore-760fc80d167a6bc63305fe3a45dd4df6f87d9f68.tar.gz
core-760fc80d167a6bc63305fe3a45dd4df6f87d9f68.zip
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>
-rw-r--r--wizards/source/sfwidgets/SF_Register.xba1
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) &gt;= 0 Then Event = pvArgs(0) Else Event = Nothing
+ If IsEmpty(Event) Then Event = Nothing
If UBound(pvArgs) &gt;= 1 Then X = pvArgs(1) Else X = 0
If UBound(pvArgs) &gt;= 2 Then Y = pvArgs(2) Else Y = 0
If UBound(pvArgs) &gt;= 3 Then SubmenuChar = pvArgs(3) Else SubmenuChar = &quot;&quot;