diff options
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/source/sfwidgets/SF_PopupMenu.xba | 5 | ||||
-rw-r--r-- | wizards/source/sfwidgets/SF_Register.xba | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/wizards/source/sfwidgets/SF_PopupMenu.xba b/wizards/source/sfwidgets/SF_PopupMenu.xba index 467e3f748776..d4e5c4d3b075 100644 --- a/wizards/source/sfwidgets/SF_PopupMenu.xba +++ b/wizards/source/sfwidgets/SF_PopupMenu.xba @@ -402,7 +402,10 @@ Check: Try: vMenuItem = MenuRoot.Execute(PeerWindow, Rectangle, com.sun.star.awt.PopupMenuDirection.EXECUTE_DEFAULT) - If Not ReturnId Then vMenuItem = MenuIdentification.Item(CStr(vMenuItem)) + ' So far, vMenuItem is an Integer. Convert to the item name when relevant + If Not ReturnId Then + If vMenuItem > 0 Then vMenuItem = MenuIdentification.Item(CStr(vMenuItem)) Else vMenuItem = "" + End If Finally: Execute = vMenuItem diff --git a/wizards/source/sfwidgets/SF_Register.xba b/wizards/source/sfwidgets/SF_Register.xba index 99c9dc9d0d8e..84cc19adc88a 100644 --- a/wizards/source/sfwidgets/SF_Register.xba +++ b/wizards/source/sfwidgets/SF_Register.xba @@ -193,7 +193,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 IsEmpty(Event) Or IsNull(Event) Then Event = Nothing ' Event can be Null when popup built by Python code 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 = "" |