Apache OpenOffice (AOO) Bugzilla – Issue 898
Java: IOException when trying to storeAsUrl
Last modified: 2002-09-10 16:41:37 UTC
Storing with FilterName still doesn't work for me. I get: "Error saving the document Untitled1. Wrong parameter. The operation was started under an invalid parameter". Next I get an IOException. My FilterName "swriter: HTML (StarOffice Writer)" should be valid. (?) A code snippet: Object oDesktop = xMultiServiceFactory.createInstance ("com.sun.star.frame.Desktop"); XDesktop xDesktop = (XDesktop)UnoRuntime.queryInterface(XDesktop.class, oDesktop); oUnoObject = xDesktop.getCurrentComponent(); //Writer XStorable xStorable = (XStorable)UnoRuntime.queryInterface(XStorable.class, oUnoObject); PropertyValue[] fileProperties = new PropertyValue[1]; fileProperties[0] = new PropertyValue(); fileProperties[0].Name = "FilterName"; fileProperties[0].Value = "swriter: HTML (StarOffice Writer)"; try { xStorable.storeAsURL("file:///g|/openoffice60- 2/user/work/teststore.html", fileProperties); } Callstack: com.sun.star.io.IOException: at com.sun.star.lib.uno.environments.java.Proxy.invoke(Proxy.java:146) at com.sun.star.lib.sandbox.generic.DispatcherAdapterBase.invokeSec (DispatcherAdapterBase.java:91) at com.sun.star.lib.sandbox.generic.DispatcherAdapterBase.invokeV (DispatcherAdapterBase.java:145) at JSGencom_sun_star_frame_XStorablecom_sun_star_lib_uno_environments_java_Proxy.st oreAsURL(Unknown Source) at java.lang.reflect.Method.invoke(Native Method) at com.sun.star.lib.uno.environments.java.java_environment$HolderProxy.invoke (java_environment.java:161) at com.sun.star.lib.sandbox.generic.DispatcherAdapterBase.invokeSec (DispatcherAdapterBase.java:91) at com.sun.star.lib.sandbox.generic.DispatcherAdapterBase.invokeV (DispatcherAdapterBase.java:145) at JSGencom_sun_star_frame_XStorablecom_sun_star_lib_uno_environments_java_java_env ironment_HolderProxy.storeAsURL(Unknown Source)
Kay, is it a bridge or a desktop problem?
It is a bridged exception (com.sun.star.io.IOException), which means, it is a desktop problem.
It is a bridge exception (com.sun.star.io.IOException), so it is not a bridge problem.
changing QA contact from bugs@ to issues@
The filter name is wrong. With using "swriter: HTML (StarWriter)" instead it worked. You can find the filter names in the Typedetection.xml file
.