Re: [api-dev] Error message trying to bootstrap OpenOffcie

2008-02-07 Thread Tobias Krais
Hi Wouter, why not using this: http://codesnippets.services.openoffice.org/Office/Office.BootstrapOpenOffice.snip Because I am not using Windows but Linux :-) Best choice. I use it, too. This solution probably works in Windows, since the registry is searched for the OOo installation.

Re: [api-dev] Error message trying to bootstrap OpenOffcie

2008-02-07 Thread Tobias Krais
Hi Wouter, why not using this: http://codesnippets.services.openoffice.org/Office/Office.BootstrapOpenOffice.snip Greetings, Tobias Wouter van Reeven schrieb: Hi guys, In the past I have been playing around with the OOo SDK trying to bootstrap OOo without knowing in advance what the

Re: [api-dev] Error message trying to bootstrap OpenOffcie

2008-02-07 Thread Tobias Krais
Hi Wouter, Next I create META-INF/MANIFEST.MF which contains this Main-Class: com.sun.star.lib.loader.Loader Name: com/sun/star/lib/loader/Loader.class Application-Class: nl.reeven.van.test.ooo.MyOOoBootstrapper Application-Name: nl/reeven/van/test/ooo/MyOOoBootstrapper.class Here is

Re: [api-dev] [C++] XMultiServiceFactory for Databasecontext???

2008-02-05 Thread Tobias Krais
Hi Andre, sorry, a little failure occured in my example: -%- package de.designtouse.test; import com.sun.star.comp.helper.Bootstrap; import com.sun.star.lang.XMultiComponentFactory; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.UnoRuntime; import

Re: [api-dev] [C++] XMultiServiceFactory for Databasecontext???

2008-02-05 Thread Tobias Krais
Hi Andre, How can I get a valid XMultiServiceFactory for querying the datasources. Which component I must load? Here an example in Java: -%- package de.designtouse.test; import com.sun.star.comp.helper.Bootstrap; import com.sun.star.lang.XMultiComponentFactory; import

Re: [api-dev] Attaching OO Javadoc to Eclipse

2008-01-31 Thread Tobias Krais
Hi Oliver, yes please do so ... | Do you think it is worth to file an issue to create a javadoc compliant | documentation? Done: http://www.openoffice.org/issues/show_bug.cgi?id=85759 Greetings, Tobias - To unsubscribe,

Re: [api-dev] Classpath in OO Extensions [SOLVED]

2008-01-31 Thread Tobias Krais
Hi Jim, These notes might help: http://forum.springframework.org/showthread.php?t=18870 http://extensions.openoffice.org/servlets/ReadMsg?list=devmsgNo=913 These notes helped a lot. Add following lines in your ProtocolHandler.dispatch(URL aURL, PropertyValue[] lArgs) method: -%-

Re: [api-dev] Classpath in OO Extensions

2008-01-31 Thread Tobias Krais
Hi Jürgen, mmh, i think the way we did it is correct and it is more a problem (misuse, misunderstanding) of the other frameworks. But i agree that it might be a problem of OO.org because of the popularity of these other frameworks. That's not nice and i have no good idea how we can solve it.

Re: [api-dev] Multiline tooltips for Java dialog elements?

2008-01-31 Thread Tobias Krais
Hi together again, I tried to create multiline tooltips for dialog elements in Java. I can only create single line dialogs: -%- Object inputModel03 = xMSF.createInstance(com.sun.star.awt.UnoControlEditModel); XPropertySet xPSetInput03 = (XPropertySet)

Re: [api-dev] Classpath in OO Extensions

2008-01-31 Thread Tobias Krais
Hi Jim, How about a Include CLASSPATH Environment Variable checkbox in the OpenOffice Preferences:Java:Classpath dialog (default being unchecked). programmers cannot rely on user options. In my opinion this won't be useful. Greetings, Tobias

Re: [api-dev] Classpath in OO Extensions [SOLVED]

2008-01-31 Thread Tobias Krais
Hi Stephan, ClassLoader clazzLoader = ProtocolHandler.class.getClassLoader(); Thread.currentThread().setContextClassLoader(clazzLoader); unless you control the remaining lifespan of the thread, remember to reset the context class loader once you are done sounds interesting. Can you tell me

Re: [api-dev] Attaching OO Javadoc to Eclipse

2008-01-29 Thread Tobias Krais
Hi Oliver, that works! Thanks for the hint. I did not know this shortcut. But what still keeps missing is the tooltip when hovering the XComponentContext. just had a look with eclipse 3.4m4: you are right, i get an: unknown javadoc format for ... error too even if you create a copy of

Re: [api-dev] Classpath in OO Extensions

2008-01-29 Thread Tobias Krais
Hi Matthias, Check if everything works with OOo 2.2. If it does, you're being hit by http://qa.openoffice.org/issues/show_bug.cgi?id=80100 (which won't be fixed. So you may have to brush up your knowledge of classloaders (a somewhat obscure and tricky topic) to get your problem fixed).

Re: [api-dev] Bootstrap.bootstrap() on macos

2008-01-27 Thread Tobias Krais
Hi Cedric, is the soffice executeable located the path, e.g. in /usr/bin/ ? I had the same problem on Debian Linux some time ago. They had to to add /usr/bin/soffice to the OpenOffice package. Greetings, Tobias [EMAIL PROTECTED] schrieb: Hi all, I'm testing the EclipseIntegration on MacOS X

Re: [api-dev] Eclipse plugin for OpenOffice

2008-01-17 Thread Tobias Krais
Hi Marco, this was discussed ten days ago. A new update site seems to be in progress. Greetings, Tobias Marco Castillo schrieb: Dear list: I was trying to get the Eclipse plugin for OpenOffice development, but the remote update server seems to be down or broken. Do you know if this

Re: [api-dev] Loading officebean.jar

2008-01-11 Thread Tobias Krais
Hi Harald, I think putting yourpathToOpenOfficeInstallaton/program on your $path variable should help. thanks, but it does not. Greetings, Tobias Cheers Harald Tobias Krais schrieb: Hi again, I want to use first time the office beans, but it does not work. As soon as I want to use

Re: [api-dev] Loading officebean.jar

2008-01-11 Thread Tobias Krais
Hi Jozsef, One way I used to ensure that my app (the classloader) will find officebean.jar was distributing it next to my .jar archive, and reference it in the manifest file, eg. Class-Path: lib/officebean.jar this sounds interesting. But it seems that I always would have to distribute the

Re: [api-dev] Option AutoHScroll in css.awt.UnoControlEditModel crashed dialog

2008-01-08 Thread Tobias Krais
Hi Frank, When setting the AutoHScroll or AutoVScroll value, my dialog crashes without an exception. I am using Java, OO 2.3 on Ubuntu Linux AMD64. Is this a defect or am I doing something wrong? A behaviour when doing something, OOo crashes is always a defect, by definition. Please visit

Re: [api-dev] Repository for helper classes

2007-12-20 Thread Tobias Krais
Hi together, Sometimes i have the feeling that it is regardless what Sun is doing somebody will always complain about it. If we do more for NetBeans than Eclispe than it is wrong if we prefer Java more than Python it is wrong. If Sun sponsor Sun open source projects with a lot of money it is

Re: [api-dev] Load a document and run macro

2007-12-14 Thread Tobias Krais
Hi Antoine, To load the document, I tried : String vUrl = file://.concat(((File) pSrc).toURL().toExternalForm().substring(5)); Just a hint: the way you create the UNO compatible URL is not the best. See this snippet:

Re: [api-dev] Attaching OO Javadoc to Eclipse

2007-12-11 Thread Tobias Krais
Hi Oliver, Do you know what kind of doc format is exspected ? not really. But using the files from sdk/docs/java/ref works very well. Using the sdk/docs/common/ref do not. The ones from the java folder seem to be generated by the javadoc utility. I hope this helps... Greetings, Tobias

[api-dev] Attaching OO Javadoc to Eclipse

2007-12-10 Thread Tobias Krais
Hi together, I try to attach OO Javadoc to my Eclipse IDE. I right-click the JAR file in my Referenced Libraries. A dialog opens and I have to enter the Javadoc location. For some files I found a javadoc in the folder /usr/lib/openoffice/sdk/docs/java/ref/. But the rest is missing. I tried to

Re: [api-dev] Attaching OO Javadoc to Eclipse

2007-12-10 Thread Tobias Krais
Hi Oliver, to add /usr/lib/openoffice/sdk/docs/common/ref/. But this is not accepted by eclipse as Javadoc. have you tried to place a simplae package-list file with content com.sun.star into docs/common/ref/ ? I just tried it, but with no success. The index.html keeps missing. Is there a

Re: [api-dev] Attaching OO Javadoc to Eclipse

2007-12-10 Thread Tobias Krais
Hi Oliver, I just tried it, but with no success. The index.html keeps missing. that's true, i get an error too, but it seems to work anyway for example (shift) (f2) over XComponentContext jumps to

[api-dev] Multiline tooltips for Java dialog elements?

2007-12-02 Thread Tobias Krais
Hi together, I tried to create multiline tooltips for dialog elements in Java. I can only create single line dialogs: -%- Object inputModel03 = xMSF.createInstance(com.sun.star.awt.UnoControlEditModel); XPropertySet xPSetInput03 = (XPropertySet)

Re: [api-dev] Frustrations with Eclipse Plugin for Java Component Dev.

2007-11-30 Thread Tobias Krais
Hi Laurant, these files are created with the javamaker utility. There does no source code exist. It is not free ? I don't know what you mean. It's part of the OO SDK. @Hasan: See chapter 4.2 in the Developers Guide

Re: [api-dev] Frustrations with Eclipse Plugin for Java Component Dev.

2007-11-29 Thread Tobias Krais
Hi Hasan, The other thing is -- I'd like to see the source code of the class files that are generated to the build directory. It seems strange to hide them. (I'm evaluating the difficulty of extending the Web Services Cartridge of AndroMDA to create automatically an Open Office component

Re: [api-dev] css.awt.UnoControlButtonModel with property PushButtonType and ImageURL makes button multiline

2007-11-26 Thread Tobias Krais
Hi Frank, creates the button as intended: one line with the image left centered. Is this a bug or a feature? Since you set the ImagePosition to 1, which is com.sun.star.awt.ImagePosition.LeftCenter (btw: using this symbolic identifier would increase the readability of your code :), this

Re: [api-dev] css.awt.UnoControlButtonModel with property PushButtonType and ImageURL makes button multiline

2007-11-25 Thread Tobias Krais
Hi Frank, This code produces a button with the image in the first line and the text Close in the second line. Deleting the PropertyValue PushButtonType I suppose with deleting you mean not setting? Yes, sorry! creates the button as intended: one line with the image left centered. Is

[api-dev] css.awt.UnoControlButtonModel with property PushButtonType and ImageURL makes button multiline

2007-11-23 Thread Tobias Krais
Hi together, here ist my Java code: -%- Object buttonModel04 = xMSF.createInstance( com.sun.star.awt.UnoControlButtonModel); XPropertySet xPSetCancelButton = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, buttonModel04);

Re: [api-dev] [SOLVED] Preselecting an Item in an css.awt.XListBox / css.awt.UnoControlListBoxModel

2007-11-16 Thread Tobias Krais
Hi again, sorry for taking so long to answer. I now solved the Problem. I am currently implementing a little dialog with an UnoControlListBoxModel. Now I want to preselect an entry of the list. How can I do this? I tried the SelectedItems option, but it did not work. How can I preselect an

Re: [api-dev] How to get the XStorable interface from a DataSource?

2007-11-13 Thread Tobias Krais
Hi Willem, then when i try to register the datasource it tells me i need to store it first using the XStorable Interface. The problem is however taht i cant get the XStorable interface from the datasource. It doesn't seem to implement it! Also when i look at the defined intefaces in the

Re: [api-dev] Preselecting an Item in an css.awt.XListBox / css.awt.UnoControlListBoxModel

2007-11-09 Thread Tobias Krais
Hi Thomas, I am currently implementing a little dialog with an UnoControlListBoxModel. Now I want to preselect an entry of the list. How can I do this? I tried the SelectedItems option, but it did not work. Use the makeVisible(iPos) Methode, this will show the entry with the I tried

Re: [api-dev] Preselecting an Item in an css.awt.XListBox / css.awt.UnoControlListBoxModel

2007-11-09 Thread Tobias Krais
Hi Cor, How can I preselect an item? In basic, I simply do this by oControl = oDocDlg.GetControl(xxx) oControl.selectItemPos(i, True) Thus not on the model. I use Java, so I cannot apply your suggestion on the control. The method selectItemPos(...) is not available on the

Re: [api-dev] Preselecting an Item in an css.awt.XListBox / css.awt.UnoControlListBoxModel

2007-11-09 Thread Tobias Krais
Hi Oliver, XListBox listbox = (XListBox) UnoRuntime.queryInterface(XListBox.class, xControl); listbox.selectItem(sValue, true); it's the same. Doesn't preselect. Greetings, Tobias - To unsubscribe, e-mail: [EMAIL

[api-dev] Bug in displaying Icons on transient menu items?

2007-10-29 Thread Tobias Krais
Hi together, I think this is especially interesting for Carsten. You added support for icons for transient toolbar / menu items. Thanks for this. If I add a toolbar / menu item for my CommandURL .Judas:PrintTrays these icons are displayed and it looks very nice! If I add some parameters to my

Re: [api-dev] Bug in displaying Icons on transient menu items?

2007-10-29 Thread Tobias Krais
Hi Carsten, One can think that this is a bug but the current implementation distinguishes between the same command with different arguments. We did this because one can think of the following scenario: .uno:Clipboard?command=copy .uno:Clipboard?command=cut .uno:Clipboard?command=paste

Re: [api-dev] Problems with installing and uninstalling Extensions

2007-10-25 Thread Tobias Krais
correctly, but does not work on linux amd64 platforms anyway. Does this help to locate the failure? Is this enough information to file an issue? Greetings, Tobias Tobias Krais schrieb: Hi Juergen, - Is my OpenOffice registry broken? you can easy test it. Run your office with soffice

Re: [api-dev] XPackageManager.addPackage(...) dealing with null and empty String

2007-10-23 Thread Tobias Krais
Hi together, Sounds weird. Assuming that you call the packagemanager API from Java, I'd expect you get a RuntimeException (null-ref given!). I have the same opinion. Using Null should either throw an exception, or it should work like an empty string. Any other opinions? Should I create

Re: [api-dev] XPackageManagerManager.removePackage changes

2007-10-23 Thread Tobias Krais
Hi Juergen, Is it planned to make it public one day ? It doesn't matter because it's always possible to have unpublished API's that are primary intended for private usage and that remain unpublished. General recommendation is to publish API's after 1-2 releases, especially when they

Re: [api-dev] XPackageManagerManager.removePackage changes

2007-10-23 Thread Tobias Krais
Hi Juergen, That would mean this functionality is close to be published!? no, as i mentioned before it is intended for private usage ;-) I am not sure if it will be published. I don't see really demand for it. for what exactly do you need it where you can't use the extensions manager or

Re: [api-dev] Problems with installing and uninstalling Extensions

2007-10-22 Thread Tobias Krais
Hi Juergen, - Is my OpenOffice registry broken? you can easy test it. Run your office with soffice -env:UserInstalltion=./mynewuserdir now I continued testing here my results: 1. On Windows systems (Windows XP, OOo 2.3), installing the extension via API and unopkg works always properly and

[api-dev] XPaketManager.removePackage changes

2007-10-22 Thread Tobias Krais
Hi all, I have a little question conserning the method css.deployment.XPaketManager.removePackage(...). In OpenOffice.org 2.3 this method takes 4 parameters. In OpenOffice.org 2.2.1 (Debian) it takes 3 parameters. Is this correct? If yes, is the 2.2.1 API of this class undocumented? Greetings,

Re: [api-dev] Problems with installing and uninstalling Extensions

2007-10-22 Thread Tobias Krais
Hi Juergen, Thus my results are: my former user directory was malformed. For me, it seems to be a linux x86_64 issue. What do you think? Can anybody do a 5 minutes test out there? I can send debug instructions for details. mmh, i don't know what the problem on your Ubuntu system is but it

[api-dev] Getting OOo Version via API

2007-10-22 Thread Tobias Krais
Hi together, is it possible to retrieve the OpenOffice version via API? Greetings, Tobias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [api-dev] Getting OOo Version via API

2007-10-22 Thread Tobias Krais
Hi Laurant, is it possible to retrieve the OpenOffice version via API? sure, reading the config registry Setup in what language do yo need it ? I have it OOoBasic and Java I need it in Java. Greetings, Tobias - To

Re: [api-dev] Problems with installing and uninstalling Extensions

2007-10-19 Thread Tobias Krais
Hi Juergen, well, that can have different reasons. It works normally quite well and more interesting would be what are you doing in detail. I tested many many times and I try to find out what is wrong, to be able to reproduce my failure. The last thing I found out is: 1. If I install my

Re: [api-dev] XPackageManager.addPackage(...) dealing with null and empty String

2007-10-18 Thread Tobias Krais
Hi Daniel and Mathias, Sounds weird. Assuming that you call the packagemanager API from Java, I'd expect you get a RuntimeException (null-ref given!). I have the same opinion. Using Null should either throw an exception, or it should work like an empty string. Any other opinions? Should I

Re: [api-dev] com.sun.star.io.IOException: EOF reached

2007-10-18 Thread Tobias Krais
Hi Andres, do you have more information? E.g. can you reproduce it, and how? If you can reproduce it, what does strace say? Greetings, Tobias Andres Tarallo schrieb: We're working with soffice in a server. We use it for document creation and manipulation. Everything works fine until we

[api-dev] Problems with installing and uninstalling Extensions

2007-10-18 Thread Tobias Krais
Hi together, I have a strange problem here. I created a java program installing my OO extension. After testing it many times (removing and adding the extension again and again, maybe 50 times), the extension (written in Java, too) does not work anymore! As if the the API I use and also unopkg

[api-dev] XPackageManager.addPackage(...) dealing with null and empty String

2007-10-16 Thread Tobias Krais
Hi together, currently I implement a package manager in Java for deploying my UNO extension. But I experienced some weird problems I want to share with you. First this information: my extension is an .oxt package containing a jar file. The problem I describe next does not occur with the non-Java

Re: [api-dev] Developing Extensions with Eclipse Plugin

2007-10-10 Thread Tobias Krais
Hi Cedric, Simply double click on the file, it should be edited in a special Editor. This editor will allow you to check the files to add (their types are automatically recognized). when double clicking the file, no special editor opens, just the normal text editor. Should I file an issue?

Re: [api-dev] Developing Extensions with Eclipse Plugin

2007-10-10 Thread Tobias Krais
Hi Cedric, You should have an Extension properties editor entry in the Open with menu. Here is a screenshot of this editor: http://wiki.services.openoffice.org/wiki/OpenOffice_Eclipse_Integration#Package_properties_editor Indeed, I have a Properties File Editor entry inthe Open with menu.

Re: [api-dev] Developing Extensions with Eclipse Plugin

2007-10-09 Thread Tobias Krais
Hi Cedric, Or is there a chance to tell the package wizard to include additional files? Simply create a package.properties file at your project's root. Open this file a check the files to include. I should create an empty package.properties file during the project creation... I'll add the

Re: [api-dev] Developing Extensions with Eclipse Plugin

2007-10-09 Thread Tobias Krais
Hi Cedric, Hum, as I've a bit less time to work on the plugin, I've no time to fix the important issues before a next release. I'm using an unstable one and the package.properties might be in that version. I'll try to package an a-bit-better version before the end of october... with the

Re: [api-dev] Developing Extensions with Eclipse Plugin

2007-10-09 Thread Tobias Krais
Hi Cedric, Don't forget to file every issue on the Eclipse plugin: + component: sdk + subcomponent: eclipseintegration may be I found other bugs: 1. When Exporting the Extension, I select OO version 2.0.4. But no description.xml is created for the package. But it is mandatory for oxt

Re: [api-dev] Developing Extensions with Eclipse Plugin

2007-10-09 Thread Tobias Krais
Hi Cedric, Quickly packaged here: http://cedric.bosdonnat.free.fr/ooeclipseintegration_site.zip Thank you. But it didn't help. I'll create a make file to automate my whishes. Greetings, Tobias - To unsubscribe, e-mail:

Re: [api-dev] Developing Extensions with Eclipse Plugin

2007-10-09 Thread Tobias Krais
Hi Cedric, Don't forget to file every issue on the Eclipse plugin: + component: sdk + subcomponent: eclipseintegration may be I found other bugs: 1. When Exporting the Extension, I select OO version 2.0.4. But no description.xml is created for the package. But it is mandatory for oxt

Re: [api-dev] Changing the menu bar only for a document

2007-10-08 Thread Tobias Krais
Hi Jordi, So, my next question is: How can I access (for creating/updating) the document-specific settings (Configurations2/menubar/menubar.xml) using the OOo API?? I created a code snippet to change the menubar transient (see

[api-dev] Developing Extensions with Eclipse Plugin

2007-10-08 Thread Tobias Krais
Hi together, today I tried to migrate my extension project to an Eclipse UNO-IDL project. The extension contains a protocol handler with the Addons.xcu,... I created successfully the project, but when exporting the project as an oxt file, my description.xml, manifest.xml,... is not included in

Re: [api-dev] [SOLVED] Registration of UNO package via Java possible?

2007-09-25 Thread Tobias Krais
Hi Rony, Here is the error message: -%- com.sun.star.deployment.DeploymentException: Fehler beim Hinzufügen von: JudasComponent.und.pkg Are you sure it is .und.pkg above ('d' instead of 'o' in .uno.pkg)? Sorry, the code was OK. This is because I changed the value manually. The

Re: [api-dev] Registration of UNO package via Java possible?

2007-09-25 Thread Tobias Krais
Hi Stephan, No, application/vnd.sun.star.uno-component;type=Java is for jar files. The correct media type for the containing .uno.pkg or .oxt is application/vnd.sun.star.package-bundle (desktop/source/deployment/registry/package/dp_package.cxx:1.21 l. 257). Or pass an empty string for auto

Re: [api-dev] Registration of UNO package via Java possible?

2007-09-25 Thread Tobias Krais
Hi Stephan, OK I changed it. Thanks for the information. Let me ask a question: if autodetection is possible, why should I pass the media type? Picky people should probably call it guessing instead of autodetection. If that's all: I don't wanna be called picky... Greetings, Tobias

Re: [api-dev] [SOLVED] Transient menu changes are too transient

2007-09-20 Thread Tobias Krais
Hi Carsten Yes, the XFrameActionListener is the correct listener. There is only a problem with the order of notification. The layout manager which controls the user interface elements is also XFrameActionListener. It looks like that the layout manager is notified after you get your

Re: [api-dev] Transient menu changes are too transient

2007-09-18 Thread Tobias Krais
Hi Carsten, at the moment I am implementing you solution: Solution: You have to implement a com.sun.star.frame.XFrameActionListener which must be registered at the frame. Whenever you receive the event FrameAction_COMPONENT_ATTACHED you have to make the transient changes again. Changing to

[api-dev] Registration of UNO package via Java possible?

2007-09-13 Thread Tobias Krais
Hi together, long time ago I had the question whether it is possible to register a UNO package via Java. I wanted to ask, whether something has changed and it is possible now? Greetings, Tobias - To unsubscribe, e-mail: [EMAIL

Re: [api-dev] Registration of UNO package via Java possible?

2007-09-13 Thread Tobias Krais
Hi Rony, just realized that I had submitted the entire snippet to the OOo snippet database, which has the benefit that if you click on an UNO class name or interface name, then you are linked to the official OOo IDL documentation and can research from right there. Just point your browser to:

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-11 Thread Tobias Krais
Hi Andreas, So I can set a print option of Wait to true and my program will wait until the document is printed? Do I understand that properly? That would simplify several questions I've had along the way. It makes your XPrintable.print() call synchron ! If your call returns the document

[api-dev] Transient menu changes are too transient

2007-09-11 Thread Tobias Krais
Hi together, one year ago I implemented some additional menu items for OOo menus in Java. I added these items transient. But now we discovered that they are too transient for us: when opening a document, the menu items are added. When changing the document into Page view mode (German:

Re: [api-dev] Transient menu changes are too transient

2007-09-11 Thread Tobias Krais
Hi Carsten, This is not a bug but how the OpenOffice.org framework works. The controller will be removed from the frame and another controller is attached. The layout manager which controls the user interface elements has to destroy all element when a controller is detached. Your transient

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-11 Thread Tobias Krais
Hi Hal, I'm using this to define my print options: PropertyValue[] printOpts = new PropertyValue[2]; printOpts[0] = new PropertyValue(); printOpts[0].Name = Name; printOpts[0].Value = sPrinter; printOpts[1] = new PropertyValue(); printOpts[1].Name =

[api-dev] Getting printers via Basic or Java

2007-09-10 Thread Tobias Krais
Hi togehter, I have to write a little uno package managing printer options. Up to OO 2.0, it was not possible to get the available printers via OO Basic. Can you tell me whether this is possible now? If not, I have to write this extension in Java... Greetings, Tobias

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-10 Thread Tobias Krais
Hi Hal, [...] I think I've been told, and likely here, that in 2.0.x, print listeners like this are no longer necessary, but I'm having a bit of a problem searching and finding this comment and what the background is. In 2.0.x, can I print, then close the document without listening for

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-10 Thread Tobias Krais
Hi Hal, Code would be a big help so I could compare what we've got. I'll be glad to send you what I have. Right now I'm working with a wrapper class to handle basic functions. Do I understand, though, that you run the program once for each file you print? Or does it loop through and

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-10 Thread Tobias Krais
Hi Hal, I've found I *have* to have a print listener and watch for when the document is done printing. Here's more detail on what's happening (sorry for things being fragmented, but I'm under tremendous pressure to solve this). This is happening on a Windows XP system with 2 CPUs. I

Re: [api-dev] Search workaround for Bug 72119

2007-01-17 Thread Tobias Krais
Hi Carsten, Sorry for the late answer but I was in vacation. We agreed that issue 72119 is an enhancement (images defined inside Addons.xcu are normally only retrieved by add-on toolbars/menus), but I can totally understand you that you want to get this implemented. I can propose a way to

Re: [api-dev] Protocol handler and Thread.sleep()

2007-01-08 Thread Tobias Krais
Hi Matthias, Mathias Bauer schrieb: Tobias Krais wrote: Hi together again, I implemented a protocol handler for the CommandURL .Judas:PrintTrays. The target of this new protocol is to print a document on different printer trays (page one on tray with letter paper, the others on the tray

[api-dev] Addon: Menu item has an icon, but not toolbar item

2006-12-24 Thread Tobias Krais
Hi together, one more question. At the moment I am finalizing my component. Now I added a Submenu to the Extras - Add-ons menu and my icons are shown,... Everything works. Now I add transient via Java API an menu item. The corresponding icon and the text are shown. But adding a toolbar item the

Re: [api-dev] [SOLVED] How to get the state of a radio button on a XDialog in Java

2006-12-23 Thread Tobias Krais
Hi Cor, I wrote a little XDialog showing two radio buttons. But now I have the problem, that I don't know how to find out which radio Button was selected when the OK Button is pressed. Can you tell me where to start. In OOoBasic the getState of a radio-button returns Ttrue if it is

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

2006-12-23 Thread Tobias Krais
Hi Matthias, Am I right when I assume that myComp is the same as in the first line and that it does not make a difference in using it? No. If so, why is the xStorable derived from myComp = null and the xStorable derived from this.xComponent the correct value? myComp points to a

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

2006-12-23 Thread Tobias Krais
Hi again, one addition: Now the things I wanted to do are working. Thank you for your explanations. I had a method taking an XComponent. After your explanations I understood, that I can give over a XModel instead. The method did not complain. That is one thing I did not understand. Greetings

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

2006-12-23 Thread Tobias Krais
Hi Carsten, Second solution: I can extend the CommandURL: -%- menuItemProperties[0] = new PropertyValue(); menuItemProperties[0].Name = CommandURL; menuItemProperties[0].Value = .Judas:PrintTrays?Printer:string=LJ1100; -%- Is this correct? But how can I access the values?

[api-dev] Protocol handler and Thread.sleep()

2006-12-23 Thread Tobias Krais
Hi together again, I implemented a protocol handler for the CommandURL .Judas:PrintTrays. The target of this new protocol is to print a document on different printer trays (page one on tray with letter paper, the others on the tray with normal paper). After sending the print command via API I

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

2006-12-20 Thread Tobias Krais
Hi Stephan, I extend the code below for better understanding, what I mean. -%- System.out.println(this.xComponent); XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class, this.xComponent); System.out.println(xModel); XController xController =

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

2006-12-20 Thread Tobias Krais
Hi Matthias, A frame is an object implementing XComponent (amongst other interfaces) and the code above retrieves this interface. As XFrame is derived from XComponent it is not surprising that both interfaces references are the same proxy object. This also means that the queryInterface call

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

2006-12-20 Thread Tobias Krais
Hi Stephan -%- System.out.println(this.xComponent); XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class, this.xComponent); System.out.println(xModel); XController xController = xModel.getCurrentController(); System.out.println(xController); XComponent myComp =

[api-dev] How to get the state of a radio button on a XDialog in Java

2006-12-20 Thread Tobias Krais
Hi together, I wrote a little XDialog showing two radio buttons. But now I have the problem, that I don't know how to find out which radio Button was selected when the OK Button is pressed. Can you tell me where to start. Documentation about this theme is very less on the internet. Greetings,

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

2006-12-19 Thread Tobias Krais
Hi Stephan, I did not follow this thread too closely. You should not worry about what toString() on a UNO proxy gives you, as those are implementation details, anyway. What is important is that those proxy objects offer the expected functionality. What exactly is your problem with the Java

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

2006-12-19 Thread Tobias Krais
...); }catch (com.sun.star.beans.UnknownPropertyException upex){ throw new java.lang.RuntimeException(cannot happen...); }catch (com.sun.star.uno.Exception ex){ throw new java.lang.RuntimeException(cannot happen...); }} Best regards Berend Tobias Krais wrote: Hi again, I want

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

2006-12-19 Thread Tobias Krais
Hi Carsten, Second solution: I can extend the CommandURL: -%- menuItemProperties[0] = new PropertyValue(); menuItemProperties[0].Name = CommandURL; menuItemProperties[0].Value = .Judas:PrintTrays?Printer:string=LJ1100; -%- Is this correct? But how can I access the values?

[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 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] 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 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] 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 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)

<    1   2   3   4   >