Bug 56725 - ActionTriggerContainer.createInstance ("com.sun.star.ui.ActionTrigger") creates an actionTrigger with no PropertySet interfaces
Summary: ActionTriggerContainer.createInstance ("com.sun.star.ui.ActionTrigger") creat...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
3.5.4 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-03 20:41 UTC by Anthony Zeeman
Modified: 2013-05-04 20:17 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Zeeman 2012-11-03 20:41:21 UTC
ActionTriggerContainer.createInstance ("com.sun.star.ui.ActionTrigger") creates an ActionTrigger with no methods to change the property values.

DBG_Properties returns the following:

SbxOBJECT SourceWindow
SbxOBJECT ExecutePosition
SbxOBJECT ActionTriggerContainer
SbxOBJECT Selection
SbxSTRING Dbg_SupportedInterfaces
SbxSTRING Dbg_Properties
SbxSTRING Dbg_Methods

DBG_Methods returns the following:

No methods found

DBG_SupportedInterfaces returns the following:

No methods found

Following code will crash:

Function MenuOverride_notifyContextMenuExecute(oActionTrigger)	
	dim oNewMenuItem
	oNewMenuItem = oActionTrigger.ActionTriggerContainer.createInstance ("com.sun.star.ui.ActionTrigger")
        'No property set methods available, following code will crash
	oNewMenuItem.setPropertyValue("Text", "New Menu Item")
	oNewMenuItem.setPropertyValue("CommandURL", "macro:///SomeMacro")
	oActionTrigger.ActionTriggerContainer.insertByIndex (0, oNewMenuItem)
	MenuOverride_notifyContextMenuExecute = com.sun.star.ui.ContextMenuInterceptorAction.EXECUTE_MODIFIED
End	Function
Comment 1 DonJaime 2013-01-04 11:35:54 UTC
Most of the interfaces are missing on both ActionTrigger and ActionTriggerContainer.

This has been fixed in Apache OpenOffice: https://issues.apache.org/ooo/show_bug.cgi?id=67068 -- Services ActionTrigger and ActionTriggerContainer don't implement XTypeProvider
Comment 2 DonJaime 2013-03-29 10:50:13 UTC
Fixed in LibreOffice 4