Issue 67068 - Services ActionTrigger and ActionTriggerContainer don't implement XTypeProvider
Summary: Services ActionTrigger and ActionTriggerContainer don't implement XTypeProvider
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: Ariel Constenla-Haile
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-06 11:17 UTC by leguff
Modified: 2013-02-24 21:07 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
The promised demo OOoBasic packed within a OOoDraw-document (8.73 KB, application/vnd.sun.xml.draw)
2006-07-06 11:18 UTC, leguff
no flags Details
Corrected attachment demonstrating missing interfaces (9.47 KB, application/vnd.oasis.opendocument.graphics)
2012-02-09 08:02 UTC, DonJaime
no flags Details
Draw document with sample AOO Basic code (9.26 KB, application/vnd.oasis.opendocument.graphics)
2012-02-09 14:29 UTC, Ariel Constenla-Haile
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description leguff 2006-07-06 11:17:48 UTC
Hi,

1. implement a com.sun.star.ui.XContextMenuInterceptor
2. register yourself at the controller of a OOoDraw-Document
3. handle the context menu event:
   access com.sun.star.ui.XContextMenuInterceptor.ActionTriggerContainer
   and create a
     com.sun.star.ui.ActionTrigger or com.sun.star.ui.ActionTriggerContainer
   with createInstance (XMultiServiceFactory of ActionTriggerContainer)
4. now check com.sun.star.ui.ActionTrigger against the interfaces
   - XPropertySet (not null)
   - XTypeProvider (null in Java!)
   - XServiceInfo (not null)
5. now check com.sun.star.ui.ActionTriggerContainer against the interfaces
   - XPropertySet (null in Java!)
   - XTypeProvider (null in Java!)
   - XServiceInfo (not null)

My understand of services was that EVERYONE must implement XTypeProvider in
order to be usable with OOoBasic.
It is a fact that OOoBasic seems to be able to use the above services partially.

I will attach a OOoDraw-document containing a macro for demonstration.
If you try a similar code with Java you'll see that queryInterface to
XTypeProvider returns null for the both services.

Actually I found an OOoBasic-example for handling context menus. This example
doesn't use the factory methods of the ActionTriggerContainer but use the global
service "com.sun.star.ucb.Store".
(See:
http://codesnippets.services.openoffice.org/Office/Office.ContexMenuInterceptor.snip)

btw.: The problem occurs also with OOo1.1.5, SO7 PP4, SO8 PP3.

bye

Mathias
Comment 1 leguff 2006-07-06 11:18:31 UTC
Created attachment 37541 [details]
The promised demo OOoBasic packed within a OOoDraw-document
Comment 2 jsc 2006-07-28 12:37:45 UTC
jsc -> cd: seems to be one for you
Comment 3 carsten.driesner 2006-08-01 06:54:06 UTC
cd: Set target and accepted.
Comment 4 Martin Hollmichel 2007-11-09 17:28:17 UTC
set target from 2.x to 3.x according to
http://wiki.services.openoffice.org/wiki/Target_3x
Comment 5 DonJaime 2012-02-09 08:02:11 UTC
Created attachment 77196 [details]
Corrected attachment demonstrating missing interfaces

The original attachment threw an error because it tried to use .Dbg_SupportedMethods, which doesn't exist.

This corrected version shows Dbg_Methods and Dbg_SupportedInterfaces of the objects, demonstrating that most of the interfaces/methods are missing. In particular, the lack of support for XIndexAccess on the ActionTriggerContainer service makes it impossible to add items to a sub-menu.
Comment 6 Ariel Constenla-Haile 2012-02-09 14:29:27 UTC
Created attachment 77200 [details]
Draw document with sample AOO Basic code
Comment 7 Ariel Constenla-Haile 2012-02-09 14:30:32 UTC
Fixed in revision 1242336
Comment 8 Ariel Constenla-Haile 2012-05-15 07:18:04 UTC
@DonJaime : Apache OpenOffice 3.4 has been released. Could you please verify this issue is solved in the current release? You can download Apache OpenOffice from http://www.openoffice.org/download
Thanks in advice.
Comment 9 DonJaime 2012-05-15 13:13:05 UTC
Lovely! Working sub-menus in context menus. Thank-you.
Comment 10 Ariel Constenla-Haile 2012-05-15 15:18:38 UTC
(In reply to comment #9)
> Lovely! Working sub-menus in context menus. Thank-you.

Thanks for verifying.
Closing issue.