Issue 3006 - Width of cell is altered
Summary: Width of cell is altered
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: ui (show other issues)
Version: 641
Hardware: PC Windows 98
: P5 (lowest) Trivial (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-05 09:36 UTC by ada2778
Modified: 2013-08-07 15:12 UTC (History)
1 user (show)

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


Attachments
the original MS Excel file (13.50 KB, application/msexcel)
2002-02-05 09:43 UTC, ada2778
no flags Details
the file saved by OO (7.00 KB, application/msexcel)
2002-02-05 09:44 UTC, ada2778
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description ada2778 2002-02-05 09:36:54 UTC
1. Edit some cells in MS Excel and save
2. Open in OO, the width of cells will be widened
Comment 1 ada2778 2002-02-05 09:43:40 UTC
Created attachment 1023 [details]
the original MS Excel file
Comment 2 ada2778 2002-02-05 09:44:12 UTC
Created attachment 1024 [details]
the file saved by OO
Comment 3 oc 2002-02-05 10:35:37 UTC
This happens if the used font is not available. Maybe it is possible 
to optimize this routine?
Comment 4 daniel.rentz 2002-02-05 11:04:51 UTC
To fix: The conversion method for column widths.
It's a minor problem -> P5.
Comment 5 ada2778 2002-10-25 05:36:38 UTC
test in developer version 643, this is fixed.
Comment 6 john.marmion 2002-12-23 19:06:44 UTC
This problem still exists. Daniel asked me to take a look at this.
Lets see if I understand this:

As I see it, this problem occurs where the used font is unavailable.
OOo defaults back to the default font and size for all the blank cells
and Excel uses the font and size that has been setup for these blank
cells?
Comment 7 john.marmion 2002-12-24 09:31:08 UTC
taking ownership of this.
Comment 8 john.marmion 2002-12-24 09:31:37 UTC
Started
Comment 9 john.marmion 2003-01-15 18:08:17 UTC
Forget my earlier comment. I clearly did not understand the issue. 

There are some rounding issues associated with working out column
widths, but these are negligble.

The column width displayed by OOo of A for ms.xls is 61.01mm and
49.60mm for oo.xls. The column width is based on an algorithm which
uses a scale. This scale is determined from the first font record and
takes account of the font, font size and how many '0' fit into a
column multiplied by 256. If the font size is 12pt, then the scale is
1.2186. Thus ms.xls returns a scale of 1.2816. But OOo writes out the
default Arial/10pt font as the first font record. Thus this will be
interpreted as a scale of 0.9909 recurring. Thus 61.01 divided by
1.2186 and then multipled by 0.9909 results in 49.60.

This problem is also manifest in issue 7009. Here it it more
pronounced. The first font record in the MO_input.xls file is Courier
10pt. This returns a scale of 1.0720 and on export this will return 
the 0.9909 as above. Thus explains why Excel shows a column width of 8
and 7.86 as issue 7009 reporter stated.

So next I need a solution.    
Comment 10 john.marmion 2003-02-19 10:09:54 UTC
restoring "fixed" state
Comment 11 john.marmion 2003-02-19 10:13:07 UTC
sorry ignore last action - wrong issue.
Comment 12 john.marmion 2003-02-19 10:14:42 UTC
re-establishing original status "started".
Comment 13 daniel.rentz 2003-03-13 15:11:38 UTC
taking it
Comment 14 daniel.rentz 2003-03-13 15:16:24 UTC
Fixed in srx644/calc05 (OOo 1.1 Beta 2)

Import works with different fonts and font heights.

Export of column width still slightly different. This will be fixed
with import/export of cell styles, since then it will be possible to
set the correct application font. With that font a correct calculation
of the column widths will be possible. (issue 11709, #107688#)
Comment 15 daniel.rentz 2003-03-17 09:17:16 UTC
owner->QA
Comment 16 oc 2003-03-18 14:03:09 UTC
Reset resolution to fixed
Comment 17 oc 2003-03-18 14:04:20 UTC
Verified in internal build calc05
Comment 18 frank 2003-04-01 11:24:34 UTC
Found integrated on Solaris, Windows and Linux using srx644m8s1