Re: [api-dev] Java: adding functionality to newly created menu item

2006-02-21 Thread Tobias Krais
Hi Tom, after I created successfully a new menu and menu item I now want to add functionality to the menu item. The functionality should be implemented in Java. Can you tell me where to start to learn doing this, or tell me some package- / interfacenames that are involved in doing this? My goal

Re: [api-dev] Java: Getting Access to a menu in menubar

2006-02-21 Thread Tobias Krais
Hi Carsten, please allow me a more detailed question. -%- PropertyValue[] oDateiMenuSettings = (PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class, oMenuBarSettings.getByIndex(0)); -%- I have now as you adviced a PropertyValue[] oFileMenuSettings.

RE: [api-dev] C++ and Exeptions: No message-text?!

2006-02-21 Thread Martin Thoma
Hi Daniel, thanks for your reply. Strange, this code throws an exception itself: catch(com::sun::star::uno::Exception e) { Any a = cppu::getCaughtException(); // Another Exception thrown here Don't wonder about that, it's an implementation trick that the exception is internally

Re: [api-dev] Java: Getting Access to a menu in menubar

2006-02-21 Thread Carsten Driesner
Tobias Krais wrote: Hi Carsten, please allow me a more detailed question. -%- PropertyValue[] oDateiMenuSettings = (PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class, oMenuBarSettings.getByIndex(0)); -%- I have now as you adviced a

Re: [api-dev] Re: OpenNewView

2006-02-21 Thread Mathias Bauer
Vincenzo Giuliano wrote: Abstract: Vincenzo Giuliano wrote: I am not able to open new view on calc document Whoever seeks will find. I writed this method which is fit for every OO Document and it opens always the view. what do you think of it? Can I improve it? The code does

AW: AW: [api-dev] Error Code 283 (Java)

2006-02-21 Thread Andreas Bröker
Thank you for your fast answer Stephan. -Ursprüngliche Nachricht- Von: Stephan Bergmann [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 21. Februar 2006 10:25 An: dev@api.openoffice.org Betreff: Re: AW: [api-dev] Error Code 283 (Java) Andreas Bröker wrote: Hello again, i am still

Re: [api-dev] Java: adding functionality to newly created menu item

2006-02-21 Thread Mathias Bauer
Tobias Krais wrote: Hi all, after I created successfully a new menu and menu item I now want to add functionality to the menu item. The functionality should be implemented in Java. Can you tell me where to start to learn doing this, or tell me some package- / interfacenames that are

Re: [api-dev] Re: Re: OpenNewView

2006-02-21 Thread Mathias Bauer
Vincenzo Giuliano wrote: Mathias Bauer wrote: I think that OOo currently does not treat OpenNewView correctly, means: it looks like a bug. Hi Mathias, from what I can see, I gather that the java method can be useful. I could publish it as snippet code, what do you think of it?

Re: [api-dev] Java: Getting Access to a menu in menubar

2006-02-21 Thread Stephan Bergmann
Tobias Krais wrote: Hi Carsten, please allow me a more detailed question. -%- PropertyValue[] oDateiMenuSettings = (PropertyValue[]) UnoRuntime.queryInterface(PropertyValue[].class, oMenuBarSettings.getByIndex(0)); -%- That code snippet is wrong;

Re: [api-dev] Java: Getting Access to a menu in menubar

2006-02-21 Thread Stephan Bergmann
Tobias Krais wrote: Hi Stephan, com.sun.star.container.XIndexAccess.getByIndex returns an ANY value, which in the Java-UNO binding maps to java.lang.Object/com.sun.star.uno.Any in a somewhat hard-to-use way: PropertyValue[] oDateiMenuSettings; try { oDateiMenuSettings =

[api-dev] Re: Re: Re: OpenNewView snippet code

2006-02-21 Thread Vincenzo Giuliano
Abstract Vincenzo Giuliano wrote: I could publish it as snippet code, what do you think of it? Mathias Bauer wrote: Yes, it can be useful until we get the bug fixed. Hi ALL, this is the snippet code. Sorry but I did not add links to IDL-Docs, imports,... Best Regards, Vincenzo. !--

[api-dev] Re: Re: Re: Re: OpenNewView snippet code

2006-02-21 Thread Vincenzo Giuliano
Tom Schindl wrote: Sorry Vincenzo, but how are you creating the snippet, I suppose not with Paolos snippet-creator ;-) All those p shouldn't be there, there's no operation-system and oo-version information. Would you mind downloading and installing Paolo's snippet-creator from his

Re: [api-dev] API design question

2006-02-21 Thread Paolo Mantovani
Hi Mathias, Alle 22:25, lunedì 20 febbraio 2006, Mathias Bauer ha scritto: [...] It doesn't make any sense to record a SR action that does not automatically replace all occurences or no occurence and asks the user for every single case. A macro that e.g. only replaces the 3rd and the 5th