Hello Mirko,
> Hi,
>
> I was wondering if there is any way to tell OOo to stop
loading a
> document - i.e. XComponentLoader.loadComponentFromURL()
- after starting
> the operation?
>
> I drive OOo from Java/Uno, but some documents can take
a very long time
> to load - see e.g.
>
> http://www.openoffice.org/issues/show_bug.cgi?id=78118
>
> and in some applications it would be better to cancel
the operation
> after a timeout and tell the user "sorry, this
document is unsupported"
> rather than make the user wait for several minutes.
You are right - it would be nice to have such feature in OOo
...
but currently OOo does not have such feature .-)
There are already interface supporting canceling of load
requests.
css.frame.XFrameLoader and css.document.XFilter.
So it seams that only XComponentLoader needs some new
functionality.
But - please dont forget that those cancel request must be
supported
by the code implementing the interface. If e.g. the filter
is blocked by
a system call nobody can cancel these request.
> The only way I can think of is to terminate the OOo
process. Anybody has
> a better idea?
....
Solution a) XDesktop.terminate() wouldnt help. Because it
finds the new
created frame used for the load request. And those frame
hinder the
office on termination. So this API call will return
"false".
Solution b) Kill the office hardly. Then you will trigger
the mechanism
behind AutoRecovery and CrashSave. Also not an option to be
used realy.
Seams you need the new interface
XComponentLoader2.cancelLoadComponentFromURL() .-)
>
> Thanks
>
> Mirko
>
Regards
Andreas
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|