Description: I use Calc to manage some data, and I often have to do one of a few templated find/replaces over that data. The Find/Replace offers two dropdowns: one for what to find, and one for what to replace it with. However, I find two usability problems that I think makes them not as useful as they could be: 1. they clear across restarts, which means I needs to re-enter the same find/replace patterns every time I reopen the document 2. the find / replace patterns aren't linked; ideally, choosing a find pattern would retrieve the (last) associated replace pattern, so a previous find/replace configuration can quickly be recalled. (My issue is in Calc, but I'd expect it to be similar with other components) Steps to Reproduce: 1. In calc, open a document with some data 2. Enter a find and replace pattern, then apply it 3. Enter a second find and replace pattern, then apply it 4a Select the first find pattern again 4b Restart LO, and open the find/replace dialog again Actual Results: 4a The replace pattern is NOT updated to match the find pattern as used the first time 4b The find and replace patterns dropdowns are empty Expected Results: 4a The replace pattern is updated to match the find pattern as used the first time 4b The find and replace patterns dropdowns contain previously-used patterns Reproducible: Always User Profile Reset: No Additional Info: Version: 24.8.2.1 (X86_64) / LibreOffice Community Build ID: 480(Build:1) CPU threads: 4; OS: Linux 6.11; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US 24.8.2-1 Calc: threaded
Different documents probably require own sets of search terms, meaning if we remember the terms it needs to be stored in the document. This sounds, however, like a serious privacy issue (could be mitigated by checking the author). And I wonder how often you need the same terms for find and replace. Aligning the two means essentially to halve the number of items.
This would need to be per-document, but not into the ODF archive. Meaning it would have to be forced into user profile. But might be feasible if we were to pull the MRU history from the registrysettings.xcu as suggested for the thumbnail previews as for bug 99716 otherwise -1
(In reply to V Stuart Foote from comment #2) > This would need to be per-document, but not into the ODF archive. Meaning it > would have to be forced into user profile. You'd multiply the search entries with each new document. Not a smart move IMO.
(In reply to Heiko Tietze from comment #3) > (In reply to V Stuart Foote from comment #2) > > This would need to be per-document, but not into the ODF archive. Meaning it > > would have to be forced into user profile. > You'd multiply the search entries with each new document. Not a smart move > IMO. Only for the document count we hold in the MRU (currently held in profile .XCU Histories:HistoryInfo as 'PickList' ItemList stanzas). Limited to the expert config value of 'PickListSize' with a current default of 25. So not much overhead to holding a stack of Find/[Replace] pairs per document in profile, certainly less than the perdocument thumbnails and other HistoryInfo. All of which would benefit by move out of the .XCU file into profile sub-directory.
(In reply to Heiko Tietze from comment #1) Not sure I support the request generally, but > This sounds, however, like a serious privacy issue (could be mitigated by > checking the author). Could it be a per-document opt-in setting? > And I wonder how often you need the same terms for find and replace. Actually, one may often search for the same things in the same document. Just think of long Unix man pages... or the ODF specification.
If technically feasible, it does make sense to me to add this functionality.
Alternative approach: Add an option to save named searches/search profiles to the find/replace dialog. Would be useful especially for some more involved regex searches.
We discussed the topic in the design meeting. There seems to be some acceptance for the idea to share find and replace terms. But if we implement this it might be a good idea to add an option for the alternative behavior. The second part is not clear. Storing the data with the document is not acceptable while saving on the workstation could be done with the recently used files (so you get the search terms per document) or independently, which allows to have it on new documents. The latter sounds more reasonable. Olivier, do you agree?
Storing on the workstation makes sense to me, yes. I like the idea of being able to selectively choose which replacement patterns should be retained. Storing every one-off replaces may create too much noise. However as a user, you would know when you are using the same s/r for the fifth time, so it would make sense to be able to explicitly mark an s/r pair for storing locally for later reuse. And, yes, regexps are definitely involved in my use-case.
Thinking about this some more, I am against implementing this. The benefit is outweighed by the potential for inadvertantly disclosing information one does not wish to have disclosed. Example: Guest account on a desktop computer somewhere. Person 1 opens a document which is password-protected and searches for some sensitive information. They then close the document and leave. Then, Person 2 logs in and starts LibreOffice. They can now see strings or pairs-of-strings from within a confidential document, with zero effort. The pairs-of-strings also allow them some insight regarding what actions Person 1 was taking. Also, thinking about the applications I use which have Find/F&R functionality - I believe essentially all of them retaining Find strings and Fine/Replace between app sessions: Text Editors, IDEs, PDF readers and so on. But - what about as an opt-in feature? In that case, the level of danger is somewhat lower, although not all the way down, since the person typing in the search string might not be aware of the opt-in. So in this case I don't have a strong opinion either way.