List Info

Thread: Re: Writer: canceling dispose event




Re: Writer: canceling dispose event
user name
2007-05-11 05:45:37
Hi Michael,

Unfortunately there seems to be no way to detect from
dispose listener 
when the file is closed, because the disposing notification
notifies 
that the disposing is in progress. And the file will be
closed after that.

By the way, the scenario you have described does not need to
know 
whether the file is still locked or not. Even if the file
was opened byt 
OOo for writing and was locked, it still can be opened for
reading, that 
should be enough to transfer the contents to the database.

Best Regards,
Mikhail.

Michael Jeier wrote:
> Hi,
> 
> I have a listener on a Writer document, which gets
triggered, when the
> document gets closed by the user. The file should then
be transferred to a
> database, but it is still locked by OpenOffice. When I
try to manually
> dispose Writer in the event, OpenOffice crashes, which
is not a surprise
> considering that it is already disposing. Can I cancel
the disposing or
> release the file in another way?
> 
> Does anyone has an idea?? Thanks in advance!
> 
> Regards,
> 
> Michael
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


Re: Writer: canceling dispose event
user name
2007-05-11 07:33:37
Hi,

the problem is, that the listener calls a method in my
application which
copy the file into a database and delete the file after
that.
I mustn't do any changes on that method, so I use now a
workaround. First I
save the file normaly and after that I do an SaveAs on a
temp file, than
OpenOffice lock the temp file and I can copy and delete the
file.

Thanks for Your help

Regards,

Michael

On 5/11/07, Mikhail Voitenko <Mikhail.Voitenkosun.com> wrote:
>
> Hi Michael,
>
> Unfortunately there seems to be no way to detect from
dispose listener
> when the file is closed, because the disposing
notification notifies
> that the disposing is in progress. And the file will be
closed after that.
>
> By the way, the scenario you have described does not
need to know
> whether the file is still locked or not. Even if the
file was opened byt
> OOo for writing and was locked, it still can be opened
for reading, that
> should be enough to transfer the contents to the
database.
>
> Best Regards,
> Mikhail.
>
> Michael Jeier wrote:
> > Hi,
> >
> > I have a listener on a Writer document, which gets
triggered, when the
> > document gets closed by the user. The file should
then be transferred to
> a
> > database, but it is still locked by OpenOffice.
When I try to manually
> > dispose Writer in the event, OpenOffice crashes,
which is not a surprise
> > considering that it is already disposing. Can I
cancel the disposing or
> > release the file in another way?
> >
> > Does anyone has an idea?? Thanks in advance!
> >
> > Regards,
> >
> > Michael
> >
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
> For additional commands, e-mail: dev-helpapi.openoffice.org
>
>
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )