Issue 96611

Summary: First person to open a read-only document has exclusive lock on it. Nobody else than this first user can open it for read-write.
Product: General Reporter: chojin <robin.roevens1>
Component: uiAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: frank.loehmann, issues
Version: OOo 3.0   
Target Milestone: ---   
Hardware: All   
OS: Unknown   
Issue Type: ENHANCEMENT Latest Confirmation in: ---
Developer Difficulty: ---

Description chojin 2008-11-26 13:48:45 UTC
We have a few documents which are mainly meant for reference and we don't want
people to make changes to the file by accident. And when a change has to be made
it has to be well thought of.
Already from the time we used MS Office (Excel) we marked those documents to be
opened read-only by default. And when a change has to be made, it can then be
reopened in read-write mode. This way we are certain accidental changes are (as
good as) excluded, and I don't have to find out who opened the document first
and thus has the lock on the file, before I can change the document. If there is
a lock on the file, then we know someone is actually editing the file and not
only having the file open for reference.

When we migrated those documents to OpenOffice (v2.3 back then) we set this
option again on those files: Extra -> Options -> Security -> Open in Read-Only
mode (translated from dutch, don't know the actual English notation) And at
first it seems to work as expected: When the file is opened, it opens in
read-only mode by default. But when a second user tries to open the file for
read-write, OOo complains telling the file is already in use for read-write by
another user (since OOo 3 it even gives us the username of the user who opened
the file first).

Only when the first user toggles from the default read-only mode to read-write
mode and then back to read-only mode, the lock on the file is released and a
second user can switch to read-write mode.

Steps to reproduce:
* Open an existing document or create a new one
* Set Extra -> Options -> Security -> Open in Read-Only mode
* Close the file
* Re-open the file --> The file is opened in Read-Only mode
* Have a second user on the network also open the file --> The file is opened
* Have the second user click on the Open for editing-button --> The user will
get an error about the file being in editing mode by the first user
* Have the first user click on the Open for editing-button --> The file will be
reopened in read-write mode
* Have the first user again click on the Open for editing-button --> The file be
reopened again in read-only mode
* The second user can now press the Open for editing-button and edit the file.

We have seen this issue as of OOo 2.3 through 2.4, 2.4.1 to 3.0. The OS we use
is Windows XP on PC platform, but I assume this is OS and platform independent?

I think this is a defect since a user never expects that he is locking a file
for read-write by opening it read-only.
Comment 1 thorsten.martens 2008-11-27 09:23:49 UTC
TM->MAV: reproducible in a m12, please have a look, thanks.
Comment 2 mikhail.voytenko 2008-11-27 12:32:40 UTC
This is a very old behavior and actually a feature. It was explicitly
implemented in the way that the document opened for editing but the UI does not
allow to edit the document.

mav->fl: As we have discussed, the requested behavior looks to be more consistent.
Setting the target 3.x for now.
Comment 3 yvonh 2010-02-25 15:59:19 UTC
We have a similar problem where there's one person controlling a MS Excel 
spreadsheet and all the others can use it for reference.  The file is setup to 
open read only or read/write with a password.

The master can open the file at any time to modify it and the other users can 
open it for reference (read only) at any time using MS Excel.  

With OpenOffice, if at least one user has it opened read only, the master can 
not modify the file.  He has to find all the users that have the file opened 
and ask them to close it before being able to modify the file.  This is more a 
bug than a feature or is a bad feature.

Is there a way in the options to fix this?? I looked but I didn't find anything.

Comment 4 Marcus 2017-05-20 10:48:12 UTC
Reset assigne to the default "".