Bug 51615 - EDITING: Replace button in Find & Replace Dialog does not search for the next occurrence
Summary: EDITING: Replace button in Find & Replace Dialog does not search for the next...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium minor
Assignee: Jorendc
URL:
Whiteboard: BSA ux-feedback target:4.1.0
Keywords: needsDevEval
: 42410 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-07-01 04:10 UTC by centmillediables2-libreoffice
Modified: 2015-12-18 10:16 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample Document (7.94 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-07-01 08:51 UTC, Rainer Bielefeld Retired
Details

Note You need to log in before you can comment on or make changes to this bug.
Description centmillediables2-libreoffice 2012-07-01 04:10:57 UTC
Problem description: 
In a search and replace session, I click on Search. It founds first match. Right. Then I click on Replace. It replaces well. But it doesn't lead automatically to next match. So I had to click on Search, Replace, Search, Replace, and so on, instead of clicking only on Replace.

Steps to reproduce:
1. ....
2. ....
3. ....

Current behavior:

Expected behavior:

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0.1
Comment 1 Jean-Baptiste Faure 2012-07-01 07:27:28 UTC
Yes it doesn't go automatically to the next match, but clicking "Replace" button does what you want : search next match, select the matching cell and replace the matching string.

I suggest to close this bug report as WorksForMe.

Best regards. JBF
Comment 2 Rainer Bielefeld Retired 2012-07-01 08:47:50 UTC
NOT  with "LibreOffice  3.5.5.2.  German UI/Locale [Build-ID: 24b32b4-b87ec2e-85c8e98-87a4e20-9a1b8c1] on German WIN7 Home Premium (64bit) for WRITER. 

Help tells for  <Replace> "Replaces the selected text or format that you searched for, and then searches for the next occurrence" so the observed behavior seems wrong.

In Calc we have to distinguish 
a) multiple hits in a sheet 
b) multiple hits in a cell

For 'b' all works as expected.
For 'a' behavior I observe is unexpected for me. Please try in my attached sample to replace "is" by "was":

0. Open Document, single click to A1 so that cell cursor marks A1
1. <control+h> for 'Find & Replace' (BTW: Help recommends <control+f>)
2. type "is" into 'Find' pane and "was" into 'Replace with' pant
3. <Find>
   >A2 will be selected
4. <Replace>
   As Expected: In A2 "is" will be replaced by "was"
   Unexpected(?): no jump next hit 
5. <Replace>
   Expected: ?
   Actual: Jumps to next hit and replaces

I think that that is not a good idea. This behavior is inherited from OOo.

At least HELP has to be completed for CALC, and IMHO the current behavior can be improved.

As a first step I will ask on ux-advise
Comment 3 Rainer Bielefeld Retired 2012-07-01 08:51:20 UTC
Created attachment 63668 [details]
Sample Document

See Comment 2
Comment 4 Cor Nouws 2012-07-01 14:43:28 UTC
The current behaviour in Calc indeed is ugly.
In Writer and Basic, Replace does search for the next occurence, unless the search is at the end.
So yes: I would vote for changing the behaviour in Calc
Comment 5 Stefan Knorr (astron) 2012-07-01 22:03:36 UTC
Not much of a Calc user, but common sense leads me to agree with all of you. So yes, clicking Replace should have two effects: replacing, then jumping with the selection to the next occurence there is.

(Btw: clicking Replace repeatedly does what's expected, it's just that the feedback is missing.)
Comment 6 czajkowski 2012-12-14 19:04:05 UTC
Hi I've just had a similar experience. I wrote a document, and went looking for a word, it couldn't find the word but I could see it and knew it was there. so the Find search is not working as I'd expect it to be .
Comment 7 Björn Michaelsen 2012-12-14 19:12:10 UTC
@Kohei, Markus, Eike: Could this be a EasyHack? (please un'CC yourself at will after having a look)
Comment 8 Markus Mohrhard 2012-12-15 06:08:29 UTC
Please don't change the component. This bug is about the behavior in Calc.

For a similar bug in Writer you should opne a new bug. Thanks.
Comment 9 Jorendc 2013-04-03 22:13:37 UTC
*** Bug 42410 has been marked as a duplicate of this bug. ***
Comment 10 Commit Notification 2013-04-10 13:31:16 UTC
Joren De Cuyper committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=65c45688caba3213ce161013f5f2b1f753f7eecf

fdo#51615 replace button in Find&Replace Dialog not search for the next item



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2013-04-10 16:13:50 UTC
Jan Holesovsky committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=dcce505ebe1471f81803b9b336710b368e08f2e9

fdo#51615: Further tweaks in the jumping to the next cell.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Jan Holesovsky 2013-04-10 16:18:15 UTC
Joren did great job here, unfortunately I had to do it even more complicated to be intuitive.  See the full commit message:

When the user hits Replace:
    
* in a cell that does not contain the string to replace, it jumps to the cell
  that contains it, replaces the string, and stays there

* in a cell that contains only one occurrence of the string to replace, it
  replaces it, and jumps to the next cell that contains such a string

* in a cell that contains multiple occurrences, it replaces it, but does not
  move the cursor (so that the further occurences in that cell can still be
  replaced)

I believe this works for all :-)
Comment 13 Robinson Tryon (qubit) 2015-12-18 10:16:55 UTC
Migrating Whiteboard tags to Keywords: (ProposedEasyHack -> needsDevEval)
[NinjaEdit]