Re: [api-dev] Re: [dev] Info: potential SDK changes for OO.org 3.2
Hi Ariel, Ariel Constenla-Haile wrote: Hello Juergen, On Wednesday 25 March 2009, 10:04, Juergen Schmidt wrote: Hi, the SDK contains many examples showing the usage of the API etc. The examples got not really maintained and the workload for testing them is high. Some time in the past i have already mentioned that the idea is to remove some of the examples from the SDK. Mainly examples written in Java that are now available as NetBeans projects and that can be used instead. The advantage of the NetBeans projects is that you can easier browse the code and debug the examples directly from NetBeans. Karl Weber's arguments convinced me that it is better to have the Java sources independent from the NetBeans project: this way, instead of having to maintain the sources for NB, Eclipse, etc., the only sources that have to maintained are the project-independent ones; then one has the way how to include this sources in the respective project. For client applications, NB with the OOo API plugin can have relative sources, so that the NB user only needs to get (and keep together, otherwise the relative reference does not work) api/examples/java/sources api/examples/java/netbeans For UNO components, relative references do not work because the plugin has several issues (the extension manifest, IDL files, etc. must be inside the project). I can't imagine a good solution with cvs, but svn has external definitions (though OOo is planning to move away from svn...) You are right here concerning the place of important files (like idl files, manifest etc.) for a UNO component used with the NetBeans plugin. They have to be inside of the NetBeans project. Of course, this can be fixed, but I do not know when I'd find the time for this. Are there any volunteers wanting to help improve the NetBeans plugin for OpenOffice.org? -Steffen Another A further advantage of having the examples standalone and documented in the wiki is that the community can easier help to improve the examples. submiting code may not require write access to the repository, it can be submited via issue tracker; but wouldn't anyway this mean to sign the JCA? ... not so easy in this case... Regards -- Steffen Grund steffen.gr...@sun.com Sun Microsystems Software Engineer - StarOffice Nagelsweg 55 Phone: +49 40 23646 647D-20097 Hamburg Fax:+49 40 23646 550 http://www.sun.com/staroffice --- Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB 161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] unowinreg.dll error on windows xp while launching UNO client application
ashok _ wrote: I have an openoffice uno client application built using the OOo netbeans plugin on ubuntu 8.04 with openoffice.org 3.0.1 and the 3.0 sdk... It runs fine on ubuntu, but the same application fails to launch on windows and fails with the following error : Exception in thread main java.lang.UnsatisfiedLinkError: C:\Documents and Settings\Administrator\Local Settings\Temp\unowinreg1318910559123489226.dll: Can't load this .dll (machine code=0xbd) on a IA 32-bit platform at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.load0(Unknown Source) at java.lang.System.load(Unknown Source) at com.sun.star.lib.loader.WinRegKey.clinit(WinRegKey.java:88) at com.sun.star.lib.loader.InstallationFinder.getPathFromWindowsRegistry(InstallationFinder.java:207) at com.sun.star.lib.loader.InstallationFinder.getPath(InstallationFinder.java:115) at com.sun.star.lib.loader.Loader.getCustomLoader(Loader.java:179) at com.sun.star.lib.loader.Loader.main(Loader.java:140) Any ideas what may be wrong ? - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org There was a change in the NetBeans plugin to use the unowinreg.dll from the installed SDK as opposed to use one from the plugin internally. Depending on the NetBeans version (6.1 or newer), you can update the plugin to the latest version. (See Tools - Plugins - Updates in NetBeans if an update is available) Hope that helps, Steffen - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Re : [api-dev] UnoTunnel
Hello, for a Java developer there is no chance to implement XUnoTunnel in a working way. The interface returns a handle on the actual implementation object (in C++) which is then used to call non-API functions. Couldn't you just insert a normal text field and feed that from your outside source? Regards, Steffen cguer...@yahoo.com wrote: Ok, thanks for your reply. So lets be more precise... I'm trying to develop my first extension. This extension should providing a text field (similar to what does com.sun.star.text.textfield.User) but provides data from an outside source. I provide new services for some objets and try to insert them into a text document. My extension provides a service (lets call it MyFunnyTextField). The implementation object implements the com.sun.star.text.XTextField, com.sun.star.util.XUpdatable, com.sun.star.text.XDependentTextField interfaces (although I'm not quite sure if I need all of these) and supports the com.sun.star.text.TextContent service. I can create it by using the general service factory (it does not work with the text document factory, I don't know why and also don't know how to register in it, but that's another issue). Unfortunately, I get this error: object does not implement XUnoTunnel. Once the object implementing MyFunnyTextField is created, I get the Text of the document and insertTextContent my newly created object. I get an exception with the message object does not implement XUnoTunnel. I looked at the dev guide and tried to implement this interface, but as I develop in Java, I could not figure out how to do it. As this interface seems to be a kind to not-so-nice tricky thing, is there any workaround? As it is said in the dev guide: Using this interface is a result of an unsatisfactory interface design, because it indicates that some functionality only works when non-UNO functions are used. In general, these objects cannot be replaced by a different implementation, because they undermine the general UNO interface concept. So my question is: should I continue trying to provide an implementation of XUnoTunnel, should I rework the OpenOffice source code to get rid of XUnoTunnel (which I'm not sure to be feasible) or should I better give up now? Hope it helps understanding my issue. Christophe __ Ne pleurez pas si votre Webmail ferme ! Récupérez votre historique sur Yahoo! Mail ! http://fr.docs.yahoo.com/mail/transfert_mails.html - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org -- Steffen Grund steffen.gr...@sun.com Sun Microsystems Software Engineer - StarOffice Nagelsweg 55 Phone: +49 40 23646 647D-20097 Hamburg Fax:+49 40 23646 550 http://www.sun.com/staroffice --- Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB 161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] SDK 3.0 compatible with 2.4?
Hi, it's the code for bootstrapping OpenOffice.org, located in sdk_root/classes. It consists of some Java classes and a dll for the Windows platform. See the sdk_root/examples/java/DocumentHandling/DocumentConverter.java example where it is used. HTH, Steffen Marian Roselló Bennassar wrote: Hi, This may seem a silly question but, what is: bootstrap glue code from the 3.0 SDK ? Thanks, Marian. -Original Message- From: juergen.schm...@sun.com [mailto:juergen.schm...@sun.com] Sent: 14 January 2009 09:31 To: dev@api.openoffice.org Subject: Re: [api-dev] SDK 3.0 compatible with 2.4? Marian Roselló Bennassar wrote: Hi, Another question on the same subject, I have class that saves odm/odt as pdf/html, it was implemented for 2.4. I run it from the command line using: Java -Dcom.sun.star.lib.loader.unopath=UNO_PATH com.sun.star.lib.loader.Loader myClass myArgs Should it be possible to running with 3.0. I've tried it but there seem to be some jar files missing (e.g ridl.jar) and I didn't know where to find them. Is there any document explaining how to do this in 3.0? Thanks, Marian. -Original Message- From: Jason Cooper [mailto:skaw...@gmail.com] Sent: 13 January 2009 22:44 To: dev@api.openoffice.org Subject: Re: [api-dev] SDK 3.0 compatible with 2.4? That's to be expected. Thanks for the reply. Jason On 1/13/09, Juergen Schmidt juergen.schm...@sun.com wrote: Jason Cooper wrote: Hello. I just wanted to check on the backwards compatibility of the new SDK. I'm beginning to write some Java code to interact with OOo. I want the code to work with both OOo 2.4.x and 3.0. Will SDK 3.0 work for both 2.4.x and 3.0 or will I need to install and develope with both SDKs? In generally yes, you only have to take care of the used types, services. Maybe they were introduced in 3.0. And some of the extensions infra structure features (entries for the description.xml) are in the 3.0 only. rebuild your Java with the bootstrap glue code rom the 3.0 SDK or the use our new NetBeans plugin 2.0.3. We had to adapt the code to work with 3.0 but it is backward compatible. Juergen Juergen Thanks, Jason - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org -- Steffen Grund steffen.gr...@sun.com Sun Microsystems Software Engineer - StarOffice Nagelsweg 55 Phone: +49 40 23646 647D-20097 Hamburg Fax:+49 40 23646 550 http://www.sun.com/staroffice --- Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB 161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] XComponentLoader.ComponentFromURL throws IllegalArgumentException: URL seems to be an unsupported one.
Hi Albert, your code works fine for me. Of course, I used only a simple odt document. Perhaps the filter for loading the docx document cannot be determined. You can add this to the properties for loadComponentFromUrl, the name of the property is FilterName, the value the name of the filter you'd like to use. Regards, Steffen Albert Law wrote: Hi, Me, again. :) I'm having problems with XComponentLoader.ComponentFromURL where it is loading from an XinputStream. I'm a bit paranoid and don't want this to be a reoccurance of bug 75191 ( http://www.openoffice.org/issues/show_bug.cgi?id=75191 ). Can anyone see what I could have possibly done wrong in the following code? Thanks! ps: The ultimate goal is to load from a byte[]. This seemed to be a good first step. pps: Nothing is null and the file does exist. In fact, I have successfully loaded from a URL via XComponent xComponent = xComponentLoader.loadComponentFromURL(file:///c:/test.docx, _blank, 0, loadProps); where loadProps is empty. ppps: I'm using the most recent version of everything. [begin] XComponentContext xContext = Bootstrap.bootstrap(); XMultiComponentFactory xServiceManager = xContext.getServiceManager(); Object desktop = xServiceManager.createInstanceWithContext(com.sun.star.frame.Desktop, xContext); XComponentLoader xComponentLoader = (XComponentLoader)UnoRuntime.queryInterface(XComponentLoader.class, desktop); XSimpleFileAccess xSimpleFileAccess = (XSimpleFileAccess)UnoRuntime.queryInterface(XSimpleFileAccess.class, xServiceManager.createInstanceWithContext(com.sun.star.ucb.SimpleFileAccess, xContext)); XInputStream xInputStream = xSimpleFileAccess.openFileRead(file:///c:/test.docx); PropertyValue[] loadProps = new PropertyValue[1]; loadProps[0] = new PropertyValue(); loadProps[0].Name = InputStream; loadProps[0].Value = xInputStream; XComponent xComponent = xComponentLoader.loadComponentFromURL(private:stream, _blank, 0, loadProps); [end] leads to (line numbers are off, of course): com.sun.star.lang.IllegalArgumentException: URL seems to be an unsupported one. at com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:182) at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:148) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:344) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:313) at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:101) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:652) at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:154) at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:136) at $Proxy3.loadComponentFromURL(Unknown Source) at com.snowbound.testOOUno.main(testOOUno.java:223) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.star.lib.loader.Loader.main(Loader.java:144) - Albert - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Netbeans OOo Plugin 2.0: How to add custom files for an option dialog to an add-on project?
Hello, this works for me: prop oor:name=OptionsPage value%origin%/../../../../../dialogs/Leaf.xdl/value /prop Regards, Steffen Benjamin Vollmer wrote: Hi, Ok, let us take my example. OptionsDialog.xcu is stored under /registry/data/org/openoffice/Office/ and the option dialog file is stored under /dialogs/. How should my entry look like? prop oor:name=OptionsPage value../../../../../../%origin%/dialogs/Leaf.xdl/value /prop (This didn't work for me.) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]