Issue 102626

Summary: Sorting on selection defaults to sorting on Right column
Product: Calc Reporter: ken_m <ken.maunder>
Component: uiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues, rainerbielefeld_ooo_qa
Version: OOO310m11Keywords: needhelp, needmoreinfo, oooqa
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on: 97093    
Issue Blocks:    
Attachments:
Description Flags
Sample of spreadsheet table for sorting
none
Screenshot of sort dialogue none

Description ken_m 2009-06-09 20:11:56 UTC
I am using version 3.1.0 spreadsheet and have found that use of the sort
function is inconsistent with previous versions.  I have followed the following
procedure:

1.Select an area of the speadsheet for sorting
2.From the menu, select Data / Sort to obtain the sort dialogue.

In previous versions the “Sort by” field defaulted to the left hand column of
the selected area.  In version 3.1.0 the “Sort by” field defaults to the right
hand column.  This is irrespective of whether the “Range contains column labels”
box is checked.  However it is important to add that is this procedure is
repeated on the SAME area of the spreadsheet then the sort function will
"remember" the previous "sort by" column selected

While this is not a major problem it is a source of irritation if the function
is used frequently because I believe that most people use the left hand field
for the first level of sorting.

This is my first bug submission, so I hope I have not missed something obvious
such as a simple config change.  I would also like to attach a sample file but
can't find how to attach it!

Ken Maunder
Comment 1 ken_m 2009-06-09 20:15:24 UTC
Created attachment 62892 [details]
Sample of spreadsheet table for sorting
Comment 2 ken_m 2009-06-09 21:08:36 UTC
Created attachment 62893 [details]
Screenshot of sort dialogue
Comment 3 Rainer Bielefeld 2010-06-04 05:54:11 UTC
In earlier versions (I just checked "2.4.1  Multilingual version English UI WIN
XP: [680m17(Build9310)]") the first column was the default sort criteria, for
"Ooo-Dev 3.3 multilingual version English UI WIN XP: [DEV300m80 (Build 9507)]"
(and other, earlier 3. versions) I can confirm the complained behaviour.

I do not know in what version the behaviour changed and whether the change has
been intended.

To me it seems inconsistent that for WRITER tables the first column contains the
default sort criteria / sort key

I will set this issue to NEW because current behaviour is not really consistent
 with the one escribed in specification 
<http://www.openoffice.org/nonav/issues/showattachment.cgi/62155/test_list_detail.php.htm>
(Heading "Testcases", but I do not know whether that spec. shows the latest
"state of the art"):

Proced as written in spec using 3.3 (create a simple test document containing
data as listed), and you will see that the LEFT column will contain the sort
critera.
Undo, select all data and use menu 'Data ->Sort', now you will see in card
"Criteria" that by default RIGHT column will contain sort key. That's inconsistent.
Comment 4 Rainer Bielefeld 2010-06-04 05:55:22 UTC
*** Issue 112101 has been marked as a duplicate of this issue. ***
Comment 5 Joe Smith 2010-06-04 15:33:09 UTC
I believe this is a result of the problem covered by Issue 97093. If that
problem were addressed, this one would also go away.

As I understand it, when you first select a range, then sort, Calc uses the
column of the current cell as the sort key. Since a typical selection is made
from left to right, the current cell ends up in the right column of the selected
range.

If you make the selection from right to left, then the current cell will be in
the first/left column.

Setting a database range will capture the sorting parameters and avoid having
Calc try to guess what you want.
Comment 6 Rainer Bielefeld 2010-06-04 16:11:04 UTC
@jes:
Yes, I believe you hit it. At least this issue depends on 97093
Comment 7 ken_m 2010-06-05 11:22:29 UTC
Yes, you have solved the problem for me. Thank you for your efforts.
Ken Maunder