Bug 132484 - Find and replace apply to the string it has already replaced
Summary: Find and replace apply to the string it has already replaced
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find-Search
  Show dependency treegraph
 
Reported: 2020-04-28 09:15 UTC by Roberto Zamparelli
Modified: 2024-11-19 00:11 UTC (History)
3 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 Roberto Zamparelli 2020-04-28 09:15:26 UTC
Description:
Open a sheet in CALC and type anything in a cell. Say you typed "A". Copy the same content to the cells below. Now open [Find and Replace] from menu [Edit]. Replace "A" with "BAC". Click [Replace]. "A" in the first cell is replaced with "BAC". Click [Replace] again, the "BAC" in the first cell is replaced with "BBACC". Keep clicking [Replace] and only material the first cell will be replaced. The replacements in the following cell will never take place. 

This is not a behavior found in any other [F&R] function I know, which normally move the search focus past the string just replaced. It is also not the behavior of [F&R] in Libreoffice Writer. 

Note that if one clicks [Replace all] "BAC" is correctly replaced in all cells.  

Steps to Reproduce:
1. Insert content "A" in 2 cells in a column.
2. Find and replace "A" with "BAC"
3. Click "Replace" twice

Actual Results:
BBACC
A

Expected Results:
BAC
BAC


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
See the description.
Comment 1 m_a_riosv 2020-04-28 10:11:21 UTC
Taking in what help https://help.libreoffice.org/7.0/en-US/text/shared/01/02100000.html?System=WIN&DbPAR=CALC&HID=svx/ui/findreplacedialog/dialog-action_area3#bm_@@nowidget@@ mention:
'Replace
Replaces the selected text or format that you searched for, and then searches for the next occurrence.'
Go to the next ocurrence doesn't happen.

Version: 7.0.0.0.alpha0+ (x64)
Build ID: 7459b9ecb54a298f02d19089620149718f8d8d48
CPU threads: 4; OS: Windows 10.0 Build 19608; UI render: Skia/Raster; VCL: win; 
Locale: es-ES (es_ES); UI-Language: en-US Calc: CL
Comment 2 Eike Rathke 2020-04-28 10:23:48 UTC
I slightly remember a UX discussion about this behaviour and why it now is as it is but no details, there should be some (fixed) bug around talking about that.
Comment 3 m_a_riosv 2020-04-28 17:26:16 UTC
Hi @Eike, after a research, up to https://bugs.documentfoundation.org/show_bug.cgi?id=106194, seems it works in the supposed way.
Comment 4 QA Administrators 2022-04-29 03:45:01 UTC Comment hidden (obsolete)
Comment 5 itagure 2023-06-05 18:13:29 UTC
The bug is still present in current Calc (see version below).

As described by OP, 
each time the "Replace" string contains the "Find" string,
the selection never moves to the next occurrence,
therefore only the first cell keeps on being updated.


Version: 7.5.3.2 (X86_64)
Build ID: 50(Build:2)
CPU threads: 12; OS: Linux 6.3; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 6 TBeholder 2024-11-19 00:11:54 UTC
More specifically, the first found occurrence within the first found cell.
If you use "AXA" in the original example, the result is "BBACCXA"
"Replace All" works correctly, however.

Version: 7.6.7.2 (X86_64) / LibreOffice Community
Build ID: 60(Build:2)