Issue 7277 - sorting should default to selected column
Summary: sorting should default to selected column
Alias: None
Product: Calc
Classification: Application
Component: ui (show other issues)
Version: OOo 1.0.1
Hardware: All All
: P3 Trivial with 18 votes (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sc
Keywords: usability
: 22767 60429 78706 (view as issue list)
Depends on:
Blocks: 72764 15522
  Show dependency tree
Reported: 2002-08-27 14:28 UTC by fhimpe
Modified: 2013-08-07 15:14 UTC (History)
10 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---

The patch file is about i7277#-v1. (497 bytes, text/plain)
2008-09-19 04:32 UTC, yonggang.mao
no flags Details
The patch file is about i7277#-v2. (1.04 KB, text/plain)
2008-09-22 05:03 UTC, yonggang.mao
no flags Details
The patch file is about i7277#-v3. (3.06 KB, text/plain)
2008-09-24 16:17 UTC, yonggang.mao
no flags Details
The patch file is about i7277#-v4. (1.75 KB, text/plain)
2008-09-25 04:22 UTC, yonggang.mao
no flags Details
TestCaseSpecification (9.59 KB, text/html)
2008-12-10 20:27 UTC, oc
no flags Details
For the records: testcase for this issue (122.15 KB, application/pdf)
2008-12-28 17:36 UTC, Stefan Weigel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description fhimpe 2002-08-27 14:28:09 UTC
When using the "sort ascending" or "sort descending" toolbar buttons, the
sorting should happen based on the column where the selected cell is. This would
make it much handier to sort on another column than the one set in the sort dialog.
Comment 1 oc 2003-06-06 11:05:20 UTC
I can't get your point. Could you please give a more detailed
describtion of this problem.
Comment 2 andyp 2003-06-26 15:08:05 UTC
I have the same request.

Create a short table e.g.:
A   1   2   3
D   6   5   4
C   9   7   8
B   0   0   0

Leave the cursor in column B
Click quick-sort ascending
The table is sorted on column A

It doesn't matter where the cursor is in this table.  Using a
quick-sort always sorts on the first column of this table.  This makes
quick-sort a fairly limited tool.
Comment 3 oc 2003-06-26 16:05:56 UTC
Ok, now I understand, thank you for the clarification.
Comment 4 oc 2003-06-26 16:07:17 UTC
Hi Bettina,
Comment 5 frank 2003-11-24 09:35:15 UTC
*** Issue 22767 has been marked as a duplicate of this issue. ***
Comment 6 bettina.haberer 2003-12-04 16:53:37 UTC
Hello Niklas, I think we should consider this nice idea concerning
Please give approval for this evaluated OO.o 2.0 flagged issue. 
If you confirm with the target OO.o 2.0, then please keep it on your
owner (or the owner of the concerning developer) for implementation.
In case you want this issue for 'OOo Later', then please reset the
target milestone. If you decline the issue finally, please set the
resolution to 'Wontfix' (but do not close). In case of 'OOo Later' or
'Wontfix' please reset it on Bettina's owner. Thank you.
Comment 7 niklas.nebel 2004-01-26 11:39:19 UTC
This is not on the list of features that we're going to do for 2.0. We need to
focus on the enhancements from the PCD document.
Comment 8 alanucsd 2005-05-18 18:44:51 UTC
I really think this should go into 2.0. Without it quicksorting is pretty much
broken/useless. That makes the spreadsheet pretty broken too, at least for how I
use it.
Comment 9 alanucsd 2005-08-22 22:34:06 UTC
It's worth pointing out that OO does not currently behave the way EXCEL does for
sorting. The request described here would make OO follow Excel's interface. I
think this is a good thing in general, since there's no reason to be different
(and the current OO setup is vastly less usable). 

I really think this needs to go in ASAP. 
Comment 10 liviug 2005-09-14 08:23:38 UTC
I think this should definitely go into 2.0 as it is almost useles as it is now.
This is a frequently used feature in excel and may be a good reason for many
users to create a first bad impresion on OO2.0 as I did.
And anyway it shouldn't be so complicated to implement as using Data->Sort I am
able to sort on a specific column and this is the exact behaviour I expect from
"sort ascending", "sort descending" shortcuts.
Comment 11 frank 2006-02-16 12:33:59 UTC
*** Issue 60429 has been marked as a duplicate of this issue. ***
Comment 12 1251234125 2006-02-16 13:21:23 UTC
Bug still alive in 2,0,0 and 2,0,1
it is very anoying, to use the fat dialog just for a quick sorting...
Comment 13 1251234125 2006-02-16 13:23:03 UTC
Also, it always sorts the heading, which should stay in line 1. 
Comment 14 scirka 2006-02-16 16:37:53 UTC
Many of us who are trying to make the switch from MS Office to OpenOffice rely
on certain features. This is one feature that many MS Office users use, so it is
important to have the same behaviour: as has already been described - a single
click sort that sorts ascending or descending and doesn't sort the headers.
Comment 15 niederbayern 2006-03-11 10:21:19 UTC
Mandatory improvements to the sorting functions are:

(1) Calc must find out by itself, wether the first row is a header or is
containing data. Yes that´s possible, Excel does so. Excel recognizes different
data types between first row (text in every column) and the following rows (not
text at least in one column). If all cells of the list, header and data rows,
contain nothing but text, Excel recognizes different formatting in the first row.

(2) Sorting must base on the column, where the active cell is.

(3) Subsequent sorting of a list setting the active cell in different columns
should result in a hierarchically sorted list corresponding to the sequence of
columns, where the active cell was selected.

Comment 16 1251234125 2006-07-13 15:32:31 UTC
Bug still alive in 2,0,2 and 2,0,3

why is this bug only type enhancement? i think "defect" would be better.

for an quick improvement two things will be perfect:

- in the sorting-dialog the checkbox "range contains Headers" is saved
(anywhere) between two sort-actions. please use this setting for quick-sort /

- don't use for sorting with the buttons just the first column, use the column
with the selection in it.

i don't think, these two bugfixes does take more than two hours...... please!
Comment 17 pd5rm 2006-12-30 06:27:51 UTC
My assumption was that column sort behavior was similar to Excel. This caused me
 to misalign data (because sort was defaulting to first column). I had to go
back and fixup the data, losing about a hour going back to original paper source
to rekey the day. This is a painful bug!

I haven't looked at OO code, but this seems like it should be a simple fix and
the default behavior can cause significant data and time loss.
Comment 18 niederbayern 2007-02-08 11:31:30 UTC
One can overcome this issue by replacing the "sort ascending" or "sort
descending" toolbar buttons with a macro published here:

However, we are still longing for a fix for this issue.
Comment 19 frank 2007-06-20 22:21:29 UTC
*** Issue 78706 has been marked as a duplicate of this issue. ***
Comment 20 bettina.haberer 2007-09-26 15:56:56 UTC
Hi Niklas, these RFEs are in your ownership.
Comment 21 alanucsd 2007-09-26 20:03:30 UTC
This seems like such a simple thing to fix, and so obviously an improvement,
that I can't understand why nobody's attended to it. I can only guess that we
haven't gotten the attention of the right person? Any suggestions?  
Comment 22 tommy27 2008-08-28 19:01:27 UTC
this is a quite old issue.

probably it was forgotten trough the years
Comment 23 yonggang.mao 2008-09-17 09:23:24 UTC
Comment 24 yonggang.mao 2008-09-19 04:32:35 UTC
Created attachment 56626 [details]
The patch file is about i7277#-v1.
Comment 25 yonggang.mao 2008-09-19 07:22:58 UTC
Comment 26 niklas.nebel 2008-09-19 19:04:55 UTC
More important than the dialog are the toolbar buttons (SID_SORT_ASCENDING,
Comment 27 yonggang.mao 2008-09-22 05:03:52 UTC
Created attachment 56692 [details]
The patch file is about i7277#-v2.
Comment 28 yonggang.mao 2008-09-24 16:17:43 UTC
Created attachment 56812 [details]
The patch file is about i7277#-v3.
Comment 29 yonggang.mao 2008-09-24 16:22:31 UTC
Hi Niklas,this issue have fixed, thanks for your advice. :)
Comment 30 niklas.nebel 2008-09-24 17:37:25 UTC
I don't understand the IsBlockEmpty calls. If the range is empty, the position
is not limited to within the range? For what case is that needed?
Comment 31 yonggang.mao 2008-09-25 04:22:03 UTC
Created attachment 56825 [details]
The patch file is about i7277#-v4.
Comment 32 yonggang.mao 2008-09-25 04:51:53 UTC
Hello Niklas,possible I got the wrong for the problem.
Comment 33 niklas.nebel 2008-10-27 19:43:54 UTC
taking the issue
Comment 34 niklas.nebel 2008-10-27 19:44:49 UTC
I added the last patch to CWS "calc47".
Comment 35 niklas.nebel 2008-12-04 15:47:01 UTC
Reassigning to QA for verification
Comment 36 oc 2008-12-10 20:27:13 UTC
Created attachment 58695 [details]
Comment 37 oc 2008-12-10 20:28:15 UTC
verified in internal build cws_calc47
Comment 38 Stefan Weigel 2008-12-11 10:10:20 UTC
Proposal for an extended TestCaseSpecification:
Comment 39 Stefan Weigel 2008-12-28 17:35:52 UTC
verified in DEV300_m38.

Thanks, good job!
Comment 40 Stefan Weigel 2008-12-28 17:36:45 UTC
Created attachment 59039 [details]
For the records: testcase for this issue
Comment 41 Stefan Weigel 2008-12-28 17:37:39 UTC
verified, fixed --> closed.