Issue 898

Summary: Java: IOException when trying to storeAsUrl
Product: udk Reporter: schulten
Component: codeAssignee: Mathias_Bauer
Status: CLOSED NOT_AN_OOO_ISSUE QA Contact: issues@udk <issues>
Severity: Trivial    
Priority: P3 CC: issues
Version: 627   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description schulten 2001-05-15 21:48:43 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)
Comment 1 Unknown 2001-05-16 11:39:49 UTC
Kay, is it a bridge or a desktop problem?
Comment 2 kay.ramme 2001-06-01 08:12:43 UTC
It is a bridged exception (com.sun.star.io.IOException), which means,
it is a desktop problem.
Comment 3 kay.ramme 2001-06-01 08:19:28 UTC
It is a bridge exception (com.sun.star.io.IOException), so it is not a bridge 
problem.
Comment 4 Unknown 2001-11-08 23:08:50 UTC
changing QA contact from bugs@ to issues@
Comment 5 Mathias_Bauer 2001-11-09 11:29:27 UTC
The filter name is wrong. With using "swriter: HTML (StarWriter)"
instead it worked.

You can find the filter names in the Typedetection.xml file
Comment 6 Mathias_Bauer 2002-09-10 16:41:37 UTC
.