Bug 119200 - No more possible to use regular expressions in Find toolbar
Summary: No more possible to use regular expressions in Find toolbar
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.4.2.1 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2018-08-10 15:08 UTC by Mike Kaganski
Modified: 2019-01-15 10:16 UTC (History)
4 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 Mike Kaganski 2018-08-10 15:08:09 UTC
1. Create a new spreadsheet
2. Type "aa" to several cells
3. Ctrl+H; enable regular expressions; check that ".." regex finds cells
4. Close the dialog (!) - no matter which way: either using title bar close control, or using Close button.
5. Ctrl+F, enter "..", try to find.

In 5.4.1 and previous, this worked. Starting from 5.4.2.1 and 6.0, this doesn't work.

This is a regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=97cd8e4d64632bb65445cb2f395b1385a0a2a13b for bug 111818.
Comment 1 Mike Kaganski 2018-08-10 15:31:52 UTC
https://gerrit.libreoffice.org/58845
Comment 2 Mike Kaganski 2018-08-11 12:54:29 UTC
Some background that I have discovered:

1. Initially (since OOo), Find toolbar followed the Use regular expressions persistent setting that Find&Replace dialog sets on its close.
2. Then, bug 62601 was filed, and fixed in commit df9e6ab514ca1c97c7eb69e169c958619c03d429 for version 4.2.
3. Then, somewhere in the 5.2 preparation cycle (possibly in commit 3a0abd3019ec3ca29b8f1378cdb32ebf741e6306), css::util::SearchAlgorithms2 constants started to be used, and the behaviour got reverted.
4. In commit 97cd8e4d64632bb65445cb2f395b1385a0a2a13b, the fix for bug 62601 was effectively restored.
5. In the proposed fix here, I'd restore the initial behaviour once again.

The problem here is that unless there's a way to explicitly set the option in the Find toolbar, overriding the stored setting makes it impossible to use regular expressions there. Restoring initial behaviour (when the option in Find&Replace dialog invisibly affects Find toolbar) is unexpected to some.

Making own controls on Find toolbar for each such setting is a natural fix, and it was implemented e.g. for Match Case; but then a problem arises about how to save the toolbar's settings. Currently, the search options are saved in a single place (and that looks reasonable); taking into account the possible implementation of Find sidebar (bug 95405), making individual settings for each possible find method would be confusing. Then it seems natural that all settings should be synchronized between the dialogs and toolbars; given that Find&Replace is modeless, it's unclear why its settings are only saved on its close.

So I see the proper fix here to have all the search UI to modify configuration immediately upon clicking a checkbox; and that change should reflect in real time in all other search UIs. E.g., clicking on Match Case checkbox on Find toolbar should immediately (un)check corresponding option on Find&Replace dialog (if it's open), and vice versa.

Asking UX advice.
Comment 3 Eike Rathke 2018-08-16 09:43:25 UTC
I think reusing hidden (inherited from and only settable in the Find&Replace dialog) settings in the Find toolbar again that was fixed for bug 62601 is bad UX. If there is no checkbox or other means to specify the algorithm then the user expects a literal search is used. (well, personally I'd expect always regexp to be used, but.. ;-)
Comment 4 Heiko Tietze 2018-08-21 08:43:24 UTC
needsUXEval needs CC libreoffice-ux-advise@lists.freedesktop.org
Comment 5 Heiko Tietze 2018-10-19 10:43:29 UTC
Removing UX from the assigned ticket. Please ask, Mike, if you need support.
Comment 6 Mike Kaganski 2019-01-15 10:16:07 UTC
Unassigning myself due to Eike's opinion.