Observed in Calc with xls file; I did not look at other components.
If a file is opened in read-write mode (the default), then toggled to read-only (using the 'edit file' button, the file is still kept open (now apparently in read-only mode) (based on my observations using sysinternals process explorer). As far as I can tell, there is no need to keep a read-only mode file open once it has been read in. However, there is a good reason to close it once it has been read in. Namely, Windows 7 (and no doubt later versions) will not permit a machine to sleep if it has a file opened across the network.
Meanwhile, it appears that if a file is initially opened in read-only mode (by checking the read-only check box in the open dialog), then the file is closed once it has been opened and read.
If my observations are correct, then this is inconsistent behavior, and when a file is toggled from read-write to read-only, the file should then be closed.
Operating System: Windows 7
Version: 184.108.40.206 release
in sysinternal I doesn't see a difference between read only and normal file, but it's probably because I don't know what to watch. Please describe your observations. Thank you
(In reply to raal from comment #1)
> in sysinternal I doesn't see a difference between read only and normal file,
> but it's probably because I don't know what to watch. Please describe your
> observations. Thank you
I'm not sure what you mean by "see a difference between read only and normal file"?
If the file is read-only, calc does not need to keep an open file handle to it after it has read it in, hence it should not even show in process explorer.
Finally I've found where to see open files in sysinternals..
I can confirm with Version: 220.127.116.11.alpha0+
Build ID: ea59d42d2098e8be8b3ab9667922e8427ee4b714
TinderBox: Win-x86@42, Branch:master, Time: 2015-03-23_01:47:57
file type xlsx, ods.
In linux I doesn't see this behaviour, after set Edit/read only is lsof command empty.