Bug 87525 - Remove the option 'Current selection only' in Find and Replace
Summary: Remove the option 'Current selection only' in Find and Replace
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.6.3 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find-Search
  Show dependency treegraph
 
Reported: 2014-12-20 11:07 UTC by Michael Bauer
Modified: 2018-02-28 08:20 UTC (History)
5 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 Michael Bauer 2014-12-20 11:07:51 UTC
Steps to reproduce:
1) open spreadsheet which several columns of data (mine has a header row but I don't think that impacts this bug).
2) open the find&replace window
3) in the sheet, add a new column (e.g. C) in between columns with CTRL+
4) select column to the left (B), copy and paste into column on the right
5) select column B and in the find&replace window, select some date to replace

Outcome: Calc will find and replace data in column B AND C even though only column B is selected for find&replace.

This behaviour seems not to occur if the find&replace window is not open during the copypaste.
Comment 1 raal 2014-12-21 07:41:44 UTC
Do you have checked "Other options - Current selection only" on Find&replace dialog?

Probably when Find&replace dialog is starting then dialog check if more than one cell is selected. If yes, dialog tick the option "Current selection" only.

I can reproduce with Version: 4.5.0.0.alpha0+
Build ID: 2116f1cfb31e5fcf829c2f101cd878a32b56c365
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-12-19_05:59:03

I think it's not a bug, you can tick the option "Current selection" by yourself.
Comment 2 Michael Bauer 2014-12-21 11:22:17 UTC
Ah... thank you. I think I will keep this open as a bug though because this is pretty idiotic I must say, as a 'feature'. If the user has (and that's the behaviour most users will exhibit) selected a particular data range, than this should automatically active the 'current selection only' feature.

In my case, this may have cost me 2 days work because I did NOT realise that the adjacent column aside, this may have affected data across the large spreadsheet I was working in. Now I have to backtrack to make sure LO did not mess up my data.
Comment 3 Michael Bauer 2014-12-21 11:33:17 UTC
Ah and I discovered something else. When the Find&Replace window is not open and I select a data range, then I open it, then the Selected Range Only is selected. So the problem is 'ticking that box' when the window is already open. So I think it actually is a bug.
Comment 4 raal 2014-12-21 12:32:35 UTC
(In reply to Michael Bauer from comment #3)
> Ah and I discovered something else. When the Find&Replace window is not open
> and I select a data range, then I open it, then the Selected Range Only is
> selected. So the problem is 'ticking that box' when the window is already
> open. So I think it actually is a bug.

Yes, looks like dialog check selected cells during starting. How LO should solve this situation?

 - user select more cells
 - open Find&Replace window
 - untick "Current selection" for some reason
 - run Find&Replace  --> (more cells are selected)

You propose find&replace "If the user has (and that's the behaviour most users will exhibit) selected a particular data range, than this should automatically active the 'current selection only' feature.", but user untick "Current selection".
Comment 5 Michael Bauer 2014-12-21 19:28:39 UTC
I'm not sure I understood what you meant but what I'm saying is this:

When the user manually selects a data range, this should be the default range for searching or search & replace, irrespective of what window was open before or during the selection of the data range. The search and search&replace should only cover the entire document if the user manually deselects 'Selected range' in the options.

It is simply illogical to assume that a user manually selects a data range and then wants, be default, to ignore that selection and search/search/replace the entire sheet. Why would a user bother to select a data range for that?
Comment 6 Buovjaga 2015-01-13 16:23:11 UTC
(In reply to Michael Bauer from comment #5)
> It is simply illogical to assume that a user manually selects a data range
> and then wants, be default, to ignore that selection and
> search/search/replace the entire sheet. Why would a user bother to select a
> data range for that?

Changed severity to enhancement, but this needs to be debated. Some users might get annoyed, if this sniffing of selection was implemented.
Comment 7 Robinson Tryon (qubit) 2015-01-17 01:04:45 UTC
(In reply to Beluga from comment #6)
> Changed severity to enhancement, but this needs to be debated. Some users
> might get annoyed, if this sniffing of selection was implemented.

Sounds like one for the UX to contemplate...

(In reply to raal from comment #4)
> You propose find&replace "If the user has (and that's the behaviour most
> users will exhibit) selected a particular data range, than this should
> automatically active the 'current selection only' feature.", but user untick
> "Current selection".

Is that what's being proposed here? Let's get our ducks in a row first, and then this can go over to the UX Team for clarification.

Status -> NEEDINFO

(Michael: Once you've added a clear proposal for what to change re: Find & Replace, then change status back to UNCONFIRMED, please. Thanks!)
Comment 8 Michael Bauer 2015-01-17 11:25:55 UTC
It's hardly UNCONFIRMED any longer, no? See comment #1?

Anyway, I thought I was pretty clear in comment #5 but I'll try and be clearer.

Current behaviour:
If "Find & Replace" window is open and the user selects a data range and then runs find & replace, the selected data range is ignored because the "Current selection" box remains unticked.

This is illogical (and referring to comment #6 in fact is annoying users as it is). I have yet to hear someone suggest a situation in which a user is doing Find & Replace, selects a data range manually but still wants to run Find & Replace on the whole data range. 

Proposed behaviour: When the user manually selects a data range, this should be the default range for "Search" or "Search & Replace", irrespective of what window was open before or during the selection of the data range. "Search" and "search  & Replace" should only cover the entire document if the user manually deselects "Selected range" in the options.

This is, by the way, also the default behaviour in Excel.
Comment 9 Buovjaga 2015-01-17 12:35:42 UTC
(In reply to Michael Bauer from comment #8)
> This is, by the way, also the default behaviour in Excel.

Excel 2013 doesn't have a tickbox to alternate between current selection. Always defaults to selection, if present.

Changing this to ux-advise.

Comment from Matthew Francis:
"I would e.g. select something to copy and paste *into the dialog*, then get confused/annoyed by the lack of result"

This is not a far-fetched scenario, as the Current selection tickbox is hidden by default.
Comment 10 Robinson Tryon (qubit) 2015-01-17 12:42:02 UTC
(In reply to Beluga from comment #9)
> (In reply to Michael Bauer from comment #8)
> > This is, by the way, also the default behaviour in Excel.
> 
> Excel 2013 doesn't have a tickbox to alternate between current selection.
> Always defaults to selection, if present.
> 
> Changing this to ux-advise.

Fair enough:
Status -> NEW
Comment 11 Michael Bauer 2015-01-17 13:27:45 UTC
A lack of results is a more preferable 'error' in my view because no data is lost or affected until the correct settings are chosen. When I discovered this 'behaviour' by accident, I had already lost 2 days work because the default behaviour 'silently' affects the whole sheet. This of course includes the selected range but unless you *happen* to have to rows or columns side by side, only one of which should be affected, then you potentially, as I did, mess up a whole swathe of data without ever noticing it until it's way too late.

True, Excel has no such tickbox but it is the default behaviour. Thank you for clarifying.
Comment 12 Heiko Tietze 2015-01-18 10:04:22 UTC
The issue comes from the fact that the Find & Replace dialog is not modal. Is there any reason for?
Comment 13 Robinson Tryon (qubit) 2016-08-25 04:21:39 UTC Comment hidden (obsolete)
Comment 14 Heiko Tietze 2017-11-14 14:01:42 UTC
Solution 1: Make the dialog modal (not the best option).
Solution 2: Check 'current selection only' by default regardless anything has been selected before (you wont be able to change all occurrences unless you expand other options and untick the checkbox)
Solution 3: Keep the current behavior (modifications to the selection while the dialog is open are not taken into account; that's also true when you start with a selection but unselect later)
Solution 4: Drop the option and apply the function to the selection; if nothing is selected use the whole sheet (that's the Excel way; feels quite natural and would be my recommendation.

=> Remove the option 'Current selection only' in Find and Replace and use always the selection or the full sheet if nothing is selected

Summary was "Wrong replace behaviour with Find & Replace window open"
Comment 15 Thomas Lendo 2018-02-27 22:42:38 UTC
(In reply to Heiko Tietze from comment #14)
> Solution 2: Check 'current selection only' by default regardless anything
> has been selected before (you wont be able to change all occurrences unless
> you expand other options and untick the checkbox)
> Solution 3: Keep the current behavior (modifications to the selection while
> the dialog is open are not taken into account; that's also true when you
> start with a selection but unselect later)
I vote for: improve the current behavior. Now if you select a cell range and open the F&R dialog, the 'current selection only' option is activated automatically. If you deselect the cell range, then the option will be deactivated automatically. The problem is that the other way round (nothing selected, F&R opened, then cell range selected) doesn't work automatically. Also a subsequent selection of a cell range doesn't activate the 'current selection only' option again. This must be enhanced.

> Solution 4: Drop the option and apply the function to the selection; if
> nothing is selected use the whole sheet (that's the Excel way; feels quite
> natural and would be my recommendation.
> 
> => Remove the option 'Current selection only' in Find and Replace and use
> always the selection or the full sheet if nothing is selected
I'm against removing the option because it doesn't harm in the use case what was the reason for this bug report. LibreOffice boasts of its flexibility and configurability. Removing this option would counteract that principles.
Comment 16 Heiko Tietze 2018-02-28 08:20:52 UTC Comment hidden (off-topic)