Bug 139886 - CALC: Add option to retain selection when using "Replace All" in "Current selection only"
Summary: CALC: Add option to retain selection when using "Replace All" in "Current sel...
Status: RESOLVED DUPLICATE of bug 132031
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find-Search
  Show dependency treegraph
 
Reported: 2021-01-24 13:36 UTC by Ian S.
Modified: 2023-11-29 01:30 UTC (History)
4 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 Ian S. 2021-01-24 13:36:20 UTC
Given a table with the following content starting from cell A1 down to A6:

A
A
B
C
A
B

Select area A1 to A5 (!!! don't select A6 !!!).

-> Edit -> Find and Replace...

-> Find: A
-> Replace: X
-> [x] Current selection only
-> "Replace All"

The values in the cells A1, A2, A5 changed to "X".

Optionally one gets now a "Search Results" dialog that shows the cells hit by the replace: $A$1, $A$2, $A$5

Note: The selection in the table has changed to only these cells, too!

Close the "Search Results" dialog (not the "Find & Replace" dialog!)

Note: Sometimes now the mark in "[ ] Current selection only" has gone! But I cannot reproduce under which circumstances.

From now on there are two options:

Option 1:
---------
-> Find: B
-> Replace: Y
-> [x] Current selection only (!!!)
-> "Replace All"

leads to the message "Search key not found" above the "Replace" input field even though cell A3 should be found regarding to my initial selection (which I didn't change so far).

Option 2:
---------
-> Find: B
-> Replace: Y
-> [ ] Current selection only (!!!)
-> "Replace All"

would change the value in cell A3 -- but in cell A6, too, even though cell A6 doesn't belong to my initial selection (which I didn't change so far).

The "Search Results" dialog shows the cells hit by the replace: $A$3, $A$6.

Note: The selection in the table has changed to only these cells again!


There are two reasons to report this behaviour:

1) Maybe users are not aware of the change of selection at all -- maybe they lose track of it since the selected area is quite large. If they just change the values in the "Find & Replace" dialog and proceed without re-establishing the selection they will probably get a non-intended result.

2) The need to re-establish the selection means to leave the "Find & Replace" dialog which is even uncomfortable whatever the selection is sized and gets more uncomfortable if the selection is huge.


Best regards
Ian S.
Comment 1 m_a_riosv 2021-01-26 00:16:12 UTC
I think it is the intended behavior.

This way the finding or replacing cells can be use as selected for new actions, like e.g. give them a new format or do a new replacement only on those, what should be near to impossible without this behavior.

As much could be a request for enhancement, with a new option to retain the selection.
Comment 2 Ian S. 2021-01-26 07:54:44 UTC
OK, that's a point, indeed.

At least there should be an explicitly information about the change of selection in the "Search Results" dialog:

Imagine a huge selection larger than the screen, a "Find & Replace" which hits most of the selected cells so that the "Search Results" dialog's list of cells hit is elusive and the newly unselected cells are out of screen bounds...


IMHO there should not be another checkbox option in the "Find & Replace" dialog.
Instead I would prefer an option to proceed with the new or the original selection in the "Search Results" dialog if selection has changed.


Best regards
Ian
Comment 3 m_a_riosv 2023-11-29 01:30:58 UTC

*** This bug has been marked as a duplicate of bug 132031 ***