Joined: 20 Apr 2006
|Posted: Thu Apr 20, 2006 12:02 pm Post subject: Migrating 1.1.4 to 2.0.2: deprecated OfficeConnection etc.
|We used Open Office APIs to embed Open Office in a framed window. Three classes,
OfficeConnection, OfficeWindow and LocalOfficeConnection, are deprecated in 2.0.2.
Our code was tested again APIs of 1.1.4, and is no longer working with 2.0.2.
The possible problems are:
1) We did not call the APIs correctly in our code. When the bugs in Open Office
are fixed, our own bugs are exposed.
2) 2.0.2 APIs are no longer backward compatible. I have noticed that two processes
soffice.exe and soffice.bin are created in 2.0.2, whereas only one soffice.exe was
created in 1.1.4.
I would greatly appreciate it if you could tell me how to replace the deprecated
classes in 1.1.4 with new classes in 2.0.2 if that is the solution, or where our
calls could be wrong based on your guess or experience.
Attached is a code segment.
Object object = mServiceFactory.createInstance("com.sun.star.frame.Frame");
XFrame mFrame = (XFrame) UnoRuntime.queryInterface(XFrame.class, object);
String type = "writer_StarOffice_XML_Writer";
object = mFrameLoaderFactory.createInstance(type);
= (XSynchronousFrameLoader) UnoRuntime.queryInterface(
PropertyValue desc = new PropertyValue;
desc[ 0 ] = new PropertyValue("FileName", 0, "C:/test.sxw",
desc[ 1 ] = new PropertyValue("TypeName", 0, type,
frameLoader.load(desc, mFrame); // This call is now hanging.