Issue 55363 - Editing numbers in tables leads to wrong sorting and saving
Summary: Editing numbers in tables leads to wrong sorting and saving
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: OOO 2.0 Beta2
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Keywords: oooqa
Depends on:
Reported: 2005-10-02 22:37 UTC by ckruk
Modified: 2013-08-07 14:44 UTC (History)
2 users (show)

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

invalid numbers sorting in the table (.odt and .sxw files) (30.46 KB, application/octet-stream)
2005-10-02 22:40 UTC, ckruk
no flags Details
Screenshot of step 6 (32.12 KB, image/gif)
2006-12-04 07:16 UTC, kpalagin
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description ckruk 2005-10-02 22:37:19 UTC
I found that bug in 2.0 and 1.1.5 running on Linux. I suppose it concerns
all Writers but I can't test Windows or Mac OS versions. 

Detailed description of that bug is in attached file. In short: if you change
some numeric data in the table and try to sort it you obtain invalid order, and
if you save it you obtain invalid set of data. 

If you want to sort edited data in the table convert table to text and text back
to table. At the moment this is the only method to avoid that bug.
Comment 1 ckruk 2005-10-02 22:40:27 UTC
Created attachment 30070 [details]
invalid numbers sorting in the table (.odt and .sxw files)
Comment 2 ckruk 2005-10-02 23:20:22 UTC
I misinterpreted P1--P5 ranks. In my opinion that issue should has priority
higher than standard not lower (P2 not P4). When you save edited numeric values
in the table you loss your data. 
Comment 3 michael.ruess 2005-10-06 09:45:21 UTC
Reassigned to SBA.
Comment 4 metcalf 2005-12-17 03:52:34 UTC
I am not able to confirm this problem using OOo2.0 on Linux fedora 4.  I
followed all the very nice directions in the attached file and the result was a
correct sorting of all the entries.  The only thing I could think of is that you
need to make sure that the Key 1 and the Key 2 boxes are both checked when
running the sort.  You probably did this already, but if the Key 2 box is not
checked, then the second column will not be used in the sort.   Or perhaps this
has been fixed?  Can yo utry again with the latest version and verify that it
now works?
Comment 5 ckruk 2006-01-12 19:45:56 UTC
The error persists in Writer 2.0.1. I tested the package in Slackware and
Window Maker. I will see the version for Windows. 
Comment 6 ckruk 2006-01-12 23:27:33 UTC
I tested it in Windows using 2.0.1. The effect is the same as described


1. After installing in Windows I changed some options: 

- View | Zoom | Optimal (switched on)
- Tools | Options | Writer | Table | Number recognition 
(switched on)
- Tools | Options | Writer/Web | Table | Number recognition
(switched on)
- Tools | AutoCorrect | Options (all [M] and [T] switched off)
- Tools | AutoCorrect | Custom Quotes | Single quotes | Replace | Start quote
(changed to Polish standard)
- Tools | AutoCorrect | Custom Quotes | Double quotes | Replace | Start quote
(changed to Polish standard)
- Tools | AutoCorrect | Word Completion | Enable word completion (switched off)
- Tools | AutoCorrect | Word Completion | Collect words (switched off)

2. I inserted the table using toolbar (two columns, five rows). 

3. I filled it up like this:


4. I sorted it using:
- Ctrl+A, Ctrl+A
- Tools | Sort
- Key 1 (on); Column (2); Key type (Numeric); Order (Descending)

5. Everything was all right. Then I changed number 7 in column b (right) to 5
and sorted the table using: 

- Key 1 (on); Column (2); Key type (Numeric); Order (Ascending)

The result was incorrect: 


6. Next I sorted it using:

- Key 1 (on); Column (2); Key type (Numeric); Order (Descending)

The result was incorrect: 


After reboot I tested it once again in Linux (Slackware, Window Maker). The
effect was the same. 

It looks like Writer remembers relations ``greater than'' and ``lower
then'' between numbers in the table and ignores following changes of the data in
the table, sorting them using previous order. 
Comment 7 ckruk 2006-01-13 17:24:58 UTC
On the website:

you will find the movie:

illustrating that problem. 

The file is huge: 133 MB. Let me know when you will take it or let me know if
you do not want to take it at all. 
Comment 8 kpalagin 2006-12-03 16:58:31 UTC
could you please repost your video at (you will need to 
split it into 50MB parts)?
Comment 9 ckruk 2006-12-03 23:40:34 UTC
I can't send that video, because I deleted it during reinstallation of my
operating system. I can't record a new one at the moment, because my camera is
in the service. 

I've just tested 2.0.4 using simplified procedures I described here in my
comment from Thu Jan 12 15:27:33. The bug persists. (It persists also when I try
to more complicated procedures described in the attachment from Sun Oct 2
Comment 10 kpalagin 2006-12-04 07:14:25 UTC
Confirming with OO 2.1 (680m3, build 9090) on WinXP - steps in message 
from "Thu Jan 12 15:27:33 -0800 2006 " do produce incorrectly sorted list. I 
am attaching screenshot (result after step 6).
Increasing priority to P3, setting OS to "All".
Comment 11 kpalagin 2006-12-04 07:16:04 UTC
Created attachment 41100 [details]
Screenshot of step 6
Comment 12 stefan.baltzer 2007-01-12 17:14:23 UTC
SBA: I managed to reproduce this in OOo 2.1 and Dev Build SRC680m197. I stripped
down the description to the minimum of required steps:

 - Tools | Options | Writer | Table | Number recognition (->
switched on)
 - New Writer document
 - insert table (using toolbar, two columns, five rows). 
 - fill 2x5 table like this: 
    a | b
    1 | 5
    2 | 6
    3 | 7
    4 | 8
 - Select table (<Ctrl A> <Ctrl A>)
 - Tools | Sort
 - Key 1 (on); Column (2); Key type (Numeric); Order (Descending), OK
 [-> Table is sorted correctly, second column is 8-7-6-5-b top-down]
 - change number 7 to 5 (leave the cursor there!)
 - Select table (with <Ctrl A> <Ctrl A>!)
 - Tools | Sort
 - Key 1 (on); Column (2); Key type (Numeric); Order (Ascending)
-> Sorting is wrong (second column is b-5-6-5-8, so the 5 is treated like 7 it
should have replaced).
 - File | Save...
 - File | Reload
-> The 7 is back again, replacing the 5

SBA->AMA: It looks like the changing of a number WITHOUT leaving the cell, using
<Ctrl-a> <Ctrl-a> to select is the critical step. When clicking into another
cell before sorting (i.e. drag the selection with the mouse) it works fine.
Comment 13 Martin Hollmichel 2007-09-10 13:53:09 UTC
move to 3.x accroding