Issue 103486

Summary: XMenuBar::getPopupMenu fails to return the menu
Product: App Dev Reporter: pflin <pflin>
Component: apiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues, oooforum
Version: 3.3.0 or older (OOo)   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: PATCH Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Patch to fix this issue none

Description pflin 2009-07-13 05:08:15 UTC
I try to get the popup menu from the main menubar in the following BASIC macro,
but throw a Basic runtime error.

Step to reproduce:
1. File a new document and run the following BASIC macro:

Sub Main
	dim oMenuBar
	dim nItemid
	dim oPopMenu
	oMenuBar =
thiscomponent.getcurrentcontroller.getframe.layoutmanager.getelement("private:resource/menubar/menubar").XMenuBar
	nItemid = oMenuBar.getItemId(0)
	oPopMenu = oMenuBar.getPopupMenu(nItemid)
	msgbox oPopMenu.isPopupMenu
End Sub

2. It throws a "Basic runtime error" in the macro line:
msgbox oPopMenu.isPopupMenu
Comment 1 pflin 2009-07-13 05:09:16 UTC
Created attachment 63500 [details]
Patch to fix  this issue
Comment 2 jsc 2009-07-13 08:44:16 UTC
jsc -> cd: one for you
Comment 3 oooforum (fr) 2022-11-03 14:45:03 UTC
Anybody to have a look?