List Info

Thread: Re: Interrupt document loading if it takes too long?




Re: Interrupt document loading if it takes too long?
user name
2007-08-06 04:22:27
Hello Mirko,

> Hi Andreas,
> 
> Andreas Schlüns wrote:
>>> I was wondering if there is any way to tell OOo
to stop loading a
>>> document - i.e.
XComponentLoader.loadComponentFromURL() - after starting
>>> the operation?
>> 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.
>>
> 
> Interesting. Maybe there is a way to obtain a frame
from the Desktop and
> then use XFrameLoader to load the document instead of
using
> XComponentLoader then?

Of course it is ...

But then you will duplicate the whole code behind
loadComponentFromURL().

And thats not so easy. You have to create the frame and the
window,
you have to deal with typedetection, you have to make sure
that some 
resources (e.g. progress/interaction handler) will be
created right, you 
have to set some additional properties automaticly (macro
execution mode 
etcpp) ....

At least we are talking about nearly 2000 lines of code /
it's not a 
joke .. current implementation of loadComponentFromURL()
uses ~2000 
lines of C++ code .-)

>>> The only way I can think of is to terminate the
OOo process. Anybody has
>>> a better idea?
>> [...]
>> Solution b) Kill the office hardly. Then you will
trigger the mechanism
>> behind AutoRecovery and CrashSave. Also not an
option to be used realy.
>>
> 
> What if OOo is started with -norestore and
-nocrashreport?

Data lost .-)
Its your decision.

> 
> Thanks
> 
> Mirko
> 

Regards
Andreas

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


Re: Interrupt document loading if it takes too long?
user name
2007-08-06 04:57:37
Hi Andreas,

Andreas Schlüns wrote:
>
>>>
>>> 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.
>>>
>>
>> Interesting. Maybe there is a way to obtain a frame
from the Desktop and
>> then use XFrameLoader to load the document instead
of using
>> XComponentLoader then?
>
> Of course it is ...
>
> But then you will duplicate the whole code behind
loadComponentFromURL().
>
> And thats not so easy.

Right... it doesn't sound like a very sensible thing to do.


I've submitted a feature request to enhance the API

  http://www.openoffice.org/issues/show_bug.cgi?id=80374


>
>>>> The only way I can think of is to terminate
the OOo process.
>>>> Anybody has
>>>> a better idea?
>>> [...]
>>> Solution b) Kill the office hardly. Then you
will trigger the mechanism
>>> behind AutoRecovery and CrashSave. Also not an
option to be used realy.
>>>
>>
>> What if OOo is started with -norestore and
-nocrashreport?
>
> Data lost .-)
> Its your decision.
>

I can live with that for my application, it's working on
document copies
anyway. I'll use this solution for the time being.

Many thanks

Mirko

------------------------------------------------------------
---------
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 )