[Solved] [Java]How do I know what interfaces supported?

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
hawkx
Posts: 12
Joined: Wed Mar 25, 2009 2:23 am

[Solved] [Java]How do I know what interfaces supported?

Post by hawkx »

We know, we can get supported interface from object using UnoRuntime.QueryInterface, and usually more than one interface supported by an object, for instance:

XComponent xSpreadsheetComponent = xComponentLoader.loadComponentFromURL(
"private:factory/scalc", "_blank", 0, loadProps);
//Get XSpreadsheetDocument interface
XSpreadsheetDocument xSpreadsheetDocument = (XSpreadsheetDocument)UnoRuntime.queryInterface(
XSpreadsheetDocument.class, xSpreadsheetComponent);
//Get XModel interface
XModel xModel = (XModel) UnoRuntime.queryInterface(XModel.class, xSpreadsheetComponent);

The question is: How much interfaces supported by an object, what interfaces, how do I know?

Thanks for your help!
Last edited by hawkx on Mon Mar 30, 2009 2:15 am, edited 1 time in total.
OOo 3.0.X on Ms Windows XP
FJCC
Moderator
Posts: 9623
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: [Java] How do I know what interfaces supported by my object?

Post by FJCC »

I'm not a Java user, so perhaps I don't understand your question correctly. There are a couple of Object inspection tools that I find are extremely useful when working on macros: MRI and XRay. They are very similar in their utility. I took a quick look at the documentation and they both seem to work with Java. If you download the SDK, these tools will also access the documentation for selected interfaces, methods etc.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
hol.sten
Volunteer
Posts: 495
Joined: Mon Oct 08, 2007 1:31 am
Location: Hamburg, Germany

Re: [Java] How do I know what interfaces supported by my object?

Post by hol.sten »

OOo 3.2.0 on Ubuntu 10.04 • OOo 3.2.1 on Windows 7 64-bit and MS Windows XP
hawkx
Posts: 12
Joined: Wed Mar 25, 2009 2:23 am

Re: [Java] How do I know what interfaces supported by my object?

Post by hawkx »

hol.sten wrote:Try this: Using Xray from Java: http://www.oooforum.org/forum/viewtopic ... light=xray
Yes, I got it. Thanks so much!
OOo 3.0.X on Ms Windows XP
User avatar
TheGurkha
Volunteer
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: [Java] How do I know what interfaces supported by my object?

Post by TheGurkha »

If this has answered your question please go to your first post and use the Edit button, and add [Solved] to the start of the title. You can use the green tick icon at the same time if you like.
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
Post Reply