Julien Galand wrote:

> Hi to all,
> 
> Does someone know a way to lock/unlock the model of a text document,
> that is, to make it temporarily read-only (the user cannot change its
> content) ?
> My purpose is to make sure that when my add-on is currently retrieving
> the text and manipulating it later, it has not changed in between.
> Because I assume OO to be fully multithread, it seems theoretically
> possible to me that the user (or any component other than mine) may
> modify the text while my add-on thread is working on it.

OOo is not multithreaded, but it's possible that two threads can work on
the same OOo model as it is not locked between API calls. This will
change with our new Threading Framework in the future where code
executed in any thread can obtain an exclusive lock for a defined span
of time.

ATM you can't lock a model against changes through its API, but you can
prevent it from being modified through UI operations (dispatch calls).

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to