Issue 29101 - cell formatting lost upon save in .sxc
Summary: cell formatting lost upon save in .sxc
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: ui (show other issues)
Version: OOo 1.1
Hardware: All All
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: frank
QA Contact: issues@sc
URL:
Keywords:
: 74148 82922 (view as issue list)
Depends on:
Blocks:
 
Reported: 2004-05-12 16:52 UTC by jltympanum
Modified: 2013-08-07 15:14 UTC (History)
4 users (show)

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


Attachments
Patch on IsCellEqual function to stop numerical cells with different number-formats getting compressed together (544 bytes, patch)
2007-10-26 20:03 UTC, anational
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description jltympanum 2004-05-12 16:52:24 UTC
set up a sheet thus:
          value  format
cell A1:    0     General
cell B1:    0     0%

Save as .sxc and reload.  The 0% formatting has been replaced by General.

Note: this does not happen with .sdc
Comment 1 frank 2004-06-02 15:14:35 UTC
Hi Sascha,

maybe this one is for you.

As far as I can tell, this can only be reproduced if nothing else is in the
column with the percent format. Therefore P4 Later.

Frank
Comment 2 sascha.ballach 2004-06-02 17:15:01 UTC
I take it.
Comment 3 niklas.nebel 2007-02-09 15:14:07 UTC
Issue 74148 has more examples how this can occur.
Comment 4 niklas.nebel 2007-02-09 15:15:37 UTC
*** Issue 74148 has been marked as a duplicate of this issue. ***
Comment 5 niklas.nebel 2007-10-24 13:03:50 UTC
*** Issue 82922 has been marked as a duplicate of this issue. ***
Comment 6 anational 2007-10-24 15:36:32 UTC
Also, trying all of these combinations in fresh spreadsheets, then saving,
closing, and opening again, results in A1 getting duplicated in B1:

Values Entered                       Values Loaded
 A1    | B1     save, close, open     A1    | B1
-------+-------                    ---------+---------
 FALSE | 0            ->              FALSE | FALSE
 FALSE | 0.00%        ->              FALSE | FALSE       
 FALSE | £0.00        ->              FALSE | FALSE
 0     | 0.00%        ->              0     | 0
 0     | £0.00        ->              0     | 0
 0.00% | FALSE        ->              0.00% | 0.00%
 0.00% | 0            ->              0.00% | 0.00%
 0.00% | £0.00        ->              0.00% | 0.00%

These ones work correctly:
 A1    | B1
---------------
 0     | FALSE
 £0.00 | FALSE
 £0.00 | 0
 £0.00 | 0.00%

This bug is only reliably reproducible for me when starting with a fresh
document each time, entering the values, then checking their format types (which
oocalc correctly guesses), then saving and loading.

table:number-columns-repeated attribute on the first cell is set to 2 presumably
because only the values are compared, in many cases.

I would think that this counts as data corruption, and therefore more serious
than merely a style/formatting bug. Particularly boolean/currency/percentage
values cannot really be considered equivalent (it was a FALSE followed by £0.00
which were collapsed together into two FALSE values that caught me out).
External applications that use the office:value-type field to correctly
interpret data will be in trouble.
Comment 7 anational 2007-10-26 20:03:29 UTC
Created attachment 49188 [details]
Patch on IsCellEqual function to stop numerical cells with different number-formats getting compressed together
Comment 8 ooo 2007-10-26 20:09:21 UTC
That patch could do. Niklas, please take a look.
Comment 9 anational 2007-10-29 11:19:25 UTC
I was asked by the guys in IRC to send a JCA in for this patch. So that was
faxed this morning:
Mon 29th October 2007 at 7.20am UTC
Comment 10 niklas.nebel 2007-12-03 09:43:56 UTC
The fix is on CWS "calc45".
Comment 11 niklas.nebel 2007-12-03 09:45:43 UTC
correct target
Comment 12 niklas.nebel 2007-12-03 15:27:22 UTC
back to QA for verification
Comment 13 frank 2007-12-07 14:44:52 UTC
found fixed on cws calc45 using Solaris, Linux and Windows build
Comment 14 frank 2008-02-11 10:23:48 UTC
found integrated om master OOHm5 using Solaris, Windows and Linux build