Download it now!
Bug 44742 - FORMATTING: FILESAVE as XLS file loses custom border line width information
Summary: FORMATTING: FILESAVE as XLS file loses custom border line width information
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: All All
: medium normal
Assignee: Markus Mohrhard
URL:
Whiteboard: bibisected35 bibisected35older target...
Keywords: regression
: 42665 44114 46960 47402 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-12 12:02 UTC by Nino
Modified: 2012-04-15 04:04 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Border line widths in Excel 2003 (13.50 KB, application/vnd.ms-excel)
2012-01-13 07:35 UTC, famo
Details
Border line widths in OpenOffice.org 3.2 (5.50 KB, application/vnd.ms-excel)
2012-01-13 07:38 UTC, famo
Details
Border line widths in LibreOffice 3.4.4 (7.74 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-01-13 07:39 UTC, famo
Details
OpenOffice.org 3.2 document converted to xls with OOo 3.2 (5.50 KB, application/vnd.ms-excel)
2012-01-13 07:41 UTC, famo
Details
LibreOffice 3.4.4 document converted to xls with LO 3.4.4 (5.50 KB, application/vnd.ms-excel)
2012-01-13 07:42 UTC, famo
Details
Border line widths in OpenOffice.org 3.2 (8.78 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-01-13 07:44 UTC, famo
Details
Overview of Excel documents in Excel 2003 (2.85 MB, image/png)
2012-01-13 07:46 UTC, famo
Details
Overview of Excel documents in Excel 2003 (53.13 KB, image/png)
2012-01-13 07:49 UTC, famo
Details
Overview of Excel documents in OOo 3.2 (33.77 KB, image/png)
2012-01-13 07:49 UTC, famo
Details
Overview of Excel documents in LO 3.4.4 (42.25 KB, image/png)
2012-01-13 07:50 UTC, famo
Details
Overview of *the* Excel document in Excel2003, OOo3.2, LO3.4.4 (54.64 KB, image/png)
2012-01-13 07:52 UTC, famo
Details
Cell A1 with 3pt double line. In LO 3.3.4 and OOo 3.3.0 3pt, in LO 3.5 Beta2 0.3 pt (6.50 KB, application/vnd.ms-excel)
2012-01-13 08:34 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nino 2012-01-12 12:02:09 UTC
Steps to reproduce:
1. open Calc
2. Select a cell
3. Formate - Cells - Borders: 
   Set line width to 3,00 pt
   Line arrangement: "Set all Four Borders"
4. Save as XLS (Excel 97/2000/XP...) and close it.
5. Reopen the XLS: the borders are reset to default values

Expected behavior:
custom format should be preserved.

Platform
Linux i686 / RPM
Comment 1 Nino 2012-01-12 12:03:03 UTC
bug#37622 looks similar
Comment 2 famo 2012-01-12 14:27:36 UTC
I can confirm this behavior on WinXP (32bit) and LO 3.4

Some thing to add:
at #5:
I don't think the border line width is reseted to default width. The default width is 0.25 and the reseted line border width is 1.2 (here).

Also I noticed that the "spacing to contents" is increased in the xls format (although the border line width is thinner there) compared to the original save in odf, but thats probably the same / subsequent error.
Comment 3 Rainer Bielefeld Retired 2012-01-12 21:39:48 UTC
May be 1.2pt is the only width EXCEL knows, and this is a feature, but not a bug?
Without knowledge concerning EXCEL border features further LibO investigations are useless
Comment 4 M.C. 2012-01-13 04:14:25 UTC
Same with LO LibreOffice 3.4.4 OOO340m1 (Build:402) / Mint Linux 12 amd 64
Comment 5 famo 2012-01-13 07:35:18 UTC
Created attachment 55544 [details]
Border line widths in Excel 2003

Excel Document created with Excel 2003 and the three available border line widths (thin, thicker, thickest)
Comment 6 famo 2012-01-13 07:38:09 UTC
Created attachment 55545 [details]
Border line widths in OpenOffice.org 3.2

ODF Document created with OpenOffice.org 3.2 and the six available border line
widths.
Comment 7 famo 2012-01-13 07:39:37 UTC
Created attachment 55546 [details]
Border line widths in LibreOffice 3.4.4

ODF Document created with LibreOffice 3.4.4 and some of the available border line
widths.
Comment 8 famo 2012-01-13 07:41:29 UTC
Created attachment 55547 [details]
OpenOffice.org 3.2 document converted to xls with OOo 3.2
Comment 9 famo 2012-01-13 07:42:18 UTC
Created attachment 55548 [details]
LibreOffice 3.4.4 document converted to xls with LO 3.4.4
Comment 10 famo 2012-01-13 07:44:40 UTC
Created attachment 55549 [details]
Border line widths in OpenOffice.org 3.2

ODF Document created with OpenOffice.org 3.2 and the six available border line
widths.
Comment 11 famo 2012-01-13 07:46:37 UTC
Created attachment 55550 [details]
Overview of Excel documents in Excel 2003
Comment 12 famo 2012-01-13 07:49:11 UTC
Created attachment 55551 [details]
Overview of Excel documents in Excel 2003
Comment 13 famo 2012-01-13 07:49:47 UTC
Created attachment 55552 [details]
Overview of Excel documents in OOo 3.2
Comment 14 famo 2012-01-13 07:50:29 UTC
Created attachment 55553 [details]
Overview of Excel documents in LO 3.4.4
Comment 15 famo 2012-01-13 07:52:07 UTC
Created attachment 55554 [details]
Overview of *the* Excel document in Excel2003, OOo3.2, LO3.4.4
Comment 16 famo 2012-01-13 08:17:00 UTC
Sorry for the spamming...

So I did some comprehensive testing - my conclusion:
In Excel (2003 here) are only three border line width available.
When converting from ODF to XLS the (more) variable line widhts in ODF must be converted to the three available line widths in XLS. Apparently this correlation changed in LO 3.4 compared to OOo/ earlier versions.
I don't know if this changed correlation is a bug or expected. In LO 3.4 the line widths are still converted to three different widths, but the thicker and thickest line widths are more close by now and look almost the same.

However as it seems only LO 3.4 itself is affected by this, the documents themselves still display fine in Excel / OOo.



If you take a look at "Overview of Excel documents in Excel 2003", you'll see all line border widths are displayed fine whether they are created/converted from OOo or LO.
Comment 17 Micha Kuehn 2012-01-13 08:33:27 UTC
I can confirm the bug with LO 3.4.3 on ubuntu 11.10

Micha
Comment 18 Robert Großkopf 2012-01-13 08:34:03 UTC
Created attachment 55556 [details]
Cell A1 with 3pt double line. In LO 3.3.4 and OOo 3.3.0 3pt, in LO 3.5 Beta2 0.3 pt

Could not be a only a problem "Which thickness is near the lines of Excel". The example for me: The doule-lines. Edited in LO 3.3.4 with 3pt, opended in OOo: 3pt, opened in LO 3.5 Beta2: 0.3pt.
I have seen this unter Linux-rpm-32bit.
Comment 19 Rainer Bielefeld Retired 2012-01-13 08:46:13 UTC
From LibO 3.3 to 3.4 the flexibility or CALC border styles has been improved a lot, and that will not make it easy to find a conversion rule. I agree, we should try to improve results. 

I do not use EXCEL and have no document interchange with EXCEL documents, so I have no experience. But it seems tat that is a "real life problem".

I do not know whether there already is activity concerning this. I will try to find out our emphasis concerning MS / Office Open XML compatibility  during the next TSC call and leave the results here.
Comment 20 famo 2012-01-13 09:41:38 UTC
Addendum note:
If you edit the converted LO 3.4.4 XLS document and save it again as XLS, then the line border widths actually changes in Excel / OOo view.
The thickest line width is converted to thick, the thick lines to thin and the thin lines remain as thin lines. This happens only once, so further editing doesn't reduce all lines to thin lines.

So I guess that the "border line width correlation table" is a little mis-adjusted.
Comment 21 Rainer Bielefeld Retired 2012-01-18 04:33:07 UTC
*** Bug 42665 has been marked as a duplicate of this bug. ***
Comment 22 Eike Rathke 2012-01-29 05:26:56 UTC
Another incarnation of BorderLine rework, with test cases.
Comment 23 Markus Mohrhard 2012-03-28 15:06:42 UTC
I will take a look at that one and maybe some other border import/export problems.
Comment 24 Markus Mohrhard 2012-04-01 14:54:53 UTC
(In reply to comment #22)
> Another incarnation of BorderLine rework, with test cases.

And this one was not the result of BorderLine rework. It seems that this was an old Go-Oo bug. The patch introducing this strange behavior was an go-oo patch changing the border line widths in xls import but not in xls export.

I fixed it now by moving the definion of the border width that is used in xls import/export in a common header file so that both import and export are using this now.
Comment 25 Not Assigned 2012-04-01 15:03:31 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4ab9719f15baddbc60b96d86d2e0878e79a6ddf7

use same border width information for xls import and export, fdo#44742
Comment 26 Markus Mohrhard 2012-04-01 17:01:41 UTC
*** Bug 47402 has been marked as a duplicate of this bug. ***
Comment 27 Markus Mohrhard 2012-04-01 17:04:02 UTC
*** Bug 46960 has been marked as a duplicate of this bug. ***
Comment 28 Not Assigned 2012-04-02 13:39:46 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=487139d681fbf38a52cf5ea91d7e38f7eba290a0&g=libreoffice-3-5

use same border width information for xls import and export, fdo#44742


It will be available in LibreOffice 3.5.3.
Comment 29 Markus Mohrhard 2012-04-02 18:35:46 UTC
*** Bug 44114 has been marked as a duplicate of this bug. ***