Issue 20491 - Q-PCD MSInteroperability-31: stable sorting
Summary: Q-PCD MSInteroperability-31: stable sorting
Alias: None
Product: Calc
Classification: Application
Component: ui (show other issues)
Version: OOo 1.0.0
Hardware: All All
: P4 Trivial with 4 votes (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sc
: 22884 27925 52506 (view as issue list)
Depends on:
Blocks: 72764 15522
  Show dependency tree
Reported: 2003-09-30 17:27 UTC by niklas.nebel
Modified: 2013-08-07 15:14 UTC (History)
7 users (show)

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

The patch file is about i20491#-v1. (3.04 KB, text/plain)
2008-09-08 09:49 UTC, yonggang.mao
no flags Details
The patch file is about i20491#-v2. (2.29 KB, text/plain)
2008-09-10 11:42 UTC, yonggang.mao
no flags Details
The patch file is about i20491#-v3. (2.08 KB, text/plain)
2008-09-11 04:46 UTC, yonggang.mao
no flags Details
TestCaseSpecification (9.59 KB, text/html)
2008-12-10 20:20 UTC, oc
no flags Details
Testdocument for Test Case Specification (9.76 KB, application/vnd.oasis.opendocument.spreadsheet)
2008-12-10 20:21 UTC, oc
no flags Details
For the records: testcase for this issue (122.15 KB, application/pdf)
2008-12-28 18:07 UTC, Stefan Weigel
no flags Details
Testfile for testcase (14.62 KB, application/vnd.oasis.opendocument.spreadsheet)
2008-12-28 18:08 UTC, Stefan Weigel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description niklas.nebel 2003-09-30 17:27:26 UTC
Task tracking system for Childs



Product Requirement 
Sort grouped results as in other applications

Customer Need/Problem
Need ability to sort previously sorted data and maintain the initial sorting
rather than just the original data. See customer example sent to Dieter and Andreas.


Eng Effort

Eng Owner
Niklas Nebel

Product Concept
When a cell range is sorted by a set of sort keys in some other applications,
those rows that have equal values for all sort keys retain their position
relative to each other. In SO/OOo they end up in a random order. If the data had
some meaningful order before the sort operation, the other applications'
behavior is preferable. We will change the implementation of sorting so that the
original order is preserved where sorting criteria are equal.

Functional Specification
Comment 1 lutz.hoeger 2003-10-23 07:44:15 UTC
added keyword Q-PCD
Comment 2 frank 2004-04-19 10:25:31 UTC
*** Issue 27925 has been marked as a duplicate of this issue. ***
Comment 3 antonbijl 2004-04-19 17:40:23 UTC
Could someone with the necessary rights please add "sorting algorithm unstable" 
to the summary and/or keywords to avoid further duplicates?
Comment 4 benwillcox 2004-04-29 15:55:14 UTC
I can confirm this problem, and even worse, the sorting order changes each time
the document is reloaded into OpenOffice and an identical sorting operation
performed. It should at least be consistent, our user confidence level has gone
through the floor since discovering this issue.
Comment 5 Martin Hollmichel 2004-05-28 15:00:56 UTC
according to the announcement on releases
( this issue
will be re-targeted to OOo Later.
Comment 6 Regina Henschel 2005-07-26 22:57:09 UTC
*** Issue 52506 has been marked as a duplicate of this issue. ***
Comment 7 niederbayern 2007-02-08 11:34:16 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 8 pagalmes.lists 2007-02-08 12:24:21 UTC
Maybe adding the words sorting to the issue name, could make it clearer...
Comment 9 alan_silva 2007-10-10 18:32:42 UTC
Its duplicate with 27925 and 22884
Comment 10 phoenixfr 2007-12-10 22:41:35 UTC
I confirm there is still this "sort"-problem in version 2.3 !!
Comment 11 frank.loehmann 2007-12-11 08:28:02 UTC
Set target.
Comment 12 yonggang.mao 2008-08-27 17:23:57 UTC
Comment 13 yonggang.mao 2008-09-01 03:51:07 UTC
Comment 14 Stefan Weigel 2008-09-01 08:55:00 UTC
Plaese have a look at issue #7277 and issue #22758

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. (Issue #7277)

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

(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. (Issue #20491)
Comment 15 yonggang.mao 2008-09-08 09:49:14 UTC
Created attachment 56313 [details]
The patch file is about i20491#-v1.
Comment 16 yonggang.mao 2008-09-10 11:42:25 UTC
Created attachment 56378 [details]
The patch file is about i20491#-v2.
Comment 17 ooo 2008-09-10 12:52:14 UTC
@maoyg: A quick glance revealed that the sort on original position is done
already after any sort field. Please change to do that after all sort fields
have been processed and nRes==0
Comment 18 yonggang.mao 2008-09-11 04:46:58 UTC
Created attachment 56404 [details]
The patch file is about i20491#-v3.
Comment 19 niklas.nebel 2008-09-17 09:07:18 UTC
adjusting summary
Comment 20 niklas.nebel 2008-09-19 19:18:21 UTC
*** Issue 22884 has been marked as a duplicate of this issue. ***
Comment 21 niklas.nebel 2008-10-27 20:29:46 UTC
taking the issue
Comment 22 niklas.nebel 2008-10-27 20:31:05 UTC
I added the last patch to CWS "calc47".
Comment 23 niklas.nebel 2008-12-04 15:44:58 UTC
Reassigning to QA for verification
Comment 24 oc 2008-12-10 20:20:54 UTC
Created attachment 58692 [details]
Comment 25 oc 2008-12-10 20:21:53 UTC
Created attachment 58693 [details]
Testdocument for Test Case Specification
Comment 26 oc 2008-12-10 20:23:26 UTC
verified in internal build cws_calc47
Comment 27 Stefan Weigel 2008-12-11 10:57:23 UTC
Proposal for modified TestCaseSpecification in order to really proof "stable
Comment 28 Stefan Weigel 2008-12-28 18:07:38 UTC
Created attachment 59042 [details]
For the records: testcase for this issue
Comment 29 Stefan Weigel 2008-12-28 18:08:33 UTC
Created attachment 59043 [details]
Testfile for testcase
Comment 30 Stefan Weigel 2008-12-28 18:11:55 UTC
verified in DEV300_m38

I confirm stable sorting. Good job so far. Thank you!

However, test procedure fails due to another new regression filed as issue #97619.
Comment 31 Stefan Weigel 2008-12-28 18:13:20 UTC
verified, fixed --> closed.