Hi,
   I have made couple changes to SWriter.java program that has been
downloaded as a part of StarOffice SDK.

 My idea is to create to new document and save it in MSWord format.

 SWriter.java has code to create a new document but it does not have any
code related to save the document.

I have added the following code to do that.

PropertyValue [] SaveArgs = new PropertyValue [1];
PropertyValue p1 = new PropertyValue();
p1.Name = "FilterName";
p1.Value = "swriter: MS Word 97 ";
SaveArgs[0] = p1;
String sURL = "file:///D:/goli/teststardoc";
  XStorable oStorable =  (XStorable)
UnoRuntime.queryInterface(XStorable.class,myDoc);
  oStorable.storeAsURL(sURL,SaveArgs);


When I try to run the modified code I am getting the following error.

java.lang.ClassCastException: java.lang.StackOverflowError
        at com.sun.star.uno.WeakTable$IDispatcher.invoke(WeakTable.java:63)
        at
com.sun.star.lib.sandbox.generic.DispatcherAdapterBase.invokeV(DispatcherAda
pterBase.java:83)
        at
JSGencom_sun_star_frame_XStorablecom_sun_star_uno_RefererObject_29.storeAsUR
L(Unknown Source)
        at goli1SWriter.main(goli1SWriter.java:157)

Please help.
Tx
Goli

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to