This is an "Easy" Hack for somebody who likes more advanced hacking ;-)
When you open a document that is already open by a different user, you get a warning like "Document file '$(ARG1)' is locked for editing by:" (see STR_OPENLOCKED_MSG in uui/source/openlocked.src). You have the choice to open it read-only, or a copy. In case of opening it read-only, it would be great to get a notification when the document has been closed by the other person again.
The dialog is effectively created in sfx2/source/doc/docfile.cxx, SfxMedium::ShowLockedDocumentDialog(). In the case that it is opened read-only, you should trigger a thread that will wake up every minute, and check for the presence of the lock file. If the lock file disappeared, it should create a notification dialog that the file is not in use any more; if possible, with an offer a reload of the file.
This feature seems really interesting and I would like to give it a try as a first easy (but interesting) hack.
Let me know if you have some advices or objections,
I start to try this bug. I debug the code to see where is more appropriated to start the thread. I think the SfxMedium::ShowLockedDocumentDialog is inappropriate place to do it. This function only show the user dialog and return the user choose, right?
The function SfxMedium::LockOrigFileOnDemand is appropriated?
The LibreOffice has some own thread API or can I use pthread.h API?
Today I back to work in this bug. I tried but I could not simulate this bug on version 184.108.40.206.alpha1.
When I open the same file with second instance of writer, any message is showed. Is the right behavior?
Please, desconsidere my last comment
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.
see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
ASSIGNED->NEW: No change since 2013 apparently ...
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyInteresting SkillCpp TopicUI)
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC)