Hi Elvis,
On 05/19/09 00:04, Elvis Ciocoiu wrote:
It seems like a good solution. I implemented a listener to
XDispatchProviderInterceptor an register it in the frame. I've intercepted
the urls uno:CloseWin and .uno:CloseFrame and forced a save fo the current
document (if is one loaded from the database).
You are completely right, this is a good way to implement own handler
for document closing. Please intercept .uno::CloseDoc as well in this
case to let all the three possible closing events be handled.
Best regards,
Mikhail.
That way I'll still have the
document modifications locally in the temporary file in case the ooffice
crashes before the user is saving it to the database. I think it can be done
using the modify interceptor also. Anyway if is to use the document only in
memory your solution is ok. Thank you.
Yes it works :). I'll have to decide which to use.
Christoph Jopp wrote:
Hello Elvis,
I don't know if this is what you are looking for, but I think you could
implement an css.util.XModifyListener and catch the modified() event.
f.e. to set the modified-flag of the document to the desired value.
The setModified method is accessible via the css.util.XModifiable
interface.
Hope that helps
Christoph
Am Montag, 18. Mai 2009 21:15:43 schrieb Elvis Ciocoiu:
I'm want to load/save documents in ooffice from a database. From the
documentation it seems that this it will work using a temporary file. My
problem is that after loading the document and after the user did some
modifications to it the document is dirty. And if the user is trying to
close the document first it will appear a confirmation dialog asking to
save the modifications on disk. Can I inhibit this behaviour? I'd like to
show my own dialog asking if for database saving. Is there a sample for
loading/saving documents without using temporary fils (using streams)?
Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
Sun Microsystems GmbH Mikhail Voytenko
Nagelsweg 55 Software Engineer
20097 Hamburg Phone: (+49 40)23646 500
Germany Fax: (+49 40)23646 550
http://www.sun.de mailto:[email protected]
Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Amtsgericht München: HRB 161028
Geschäftsführer: Thomas Schröder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Häring