Bug 90558 - Find & Replace Within Selection
Summary: Find & Replace Within Selection
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: x86 (IA32) Windows (All)
: high normal
Assignee: Not Assigned
Depends on:
Blocks: Find-Search
  Show dependency treegraph
Reported: 2015-04-10 20:29 UTC by tholral
Modified: 2022-10-28 23:23 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description tholral 2015-04-10 20:29:56 UTC
(OS is Windows 7 Home 32-bit)

1. Create table with repetitious text
2. Select table
3. Open Find & Replace dialog, click Replace (i.e. only the first instance of that string)

The new string will be selected, overwriting the original selection and making further replacements within it impossible until the Within Selection box is unticked. Easily remedied but counter-intuitive, and had me stumped for a little while as I tried to figure out why I could only make one replacement.
Comment 1 raal 2015-04-13 18:52:26 UTC
Build ID: b024e36ddb3b53163d7a01f6f7b5aadb7a858cd9
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-03-31_09:12:20

When I click "Replace" one more time, then checkbox "Within Selection " is unticked and I can replace text.
Comment 2 Buovjaga 2015-04-17 17:18:58 UTC
Same result as raal. So the question is, should the checkbox be unticked immediately after the first "Replace"?

Win 7 Pro 64-bit, Version:
Build ID: c4c7d32d0d49397cad38d62472b0bc8acff48dd6
Locale: fi_FI
Comment 3 pierre-yves samyn 2015-05-23 16:17:46 UTC

(In reply to Beluga from comment #2)
> Same result as raal. 

+1 (windows 7/64 & Version: -

>So the question is, should the checkbox be unticked
>immediately after the first "Replace"?

In Calc the original selection is kept *and* the checkbox remains unchecked. But the difference is that the search result is indicated by the cell selection.

In Writer (for we must broaden the issue to a text selection, not just table cells) would require that the search result is highlighted differently in the selection.

Comment 4 Paul 2016-05-26 22:21:36 UTC
This bug does not need to be within a table. I'm on LO 5.1.2 and the original selection is lost as soon as a search is performed, whether it is a Find Once search or a Replace All search. Further manipulation becomes impossible without reselecting the original range again. This is a major weakness to the find/replace function.
Comment 5 Bob Smith 2016-09-08 14:25:25 UTC
There appear to be different usage cases of Find & Replace not all of which are accommodated by the current design.

The one I'd like to see made easier is when selecting an area in which several Find & Replaces are to be done.  In the current version (, after the first F&R, the original selection is deselected meaning that the user must re-select the text and then F&R the next text.  In that case, I would like the original text to remain selected and the "Current selection only" checkbox to remain checked so I can move back and forth between the "Search For" and "Replace With" edit boxes followed by the "Replace" or "Replace All" buttons.

Perhaps we need another checkbox under "Other options" for "Retain current selection" which is visible only if "Current selection only" is checked.
Comment 6 Heiko Tietze 2016-09-28 15:38:19 UTC
(In reply to Bob Smith from comment #5)
> Perhaps we need another checkbox under "Other options" for "Retain current
> selection" which is visible only if "Current selection only" is checked.

Please no more checkboxes for simple tasks. But the question is valid.
Comment 7 Heiko Tietze 2016-09-30 08:05:10 UTC
*** Bug 95117 has been marked as a duplicate of this bug. ***
Comment 8 Heiko Tietze 2018-05-27 09:05:03 UTC
Find & Replace must not change the current selection and should work within the defined boundaries, removing needsUX.
It's an annoying bug, affecting all users, and potentially dangerous. Setting importance to high.
Comment 9 QA Administrators 2019-05-28 02:47:41 UTC Comment hidden (obsolete)
Comment 10 Safeer Pasha 2021-03-01 07:40:35 UTC
I just tested it and I think the bug is NO MORE in this version
replacing and finding works within a table.

Version: / LibreOffice Community
Build ID: 10(Build:3)
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: kf5
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 11 pierre-yves samyn 2021-03-01 09:28:24 UTC

Still reproduced on Windows & Version: (x64) / LibreOffice Community
Build ID: 575c5867c4cc13d7ae78f9ce39a54a52ed38c769
CPU threads: 2; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: threaded

Comment 12 Rajasekaran Karunanithi 2022-10-28 23:23:42 UTC
Reproducable in LO under LXLE (x64) distro Focal release.Find and replace works only for current selection of text in a table.

Version: / LibreOffice Community
Build ID: 40(Build:3)
CPU threads: 1; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.4.2~rc3-0ubuntu0.20.04.1~lo1
Calc: threaded