Bug 112321 - Find & Replace All for cell styles only works the second time
Summary: Find & Replace All for cell styles only works the second time
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: preBibisect, regression
Depends on:
Blocks: Find-Search
  Show dependency treegraph
 
Reported: 2017-09-11 05:42 UTC by Buovjaga
Modified: 2024-07-25 14:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Detailed results of all test cases (12.99 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-01-07 07:42 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Buovjaga 2017-09-11 05:42:46 UTC
1. Change the style of a cell (maybe modify the style beforehand to give it a background colour)
2. Find & replace - Other options - Cell styles
3. Hit Replace All twice

In 3.3 it works right away.

Win 10
3.5.0

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha0+
Build ID: 09122a537318f7ada075820f3b1ef83a64e56751
CPU threads: 8; OS: Linux 4.12; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on September 10th 2017

Arch Linux 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 1 raal 2017-09-27 19:13:25 UTC
repro , Version: 6.0.0.0.alpha0+
Build ID: a40d37b4d61f70a51a739732bcf7ad94c2ca4f0a
CPU threads: 4; OS: Windows 6.1; UI render: default;
Comment 2 QA Administrators 2018-09-28 02:42:58 UTC Comment hidden (obsolete)
Comment 3 raal 2018-10-09 11:51:14 UTC
Hi Buovjaga, please can you retest? I think it's correct now..Version: 6.2.0.0.alpha0+
Build ID: 75a48e37b260c145297261d0e0ab5720894404f1
CPU threads: 4; OS: Windows 6.1; UI render: default; 
Thanks
Comment 4 Buovjaga 2018-10-09 12:55:38 UTC
(In reply to raal from comment #3)
> Hi Buovjaga, please can you retest? I think it's correct now..Version:
> 6.2.0.0.alpha0+
> Build ID: 75a48e37b260c145297261d0e0ab5720894404f1
> CPU threads: 4; OS: Windows 6.1; UI render: default; 
> Thanks

Nope, still needs two rounds of replace all.

To recap the steps: I created a new style with a bg colour and then tried to replace it with Default style.

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: b7835c1d7465db6bea4cc80b6d0c2f71596938f1
CPU threads: 8; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: fi-FI (fi_FI.UTF-8); Calc: threaded
Built on 8 October 2018

Version: 6.2.0.0.alpha0+ (x64)
Build ID: d9ad59da50c1172fe98f94370221c9c1b688200a
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-10-09_01:03:44
Locale: fi-FI (fi_FI); Calc: threaded
Comment 5 QA Administrators 2019-10-10 02:39:21 UTC Comment hidden (obsolete)
Comment 6 Stéphane Guillou (stragu) 2020-01-07 07:18:55 UTC
Can reproduce in both:

Version: 6.4.0.1
Build ID: 1b6477b31f0334bd8620a96f0aeeb449b587be9f
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded

and

Version: 6.3.4.2
Build ID: 1:6.3.4-0ubuntu0.18.04.1~lo2
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded

What happens is that, when starting with no cell selection, the first "Replace all" creates a cell selection of the matches (i.e. highlights them in blue) even though the "Search Results" window lists no matches, and then the second "Replace all" finds the match in the selection and replaces the style (even if "Current selection only" is not ticked; still 0 results in "Search Results").

Interestingly, the searched style makes no difference! If you select an area and do a Replace All, the whole selection's style will be replaced, regardless of the searched style. On the other hand, if you do a Replace All with "Currently selection only" ticked and the style searched is not in there, you will have the expected "Search key not found".

So really, the title of the bug should be: "Search (and replace) of styles erratic"
Comment 7 Stéphane Guillou (stragu) 2020-01-07 07:42:21 UTC
Created attachment 156978 [details]
Detailed results of all test cases

OK I decided to detail exactly what happens in each case, and everything is listed in the attached spreadsheet. Hopefully this helps!

Tested with:

Version: 6.4.0.1
Build ID: 1b6477b31f0334bd8620a96f0aeeb449b587be9f
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded
Comment 8 Justin L 2021-12-03 06:34:46 UTC
The whole work-flow here is entirely different from a normal find/replace, so it is hard to know what the correct action should be.

repro 7.4+ I guess.
Comment 9 QA Administrators 2023-12-04 03:14:34 UTC Comment hidden (obsolete)
Comment 10 Cor Nouws 2024-07-25 14:47:56 UTC
still in Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d8c694b5d64b05da8c515e4ffe23c4bcc2376b0f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded