Bug 63317 - kspread sorts multiple columns incorrectly
Summary: kspread sorts multiple columns incorrectly
Status: RESOLVED FIXED
Alias: None
Product: calligrasheets
Classification: Applications
Component: general (show other bugs)
Version: 1.2.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Laurent Montel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-27 16:11 UTC by tim
Modified: 2003-11-18 20:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tim 2003-08-27 16:11:25 UTC
Version:           1.2.1 (using KDE KDE 3.1.2)
Installed from:    Gentoo Packages
Compiler:          gcc 3.2.2 
OS:          Linux

Steps to reproduce:
1) enter following numbers into a sheet:
(these are three columns)
 3 1 1
 1 1 2
 2 1 1
 1 0 2
 3 0 1
 2 0 2
 4 1 1
 3 2 2
 2 3 1
 1 4 2
 4 1 1
 4 3 2
 2 2 1
 3 1 2
 1 4 1
 1 3 2
 3 2 1

2) select all numbers
3) goto menu Data -> Sort...
4) chose "sort by column A, then by B, then by C" and execute
5) the result will be:
 1 0 2
 1 1 2
 1 4 2
 1 4 1
 1 3 2
 2 0 2
 2 3 1
 2 2 1
 2 1 1
 3 0 1
 3 2 2
 3 2 1
 3 1 2
 3 1 1
 4 1 1
 4 1 1
 4 3 2

As you can see, the first column is correctly sorted.  But then look at column B, and look at the rows that have a 1 in column A:  they are not sorted correctly: row 132 should be placed before row 142.

Also in the rows starting with 3 there are a number of sorting errors.  And almost all rows starting with 2 are incorrectly sorted.
Comment 1 Ariya Hidayat 2003-11-18 20:43:08 UTC
Subject: koffice/kspread

CVS commit by ariya: 

fix data sorting

CCMAIL: 63317-done@bugs.kde.org


  M +21 -21    kspread_sheet.cc   1.522