[api-dev] Getting the XComponent out of a XFrame in a UNO Component

2006-12-18 Thread Tobias Krais
Hi together, this is my last day working for my current company and I'm hanging on following thing: I have to write one more UNO package. In this component, I need to get the current XComponent. I asked the question how to get the current XComponent out of an XFrame last march and got following

Re: [api-dev] Getting the XComponent out of a XFrame in a UNO Component

2006-12-18 Thread Frank Schönheit - Sun Microsystems Germ any
Hi Tobias, this is my last day working for my current company and I'm hanging on following thing: I have to write one more UNO package. In this component, I need to get the current XComponent. I asked the question how to get the current XComponent out of an XFrame last march and got

Re: [api-dev] toolbar in Basic, showing icons and/or text

2006-12-18 Thread Peter Eberlein
Hi Carsten, Carsten Driesner schrieb: That's the drawback of the current solution and not possible. You can set a title for the document toolbar, but nothing more. The users have to change the settings via Tools - Options themselves. You meant tools-customize We discussed the current

Re: [api-dev] Getting the XComponent out of a XFrame in a UNO Component

2006-12-18 Thread Tobias Krais
Hi Frank, -%- XComponent xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xFrame); -%- Depending on what you mean with current component, i.e. what you want to do with it - shouldn't you ask the frame for its controller (XFrame.getController()),

Re: [api-dev] XGraphicProvider and service MediaProperties

2006-12-18 Thread Peter Eberlein
Hi Frank, Frank Schönheit - Sun Microsystems Germany schrieb: The good news is that the online documentation is not up-to-date: http://api.openoffice.org/source/browse/api/offapi/com/sun/star/graphic/MediaProperties.idl?rev=1.5view=markup tells you that

Re: [api-dev] Getting the XComponent out of a XFrame in a UNO Component

2006-12-18 Thread Frank Schönheit - Sun Microsystems Germ any
Hi Tobias, OK. Some more information: I want to print my XComponent on different printer trays. I don't know the printing API, but I would suurprised if it at the frame, instead of the controller/model. Finally, you want to print the document, not the window in which it by chance is just

Re: [api-dev] toolbar in Basic, showing icons and/or text

2006-12-18 Thread Carsten Driesner
Peter Eberlein wrote: Hi Carsten, Carsten Driesner schrieb: That's the drawback of the current solution and not possible. You can set a title for the document toolbar, but nothing more. The users have to change the settings via Tools - Options themselves. Hi Peter, You meant

Re: [api-dev] XGraphicProvider and service MediaProperties

2006-12-18 Thread Frank Schönheit - Sun Microsystems Germ any
Hi Peter, The good news is that the online documentation is not up-to-date: http://api.openoffice.org/source/browse/api/offapi/com/sun/star/graphic/MediaProperties.idl?rev=1.5view=markup tells you that private:graphicrepository/sw/imglst/lc20556.png is what you're looking for. Again, not that

Re: [api-dev] Getting the XComponent out of a XFrame in a UNO Component

2006-12-18 Thread Tobias Krais
Hi Frank, OK. Some more information: I want to print my XComponent on different printer trays. I don't know the printing API, but I would suurprised if it at the frame, instead of the controller/model. Finally, you want to print the document, not the window in which it by chance is just

[api-dev] Adding a new URL Protocol without wildcards

2006-12-18 Thread Tobias Krais
Hi together, one more question: I already succeeded adding a new URL Protocol with wildcards (CommandURL was .Judas:). Now I would like to add a URL Protocol without a wildcard. The CommandURLs should be .Judas:Saveto and .Judas:PrintTrays. Here is the relevant part of my ProtocolHandler.xcu:

Re: [api-dev] Getting the XComponent out of a XFrame in a UNO Component

2006-12-18 Thread Tobias Krais
Hi Frank So, I assume the component for you is the XComponent of the controller. Yes. But how to get it? I know how to get the XController and the XModel. But how to get the XComponent? analogous to how you get the XComponent interface of the frame, or how you get any interface for any

Re: [api-dev] Adding a new URL Protocol without wildcards

2006-12-18 Thread Andreas Schlüns
Tobias Krais schrieb: Hi together, one more question: I already succeeded adding a new URL Protocol with wildcards (CommandURL was .Judas:). Now I would like to add a URL Protocol without a wildcard. The CommandURLs should be .Judas:Saveto and .Judas:PrintTrays. Here is the relevant part of

Re: [api-dev] Adding a new URL Protocol without wildcards

2006-12-18 Thread Tobias Krais
Hi Andreas, This should work (even it was not thought to work this way). And your protocol handler will be called (if I understand you right). So this indicates that matching of the real URL to the protocol supported by your handler still works fine. I have no idea, why the URL is not

Re: [api-dev] Create simple toolbar in basic

2006-12-18 Thread Carsten Driesner
Andrew Douglas Pitonyak wrote: Carsten Driesner wrote: Andrew Douglas Pitonyak wrote: I have been documenting all of this... I must remove the window state using configuration access. sigh Hi Andrew, On the first look this may seem to be complicated, but we chose to use two different

Re: [api-dev] Getting the XComponent out of a XFrame in a UNO Component

2006-12-18 Thread Frank Schönheit - Sun Microsystems Germ any
Hi Tobias, OK. But that does not work... Here my xFrame: -%- CO [EMAIL PROTECTED] [oid=867a494;gcc3[0];c226f3b38e9111dbbb1ff0b779ca904b, type=com.sun.star.frame.XFrame] -%- Here my xController -%- CO [EMAIL PROTECTED]

Re: [api-dev] Getting the XComponent out of a XFrame in a UNO Component

2006-12-18 Thread Tobias Krais
Hi Frank, And then I query for the xControllerComponent as you described above: -%- CO [EMAIL PROTECTED] [oid=88fee74;gcc3[0];c226f3b38e9111dbbb1ff0b779ca904b, type=com.sun.star.frame.XController] -%- How did you produce those lines? xControllerComponent.toString()? Just

[api-dev] Search workaround for Bug 72119

2006-12-18 Thread Tobias Krais
Hi all, esp. Carsten, you had a look at this bug some weeks ago. At the moment this bug hurts :-). Let me tell you why and maybe you can help me to find a workaround. I want to add a toolbar item transient. My Addons.xcu is the same as the one in the Bug. If I add this CommandURL to the toolbar,

Re: [api-dev] Getting the XComponent out of a XFrame in a UNO Component

2006-12-18 Thread Tobias Krais
Hi together, after testing, I wrote this little test method: -%- public void test() { XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class, this.xComponent); com.sun.star.frame.XController xController =

Re: [api-dev] Getting the XComponent out of a XFrame in a UNO Component

2006-12-18 Thread Stephan Wunderlich
Hi Tobias, after testing, I wrote this little test method: -%- public void test() { XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class, this.xComponent); com.sun.star.frame.XController xController =

Re: [api-dev] Getting the XComponent out of a XFrame in a UNO Component

2006-12-18 Thread Stephan Bergmann
Tobias Krais wrote: Hi together, after testing, I wrote this little test method: -%- public void test() { XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class, this.xComponent); com.sun.star.frame.XController xController =

Re: [api-dev] Passing a String to a CommandURL

2006-12-18 Thread Carsten Driesner
Tobias Krais wrote: Hi together, is it possible to pass a String when calling a CommandURL? I added a menu item with a self written CommandURL. When I click on the item, I would like to pass a String like Hello world! to the CommandURL. Is that possible? Hi Tobias, I don't exactly know what

Re: [api-dev] Getting the XComponent out of a XFrame in a UNO Component

2006-12-18 Thread Tobias Krais
Hi Stephan, -%- public void test() { XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class, this.xComponent); com.sun.star.frame.XController xController = xModel.getCurrentController(); XComponent myComp = (XComponent)

Re: [api-dev] Passing a String to a CommandURL

2006-12-18 Thread Tobias Krais
Hi Carsten, I don't exactly know what you want to do. Do you want to pass arguments to a command that you want to dispatch? I wrote a little UNO component that should be able to print the document. I registered this component. Then I added a transient menu item to the menu. If I click on this

[api-dev] Adding two radio buttons on a dialog

2006-12-18 Thread Tobias Krais
Hi together again, I want to add two radio buttons on a dialog with the target, that the user can choose one. But only one button is shown. What am I doing wrong? -%- // create the dialog model and set the properties Object dialogModel = xMultiComponentFactory.createInstanceWithContext(

Re: [api-dev] Getting the XComponent out of a XFrame in a UNO Component

2006-12-18 Thread Stephan Wunderlich
Hi Tobias, That is interesting. Thank you. But if I continue the code the following way, I run into troubles (xPrintable will be null): -%- // Querying for the interface XPrintable on the loaded document XPrintable xPrintable = (XPrintable)

Re: [api-dev] Adding two radio buttons on a dialog

2006-12-18 Thread Tobias Krais
Hi again, I want to add two radio buttons on a dialog with the target, that the user can choose one. But only one button is shown. xPSetPP01.setPropertyValue( Name, _radioPrint01 ); xPSetPP02.setPropertyValue( Name, _radioPrint02 ); I found the failure. The variables _radioPrint01 and

[api-dev] C#, createInstance, msvcr71.dll

2006-12-18 Thread Adam Patacchiola
Hi, I just spent 2 days figuring out that the reason I was getting a FileNotFoundException with this error The specified module could not be found. (Exception from HRESULT: 0x8007007E) thrown from my c# code when I call createInstance was because msvcr71.dll could not be found on the system.

Re: [api-dev] Getting the XComponent out of a XFrame in a UNO Component

2006-12-18 Thread Tobias Krais
Hi Stephan, even though I'm not the Stephan you addressed ;-) I'd try to query the XPrintable at you xModel instead of myComp. Yes, that solved my first qestion: -%- XController xController = xFrame.getController(); com.sun.star.frame.XModel xModel = xController.getModel();

Re: [api-dev] toolbar in Basic, showing icons and/or text

2006-12-18 Thread Peter Eberlein
Carsten Driesner schrieb: Could please write me (owner must be set to cd) an issue as enhancement to distinguish between custom and custom document toolbars. This would allow me to support state information for custom document toolbars. Done,