| View previous topic :: View next topic |
| Author |
Message |
dvaradharajan Power User


Joined: 02 Sep 2004 Posts: 81 Location: Chennai, India
|
Posted: Wed Nov 03, 2004 3:35 am Post subject: Problem with XStorable.. |
|
|
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 |
|
 |
Cybb20 Super User


Joined: 02 Mar 2004 Posts: 1569 Location: Frankfurt, Germany
|
Posted: Wed Nov 03, 2004 9:39 pm Post subject: |
|
|
Code please.
Christian _________________ - Knowledge is Power - |
|
| Back to top |
|
 |
dvaradharajan Power User


Joined: 02 Sep 2004 Posts: 81 Location: Chennai, India
|
Posted: Thu Nov 04, 2004 5:57 am Post subject: |
|
|
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
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 |
|
 |
Cybb20 Super User


Joined: 02 Mar 2004 Posts: 1569 Location: Frankfurt, Germany
|
Posted: Thu Nov 04, 2004 9:59 am Post subject: |
|
|
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 |
|
 |
DannyB Moderator


Joined: 02 Apr 2003 Posts: 3991 Location: Lawrence, Kansas, USA
|
|
| Back to top |
|
 |
dvaradharajan Power User


Joined: 02 Sep 2004 Posts: 81 Location: Chennai, India
|
Posted: Thu Nov 04, 2004 9:47 pm Post subject: |
|
|
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 |
|
 |
Cybb20 Super User


Joined: 02 Mar 2004 Posts: 1569 Location: Frankfurt, Germany
|
Posted: Fri Nov 05, 2004 7:50 am Post subject: |
|
|
the url is certainly not okay when you're running under Windows, I think.
Christian _________________ - Knowledge is Power - |
|
| Back to top |
|
 |
|