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

Problem with XStorable..

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
dvaradharajan
Power User
Power User


Joined: 02 Sep 2004
Posts: 81
Location: Chennai, India

PostPosted: Wed Nov 03, 2004 3:35 am    Post subject: Problem with XStorable.. Reply with quote

Hi,
I am encountering a problem when trying to open 2 spreadsheets in java. If I save the spreadsheet and try to open another spreadsheet with the same connection then it hangs. If I remove xstorable.storetourl and then if I try to open the 2nd spreadsheet then it is working.

Seems there is some problem with XStorable..(Or it is locking the connection)..

Any inputs.
Thanks,
Dinesh
_________________
There's always one more bug- Murphy's law
Back to top
View user's profile Send private message
Cybb20
Super User
Super User


Joined: 02 Mar 2004
Posts: 1569
Location: Frankfurt, Germany

PostPosted: Wed Nov 03, 2004 9:39 pm    Post subject: Reply with quote

Code please.

Christian
_________________
- Knowledge is Power -
Back to top
View user's profile Send private message Send e-mail
dvaradharajan
Power User
Power User


Joined: 02 Sep 2004
Posts: 81
Location: Chennai, India

PostPosted: Thu Nov 04, 2004 5:57 am    Post subject: Reply with quote

Hi Christian,
Here is the code snippet

Code:
XStorable xstorable = (XStorable) UnoRuntime.queryInterface(
                        XStorable.class, xSpreadsheetController.getModel());
fileName = "file:///sample.sxc";

try {
    xstorable.storeAsURL(fileName, new PropertyValue[0]);
} catch (com.sun.star.io.IOException e2) {
    e2.printStackTrace();
}


And when something changes in the spreadsheet I am using ModifyBroadcaster and on modification I do
Code:
xstorable.store()


I am using 1.9 Version of Openoffice. The samepiece of code works for 1.1.2 but again in 1.1.2 it is not disposing properly. The connection is open even after i close the app. I am doin

Code:
 xDisposeable.dispose();


Thanks for your interest..

Thanks,
Dinesh
_________________
There's always one more bug- Murphy's law
Back to top
View user's profile Send private message
Cybb20
Super User
Super User


Joined: 02 Mar 2004
Posts: 1569
Location: Frankfurt, Germany

PostPosted: Thu Nov 04, 2004 9:59 am    Post subject: Reply with quote

You're on Linux/Unix correct?
So far I don't know the answer, what happens when you use storeToURL instead.

Christian
_________________
- Knowledge is Power -
Back to top
View user's profile Send private message Send e-mail
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Thu Nov 04, 2004 11:23 am    Post subject: Reply with quote

Is the URL okay?

If on Linux, for instance, do you have permission to create a document at the root level of the filesystem?

fileName = "file:///sample.sxc";
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
dvaradharajan
Power User
Power User


Joined: 02 Sep 2004
Posts: 81
Location: Chennai, India

PostPosted: Thu Nov 04, 2004 9:47 pm    Post subject: Reply with quote

The URL is ok. I am using Windows and I am appending the path in my app(which is excluded in the code snippet). I was able to save the file but the once I save the file the connection is not killed and file is locked.

I was able to see soffice.exe instance running even after dispose().

Thanks,
Dinesh
_________________
There's always one more bug- Murphy's law
Back to top
View user's profile Send private message
Cybb20
Super User
Super User


Joined: 02 Mar 2004
Posts: 1569
Location: Frankfurt, Germany

PostPosted: Fri Nov 05, 2004 7:50 am    Post subject: Reply with quote

the url is certainly not okay when you're running under Windows, I think.

Christian
_________________
- Knowledge is Power -
Back to top
View user's profile Send private message Send e-mail
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