Niklas Nebel wrote:

>> Unfortunately it must be.  I don't want to open the file again, I
>> just want to set/clear the lock, and there's no API for that in
>> osl.
> 
> Why not open it again? Treat it more like import/export instead of 
> load/save, with embedded objects in a temporary storage, and don't
> keep a file handle. Then, before saving, check if your "shared" file
> is still there (you'll have to read it anyway, for the intermediate
> changes).

Yes, that's how it should be done. Especially as I assume that there
won't be an API for setting/clearing a file lock via osl anytime soon.
osl is kind of a least common denominator for the supported operating
systems and AFAIK Windows doesn't allow to do this, at least Win9x. But
I think that Win2000/XP also don't have an explicit file locking API,
all sharing negotiations happen on opening the file.

Where's the problem in reopening?

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

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

Reply via email to