OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Migrating 1.1.4 to 2.0.2: deprecated OfficeConnection etc.

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
Peter Zhang
Newbie
Newbie


Joined: 20 Apr 2006
Posts: 4

PostPosted: Thu Apr 20, 2006 12:02 pm    Post subject: Migrating 1.1.4 to 2.0.2: deprecated OfficeConnection etc. Reply with quote

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.
Or
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 frameLoader
= (XSynchronousFrameLoader) UnoRuntime.queryInterface(
XSynchronousFrameLoader.class, object);
PropertyValue[] desc = new PropertyValue[2];
desc[ 0 ] = new PropertyValue("FileName", 0, "C:/test.sxw",
PropertyState.DIRECT_VALUE );
desc[ 1 ] = new PropertyValue("TypeName", 0, type,
PropertyState.DIRECT_VALUE );
frameLoader.load(desc, mFrame); // This call is now hanging.

Peter Zhang
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group