Bug 83126 - Find All: Ignores Search Direction Rows option
Summary: Find All: Ignores Search Direction Rows option
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.0.beta1
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: target:5.1.0 target:5.0.5
Keywords:
Depends on:
Blocks: Find-Search
  Show dependency treegraph
 
Reported: 2014-08-27 06:02 UTC by moshepack
Modified: 2017-11-14 15:03 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Test case for FindAll by Row bug (17.97 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-08-27 11:23 UTC, moshepack
Details

Note You need to log in before you can comment on or make changes to this bug.
Description moshepack 2014-08-27 06:02:23 UTC
Search direction Rows searches by column and not by row. Didn't see any difference in results. I am searching by value.
Comment 1 ign_christian 2014-08-27 06:52:35 UTC
Hi.. It's written in LibreOffice offline help:

Search direction 
Determines the order for searching the cells. 

If you have another questions please start from here:  http://ask.libreoffice.org/en/help/
Comment 2 ign_christian 2014-08-27 06:56:50 UTC
Btw if you talked about "Find All" indeed something strange with that. 

Please provide test case and steps to reproduce your problem. Then change status back to UNCONFIRMED
Comment 3 moshepack 2014-08-27 11:23:44 UTC
Created attachment 105329 [details]
Test case for FindAll by Row bug

Do find All, searching for Wilson.

Search results (whether by Rows or Columns) will show
$A$2 
$A$6
$D$2
$D$6

When searching for rows the search results should have been presented in this order:
$A$2 
$D$2
$A$6
$D$6
Comment 4 ign_christian 2014-08-27 13:01:02 UTC
Hi again.. Thanks for the test case & explanation. 

Confim that Search direction with "Rows" or "Columns" doesn't make any difference in result ordering.

Reproducible under Ubuntu 12.04 x86 with: LO 4.3.1.1, 4.2.6.2, 4.2.0.0.beta1
Comment 5 Julien Nabet 2014-08-27 20:03:47 UTC
Just for my information, where's the option search by "Row" or "Column"?
(didn't find it on UI and on Google, certainly missed something)
Comment 6 ign_christian 2014-08-28 02:38:02 UTC
Hi Julien, sorry for not making this report clear enough after confirming.

Steps to confirm the issue:
1. Open attach file
2. Find and replace (ctrl+H)
3. Search for: Wilson
4. Click 'Other Options' in the bottom of dialog box
5. We can choose in 'Search direction' either Rows or Columns

Issue: ordering of search result (search direction either rows or columns) doesn't give any difference as explained in comment 3

Yes it's a minor bug or perhaps an enhancement (since feature of displaying find all result just introduced in 4.2), no dataloss.. :)
Comment 7 Julien Nabet 2014-08-28 05:38:53 UTC
Thank you Ign_christian for your feedback! :-)

I tested it with LO Debian package 4.2.6 + master sources updated yesterday, I don't reproduce this.
The option row or column has indeed an impact on the way LO search.
I'm a bit stuck right now :-(
Comment 8 ign_christian 2014-08-28 05:58:04 UTC
> I tested it with LO Debian package 4.2.6 + master sources updated yesterday,
> I don't reproduce this.
Could you explain what you can't reproduce Julien? Perhaps I could help testing
Comment 9 Julien Nabet 2014-08-28 06:21:08 UTC
the option Row/Column is indeed taken into account.
I used Ctrl-H to make the whole dialog appear, selected Value (but also tried with formula), tested Row then Column and had the expected resulted described by moshepack's comment 3
Comment 10 moshepack 2014-08-28 06:36:34 UTC
(In reply to comment #9)
Find works ok, but Find All does not.

> the option Row/Column is indeed taken into account.
> I used Ctrl-H to make the whole dialog appear, selected Value (but also
> tried with formula), tested Row then Column and had the expected resulted
> described by moshepack's comment 3
Comment 11 ign_christian 2014-08-28 06:51:22 UTC
Moshepack was right. Hit "Find" button will correctly searching based on direction selected (rows/columns). 

This issue is only appear by hitting "Find All" button, the result list won't respect to rows/columns direction.
Comment 12 ign_christian 2014-08-28 06:53:56 UTC
So sorry..step 6 should be exist in comment 6:

6. Hit "Find All" button
Comment 13 Julien Nabet 2014-08-28 08:07:54 UTC
Sorry, forgot to check "Find all" option, will give a try tonight.
Comment 14 Julien Nabet 2014-08-28 16:28:42 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.
Thank you for your patience! :-)
Comment 15 Julien Nabet 2014-08-28 21:52:42 UTC
The problem is in Search function here:
http://opengrok.libreoffice.org/xref/core/sc/source/core/data/table6.cxx#273
more precisely from big else block line 358

GetRowDirection matters only when Find All (bAll) isn't selected.
So the little else block manages Find/Column and any direction of Find All by using column direction.
Comment 16 Julien Nabet 2014-08-28 22:06:29 UTC
Kohei/Markus/Eike: Just thinking, what's the point to consider direction when selecting Find All? Also, searching backward won't display in reverse order the found cells but would it be relevant?
In brief, what about indicating in searchresults box of FindAll, Row/Column and backward checkboxes are not taken into account?
Comment 17 QA Administrators 2015-09-04 02:48:35 UTC Comment hidden (obsolete)
Comment 18 Buovjaga 2015-11-19 12:12:24 UTC
Still confirmed.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 66d2b72667792cb18b25805387824d636e2a455c
TinderBox: Win-x86@39, Branch:master, Time: 2015-11-18_02:35:53
Locale: fi-FI (fi_FI)
Comment 19 Julien Nabet 2015-11-19 23:16:52 UTC
I submitted https://gerrit.libreoffice.org/#/c/20067/ for review (master branch)
Comment 20 Commit Notification 2015-11-21 14:35:22 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

tdf#83126: Find All: Don't ignore Search Direction Rows/Col option

It will be available in 5.1.0.

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 21 Julien Nabet 2015-11-21 14:36:48 UTC
In review for 5.0 branch, see https://gerrit.libreoffice.org/#/c/20105/
Comment 22 Eike Rathke 2015-12-04 12:35:08 UTC
(In reply to Julien Nabet from comment #16)
> Kohei/Markus/Eike: Just thinking, what's the point to consider direction
> when selecting Find All? Also, searching backward won't display in reverse
> order the found cells but would it be relevant?

The original reason probably was that searching by columns instead of by rows and searching forward is faster, and when searching for All it actually doesn't matter in which order you search unless the results are to be displayed in found order. Displaying a result list was implemented only recently.
Comment 23 Commit Notification 2015-12-04 12:50:21 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=eea70492fb19b2dbd6edc0c37a2b0ed81b3ead5c&h=libreoffice-5-0

tdf#83126: Find All: Don't ignore Search Direction Rows/Col option

It will be available in 5.0.5.

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 24 moshepack 2016-02-18 09:10:29 UTC
Tested on LibreOffice 5.1.0.3
Fixed.