https://bugs.freedesktop.org/show_bug.cgi?id=86216

            Bug ID: 86216
           Summary: Sort Can No Longer Sort
           Product: LibreOffice
           Version: 4.2.7.2 rc
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: critical
          Priority: medium
         Component: Spreadsheet
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 109362
  --> https://bugs.freedesktop.org/attachment.cgi?id=109362&action=edit
Very small spreadsheet that demonstrates BUG 2

Quite simply, for my spreadsheet, SORT on LibreOffice CALC (4.1 something) that
shipped with Ubuntu 12.04 worked, and version 4.2.7.2 does not.   I have tested
it again on my Ubuntu 12.04 machine and the same operations work properly.  I
have included an example spreadsheet with only 6 cells of data that
demonstrates BUG 2.

Potential for Work Arounds

It is not convenient to use only my 12.04 machine, it is at a different
geographical location.  It is not convenient to downgrade my 14.04 machine to
12.04, it is a touch screen laptop and 12.04 does not give me functionality. 
Attempts to just downgrade LibreOffice have not been readily successful.   

Background: Size of my Spreadsheet

My spreadsheet is very large (12 tabs, 2500+ rows in one tab, columns up to W
and Z used in two tabs), however, 4.2.7.2 cannot handle sorting even a fraction
of it, where 4.1-something can still sort it.  The spreadsheet saves as 1.7M in
size.    


BUG 1: Crashes when trying to Sort:

If I try to sort 2582 (actually anything more than about 1/3 of that) rows of
data spread across columns A-W by column C and D, or D and C, LibreOffice
4.2.7.2 crashes outright.  That was really irritating.  This problem has
existed since I installed 14.04 on a new machine, 4-5 months ago.   I have been
using filters on column C to avoid sorting as a band-aid, waiting for someone
to recognize they broke it, and fix it.  


BUG 2: Not correctly re-referencing formuli after the sort

Today I discovered another problem.  LibreOffice 4.2.7.2 is mangling smaller
sorts. I have about 100 rows of data in columns A to W.  Column A is text. 
Column B is a formula that does string manipulations on A to convert one style
of label to another style of label.  (The labels in column A took on form
historically and changed form in 2010.  Column B redoes labels into a numerical
number.  Old labels are rendered into a number that makes them sort properly
with numbers from the new style.  The labels are job numbers.)  The formuli in
B6 is:  

=IF(A6="","",IF(MID(A6,7,1)=".",VALUE(MID(A6,2,7)),VALUE(MID(A6,3,1))*1000+VALUE(MID(A6,4,3))+VALUE(MID(A6,2,1))/10))

Nothing terribly bizzare, and, certainly not illegal in any way.  If I
highlight the block A6-A8, and sort by column B ascending, then the data in
column A (no formuli) is in proper order (like it remembered HOW to sort by B),
but the formula in B6 is now:

=IF(A8="","",IF(MID(A8,7,1)=".",VALUE(MID(A8,2,7)),VALUE(MID(A8,3,1))*1000+VALUE(MID(A8,4,3))+VALUE(MID(A8,2,1))/10))

the cell numbers in formuli are not being properly preserved to refer to the
data they were originally referring to in its NEW location.   They are now
referring to where the data was.  The data in A6 was in A8 before the sort.
When it was moved from A8 to A6 in the sort, the references in the formuli in
the matching rows was not changed from A8 to A6.   

Other cells in the rows being sorted do refer to other tabs of the sheet, and
use functions like SUMIF and INDEX and MATCH to get all the data referring to
one job in one row.  All these formuli are mucked up in exactly the same manner
at column B formuli, but, they are way more complicated and a complete formuli
and all dependent data cannot be pasted here as easily as the formula for
column B.  

In my sheet, in a given column, some rows have formuli dependent on other cells
or tabs, some have constants or strings.  Editing the formuli to be correct on
the top row and copying them down will erase the constants and strings and
replace them with formuli that result in different data than existed before the
sort.    

This goes to the very heart of what a sort is.  If one does not notice it
mucking up, years of work can be mangled beyond repair.   Fortunately an
assistant mangled this sheet once before years ago by failing to sort all
columns, I managed to repair it and since then I have paranoidly saved the file
with a new version number every time I save it. I was able to go back, but this
is not allowing me to go forward.     

Attached is a small paste from my spreadsheet, a sheet with only A6-B8 in it
(same formuli as above).  This is what it looks like to me before shorting by B
ascending:

S14004.1    14004.1
S12082.1    12082.1
S12015.4    12015.4


This is what is looks like after sorting by B ascending:

S12015.4    14004.1
S12082.1    12082.1
S14004.1    12015.4

This is obviously wrong.   

Please contact me at [email protected] if there is some default setting of
4.2.7.2 that makes its sorts completely different than every spreadsheet
program that went before it that I can correct and make it sort the way every
earlier spreadsheet program sorted.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to