As a teacher, I create my documents on my personnal computer. I then display my document on the blackboard with a video projector. However, I some time end-up with a message telling me my file is locked from editing by XXX. With XXX being my personnel computer name and username (it also contain path to libreoffice which can also leak some informations). All student can see this message. The issue is that my username on my computer is not my real name but the nickname I use on internet. Which means student can see my private nickname and hence see what I say on internet. Two solutions would be possible : → don't show the user/computer name immediatly on the popup but put to button "Show more" to display them. → add a settings somewhere in libreoffice to anonymise data in lock file / allow to choose computer / user name in lock file (or both solution)
Mike, what do you think here?
I think that it's easy not to use nickname used on the Internet. It only takes a change in Options.
(In reply to Mike Kaganski from comment #2) > I think that it's easy not to use nickname used on the Internet. It only > takes a change in Options. Please elaborate.
(In reply to Heiko Tietze from comment #3) The problem of @Matheod was that the normal message telling the user who has locked the file was "nickname used on Internet". This was a user error, when user opened a file on some system, then was attempting to open the same file on another system (and got a legitimate warning - usually in a network environment, this message allows one to know whom to ask to close the file), and the specific situation was that the display was demonstrated to some other people at that time, and user wanted to not show the nickname to those other people. Quite a complex combination, with a simple solution: in your LibreOffice, enter "nickname *not* used on Internet" in Options, instead of "nickname used on Internet". However, the idea to hide the details under a "[+] Show Details" in the dialog looks unproblematic, and if someone wants to implement it, please do. So both WONTFIX and EASYHACK seem appropriate to me.
The name displayed is the computer name and OS session name and not the name set in Libreoffice option.
The topic was on the agenda for the design team meeting. We agree that hiding sensible information would be nice to have. Such a "Show Details" expander could be easily implemented. uui/source/iahndl-locking.cxx uses STR_OPENLOCKED_MSG that needs to be split into two parts, one sentence being always shown the other enclosed in an expander. Difficulty medium since it is a standard dialog now that could be replaced by a UI based dialog.
Hi. I would like to work on this issue. As of now I can see that STR_OPENLOCKED_MSG (in this file: https://opengrok.libreoffice.org/xref/core/uui/inc/strings.hrc?r=f9ab3136) takes three arguments, of which ARG1 is the file, ARG2 is the username. I'm not sure what ARG3 is. Can someone please clarify this? Then we can probably split this into two strings in which ARG1 and ARG2 go into the "Show Details" expander, and ARG3 remains visible in the dialogue by default. Also, in the handleLockedDocumentRequest_ function in /core/uui/source/iahndl-locking.cxx, can someone tell me exactly how the dialog box is created and how the arguments are passed to STR_OPENLOCKED_MSG to create the dialogue string? Seeing the function for the first time is a bit confusing. Also, what should I learn to be able to add the "Show Details" expander? Thanks for any help!
(In reply to Siddhant Chaudhary from comment #7) > Hi. I would like to work on this issue. Great! To learn how exactly the code works you could debug uui/source/iahndl.cxx UUIInteractionHelper::replaceMessageWithArguments().
Hi! I tried debugging UUIInteractionHelper::replaceMessageWithArguments(), and now I have a sense of what's going on. I also understood how the dialog box is created (in the AlreadyOpenQueryBox constructor in uui/source/alreadyopen.cxx); now I just need to figure out how the expander button can be implemented (like, what all classes/functions do I need to work with). Can you point me out to this? Also, on a side note, I think the original problem in this bug only addressed the UUI_DOC_LOAD_LOCK flag (which uses STR_OPENLOCKED_MSG); I think a similar problem also holds for the UUI_DOC_OWN_LOAD_LOCK flag (for that, STR_ALREADYOPEN_MSG is used). Thought that does not print out the username (it just says locked for editing by yourself), the essence is the same. Should this also be addressed, or can we leave it like it is?
(In reply to Siddhant Chaudhary from comment #9) > Should this also be addressed, or can we leave it like it is? Sure, if you can kill two birds with one stone.
Created attachment 179226 [details] Image of UI based OpenLockedQueryBox
Hello. I've implemented OpenLockedQueryBox as a UI based dialog. Please see the image attachment of how it looks like, and I'd love to know if any changes need to be made. For the icon image, I wanted to add the dialog-question icon (the same icon as in the original standard dialog), but it looks like LO doesn't have support for that yet. So, I can either remove the icon all together if it isn't needed, otherwise I can add a new image; but I haven't figured out how to do that yet, and any help will be great. For the code, I submitted a patch to Gerrit: https://gerrit.libreoffice.org/c/core/+/132342 Could you please review it, and let me know what things need to be changed? Thanks!
Siddhant Chaudhary committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ff9ff6018bea7c1a4524c8edca8ef554c74e4b3f tdf#141026 Put user and computer name into collapsed section It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Siddhant Chaudhary from comment #11) > Created attachment 179226 [details] > Image of UI based OpenLockedQueryBox Look perfect, thanks.
Created attachment 180851 [details] Two current File In Use dialogs Thanks for implementing this! The dialog needs some more love. 1. Please enable extended tips (Options->LibreOffice->General). Then the dialog shows unwanted tooltips everywhere. 2. The dialog now looks completely different compared to e.g. "the file is locked by yourself from a different session". The icon, size, button layout, their names are all different.
Re-evaluating the EasyHack in 2022 This task is still relevant, as the provided solution only addresses part of the problem. Please see comment #9, 2nd paragraph for the remaining part.
Hello. I had a minor question about Comment 15: can someone tell how to enable extended tips, i.e what code changes do I need to make to do that? I'm not exactly sure how this is done. Also, I had put a new comment about the code structure on the gerrit patch: https://gerrit.libreoffice.org/c/core/+/132342. It will be great if someone can give their thoughts on this.
(In reply to Siddhant Chaudhary from comment #17) > I had a minor question about Comment 15: can someone tell how to enable > extended tips, i.e what code changes do I need to make to do that? I'm not > exactly sure how this is done. How to enable: https://help.libreoffice.org/latest/en-US/text/shared/05/00000120.html Regarding the code, search for extended_tip to find prototypes. @Seth, @Olivier: How to implement extended tips could be added to the wiki.
(In reply to Siddhant Chaudhary from comment #17) > I had a minor question about Comment 15: can someone tell how to enable > extended tips, i.e what code changes do I need to make to do that? I'm not > exactly sure how this is done. I am sorry if I created a confusion with unclear wording in comment 15. I didn't suggest to add extended tips to the dialog; instead, I described how you can *discover* the existing problem in the UI: *if* you enable display of extended tips, you will see the *incorrect/unwanted* extended tips in the dialog, which should *either* be removed, *or* changes to be meaningful. I can't comment on the code pointers how to implement either fix, sorry.
Is it possible to set the section "[+] Show Details" to be shown/folded out by default? Use case: In our office we are using LibreOffice. Our documents reside on a server share that everybody in our office can access. We rely on the lock file mechanism to prevent people from editing the same document at the same time. Sometime people forget to close documents. So we rely on the information presented under "[+] Show Details" to identify this person who holds the lock. Then we can ask this person to close the file and thus release the lock.