Bug 58676 - EDITING: "Search in all sheets" setting should be persistent after reopening the application
Summary: EDITING: "Search in all sheets" setting should be persistent after reopening ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.3.2 release
Hardware: Other Windows (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
: 62974 77395 84395 (view as bug list)
Depends on:
Blocks: Find&Replace-Dialog
  Show dependency treegraph
 
Reported: 2012-12-23 09:46 UTC by Mathieu Stempell
Modified: 2023-10-12 06:56 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Stempell 2012-12-23 09:46:31 UTC
Please make "search in all sheets" setting persistent for current document after closing and reopening the application (i'm thinking maybe it could be saved in the file itself?).

If not possible for the document, please make it global to the application.
Operating System: Windows XP
Version: 3.6.3.2 release
Comment 1 m_a_riosv 2012-12-24 01:16:20 UTC
Thanks for reporting, Mathieu.

I am agree with your request for enhancement.
Comment 2 Jorendc 2013-01-27 13:54:29 UTC
(In reply to comment #1)
> Thanks for reporting, Mathieu.
> 
> I am agree with your request for enhancement.

Therefore I set this as NEW.
Comment 3 Stanislav Horacek 2014-03-14 17:59:26 UTC
*** Bug 62974 has been marked as a duplicate of this bug. ***
Comment 4 m_a_riosv 2014-04-13 12:14:21 UTC
*** Bug 77395 has been marked as a duplicate of this bug. ***
Comment 5 raal 2014-10-02 13:06:10 UTC
*** Bug 84395 has been marked as a duplicate of this bug. ***
Comment 6 ted939@yahoo.com 2017-06-17 20:49:24 UTC
I've been hoping and searching for this feature for many years now, and it's now almost 3 years since the last post (and about 4.5 years since the first post) on this thread about this.

Has this enhancement been figured out by now?
Comment 7 Stanislav Horacek 2017-11-21 18:49:34 UTC
Any reason for NEEDINFO? Setting back to NEW as the enhancement is described clearly.
Comment 8 Thomas Lendo 2018-10-22 17:11:46 UTC
I think this interferes with bug 81442 'EDITING: When doing a Search and Replace All, "Current selection only" becomes deselected' and bug 98544 'Find & Replace dialog should remember the 'other options' state'
Comment 9 Andreas Heinisch 2023-05-17 10:27:37 UTC
Code pointer:

include/unotools/searchopt.hxx
svx/source/dialog/srchdlg.cxx
unotools/source/config/searchopt.cxx
Comment 10 ady 2023-09-12 14:11:58 UTC
Beware: a user that would execute find and replace on all sheets by mistake (and might not even notice the 'all sheets' checkbox) would unwillingly modify data without the possibility of recovering it.

Forgetting to uncheck an option (e.g. 'all sheets') after it was used once would be very easy/frequent for a common user. One thing is to maintain it (i.e. remember its status) while a file is open; another very different thing is to keep it after the file is closed, or, even worse, to keep it for the next LO session. There are risks in such cases.
Comment 11 Jeff Fortin Tam 2023-09-12 14:55:50 UTC
> a user that would execute find and replace on all sheets by mistake
> (and might not even notice the 'all sheets' checkbox)
> would unwillingly modify data without the possibility of recovering it.

I have tested now, and Undo (Ctrl+Z) *does* work even if you did a search & replace across all sheets.


That said, I can empathize with your concern. If you want the UI to be extra helpful in preventing "did not notice" accidents, what should be done instead is, in the Search & Replace results dialog (misnamed as "Search Results"...):

* Instead of only showing "6 results found" as a string near the bottom, show "<b>6</b> results found and replaced across <b>3</b> sheets." (use bold text and indicate the number of sheets affected, in case the user doesn't notice from the sheet names column, especially with large lists of results)

* Provide an "Undo" button directly in that dialog, next to the Close button. That way, the user cannot panic, the button is conveniently right there.

* ALWAYS show that dialog when doing a search (or search & replace) across multiple sheets, and hide the "Show this dialog" toggle checkbox widget in that situation. In fact, since there is no option to turn that option back on from the "Find and Replace" dialog, I might go one step further and recommend eliminating this option entirely, it kinda makes no sense.

* Bonus points: make that dialog larger to avoid scrolling (ideally auto-sized if there aren't too many results), i.e. bug #157207
Comment 12 ady 2023-09-12 20:25:40 UTC
(In reply to Jeff Fortin Tam from comment #11)
> I have tested now, and Undo (Ctrl+Z) *does* work even if you did a search &
> replace across all sheets.

When a user executes a replace on _all sheets_ by accident, and the action is discovered immediately, then undo might help. That is not the relevant case I presented; just think about not discovering the accident immediately, with multiple actions after the unnoticed 'replace' (even possibly saving the file and exiting LO completely).

Usually, the default settings tend to prevent loss of data, especially by mistake.

The alternative method could be to provide a way to set new defaults for a user to set at will:

* "factory" default settings for F&R would be the current situation.
* add an icon or checkbox or a round/point/dot option in the F&R dialog to save whichever settings are set (ON/OFF) in that moment as the next default settings; as soon as the user presses OK in the dialogue, the new settings will be the new default (and the new checkbox will be set OFF in the next execution of the dialogue).
* add an icon or checkbox or a round/point/dot option in the F&R dialog to reset the default settings to the "factory" defaults as soon as the user presses OK in the dialogue.
Comment 13 Jeff Fortin Tam 2023-09-13 14:04:06 UTC
Ady, I respectfully think you're way overcomplicating this, with your idea of adding a settings saving template mechanism for this dialog. That dialog is already pretty cluttered and confusing enough, in my view.

The most I would add would be a tooltip on the "Replace all" button that appears only when "Search all sheets" is checked, saying "Replace all matches on <b>all sheets</b>", which serve as a third visual warning sign. Heck, if you want to be _extra_ obvious, in addition to the tooltip, you could change the "Replace All" button's label to including a warning sign emoji ("Replace All ⚠️") when "Search all sheets" is checked, but I think that's unnecessary.

Remember these incident-reducing factors:

* There's more than one undo history step possible in an app like LibreOffice, and they can work long after the "Find & Replace" dialog has been dismissed.

* The checkbox widget is already quite noticeable on toolkits/OSes that color the checkboxes (indication no.1), and the user would need to "accidentally" use "Replace all" (instead of replace once) whose label is a second indication (and a tooltip could be a 3rd indication), _and_ somehow still not notice this even with my proposed improvements to the "results" dialog (which would be the 4th indication that makes it really pretty obvious that an operation has indeed happened across all sheets, and would make it easy to undo).

At that point if the user repeatedly ignores _four_ indicators and then blames the software, the amount of things we can do is limited. But they can always undo even long after that dialog is dismissed.
Comment 14 ady 2023-09-13 17:51:01 UTC
(In reply to Jeff Fortin Tam from comment #13)

> At that point if the user repeatedly ignores _four_ indicators and then
> blames the software, the amount of things we can do is limited. But they can
> always undo even long after that dialog is dismissed.

We simply disagree – I won't waste (everyone's) time explaining more details.

* I agree with remembering the "all sheets" setting when the relevant file is still open;
* once LO is closed, the "all sheets" setting should be OFF.

(I even disagree with the current UX behavior in which the F&R settings is remembered between different files within the same session, but that's not part of this ticket.)
Comment 15 Heiko Tietze 2023-09-14 07:33:14 UTC
Fwiw, I agree with Ady to not remember the setting across sessions. But I'd keep it on once it has been set manually.
Comment 16 gwbret 2023-10-09 16:55:22 UTC
I will just add another vote for the setting to be persistent even after closing the application. If we are trying to protect people from 'forgetting' we could make it a preferences setting that would require a more sophisticated user / action to change the default behavior.Importance will vary with use.  I personally get tired of having to constantly click the box.  A small effort, yes. However, I believe in the computer doing the tedious work for me ;-),
Comment 17 Federico Gallo 2023-10-12 03:30:12 UTC
Hello, as a candidate to new contributor I would like to add a small perspective on how to workaround this. 
Currently, the history of Find&Replace as well as the state of check-boxes are kept as long as the suite is still open. 

This means, that if Calc is closed and Writer is opened (while the suite is still opened), the history is there but the checkbox for *All sheets* is obviously not. However, opening Calc again and performing the F&R action will show the checkbox with its last state/value. 

So technically, if we see the different modules (Writer, Calc, etc) as part of the whole (the suite), once the suite is closed the history and options are lost. Then the title for this feature request is accurate. 
And here is the perspective, maybe when a user open a module (Calc for example) finish a task and close the program, maybe the suite should stay active and minimized by default. This could be an option for the user to set.

This definitely does not satisfy the feature request but on the other hand this request has more than 10 years of discussion. It will somehow relieve the headache or stress of losing previous searches or options from some users. Because currently while the suite is still open it does it, it keep the state and history
Comment 18 Buovjaga 2023-10-12 06:56:35 UTC
This is too confusing for an easy hack, so removing relevant bits