Bug 119200 - No longer possible to use regular expressions in Find toolbar
Summary: No longer possible to use regular expressions in Find toolbar
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) rc
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: bisected, regression
Depends on:
Blocks: Find-Toolbar
  Show dependency treegraph
Reported: 2018-08-10 15:08 UTC by Mike Kaganski
Modified: 2022-01-17 03:37 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:


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 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
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.
Comment 7 V Stuart Foote 2020-01-04 16:43:04 UTC
Looking at bug 129781, and bug 129783 followed bread crumbs back to this gem.

@Mike, as for bug 102506 and possibly 129781 would an expert configuration to optionally restore ICU regex for use on the Find toolbar be a possible solution? Like you and Eike, I'd find it useful to have regex on the Find bar--but not by default. And, would it be per module, or global?
Comment 8 QA Administrators 2022-01-17 03:37:35 UTC
Dear Mike Kaganski,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team