Bug 112275 - Find & Replace all for cell styles in empty cells shows an empty results window
Summary: Find & Replace all for cell styles in empty cells shows an empty results window
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: implementationError
Depends on:
Blocks: Find&Replace-Styles
  Show dependency treegraph
 
Reported: 2017-09-07 14:14 UTC by Emil Tanev
Modified: 2024-07-25 14:48 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Results window (104.15 KB, image/png)
2017-09-07 14:14 UTC, Emil Tanev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emil Tanev 2017-09-07 14:14:26 UTC
Created attachment 136093 [details]
Results window

Open a new sheet
Open Find/Replace
Check "Cell Styles"
Click Replace all
https://www.screencast.com/t/7GNeoWaj7Xi

Issue: A results window is displayed. 
1. It is empty 
2. Its title is Search Results (while the operation was Find/Replace)
Comment 1 Thomas Lendo 2017-09-09 23:54:02 UTC
The Search result window is empty till there is a content in a cell. For me this is a bug because when you search for cell styles you don't search for content.

It's the same window for Find all and Replace all - this is a minor bug or a maybe wanted by the developer.
Comment 2 Buovjaga 2017-09-11 05:41:53 UTC
Reproduced.

I think we should ignore the Search Results title for now. Somewhat related are bug 104849 and bug 104871.

The results window was apparently added in 4.2.

Win 10
Version: 4.3.0.0.beta1
Build ID: b7cfa1eab1cb1e94f71d6df6612b73f231d0bf92
Comment 3 QA Administrators 2018-09-12 02:38:56 UTC Comment hidden (obsolete)
Comment 4 Stéphane Guillou (stragu) 2020-01-07 06:58:42 UTC
I can reproduce 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

To me, seeing a "search results" window makes sense, because searching is one part of the whole "Replace All" process: you first need to search and find matches, then replace them.

The issue is that the window show 0 results, and the style has *not* been replaced in the sheet. All the cells still have the "Default" style.

You can also try it with one cell (with no cell selection):

1. Assign the "Accent 1" style to a cell
2. Open Find & Replace
3. Tick "Cell Styles"
4. Find "Accent 1" and replace it with "Bad", for example

Nothing happens. But with all my testing, I get seemingly inconsistent results:

* Sometimes, there are no results but the cell selection has moved to the relevant cells that have the searched style. So they are actually found and given focus, but they are not listed as matches in the search results??
* Sometimes, selecting an area and searching in "Current selection only" gives the expected result: style applied to the matches.
* Sometimes, selecting an area and using Replace All will replace for the whole selection, not the expected matches only.
* Usually, I get 0 results in the "Search results" window, but in some cases, I get one single match (even though there were more cells than that, and Replace All replaced the whole of the selection anyway...).

Looks like there's quite a bit to fix with that!

The behaviour is no different in:

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
Comment 5 Stéphane Guillou (stragu) 2020-01-07 07:44:20 UTC
I noticed that the Search Results window will only list the matched cells that contain text.

I decided to test all different cases for a search and replace of styles, and listed the results in this attachment to bug 112321 : http://bugs.documentfoundation.org/attachment.cgi?id=156978
Comment 6 Stéphane Guillou (stragu) 2021-12-10 21:55:58 UTC
Reproduced with:

Version: 7.3.0.0.beta1 / LibreOffice Community
Build ID: 436f14c25ec1847646b953cf13d0db4f7ca3be57
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Changed meta to a more precise one.
Comment 7 QA Administrators 2023-12-11 03:14:33 UTC Comment hidden (obsolete)
Comment 8 Cor Nouws 2024-07-25 14:48:45 UTC
still present 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