Bug 88827 - FILESAVE: double lined cell borders get lost due after saving as ODS and reopen
Summary: FILESAVE: double lined cell borders get lost due after saving as ODS and reopen
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.5.2 release
Hardware: All All
: high normal
Assignee: Justin L
URL:
Whiteboard: target:5.3.0 target:5.2.4
Keywords: bibisected, bisected, regression
: 90599 93809 94736 95458 102299 102858 (view as bug list)
Depends on:
Blocks: Cell-Border
  Show dependency treegraph
 
Reported: 2015-01-27 15:59 UTC by Ronald
Modified: 2022-07-22 08:58 UTC (History)
18 users (show)

See Also:
Crash report or crash signature:


Attachments
double lined upper edge disappears (14.37 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-01-27 15:59 UTC, Ronald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ronald 2015-01-27 15:59:31 UTC
Created attachment 112830 [details]
double lined upper edge disappears

See attachment. I select certain cells and format these cells (ctrl-1), I apply an upper adge, double line. Saving the document and reopening it, I see the double lines have disappeared...
Comment 1 MM 2015-01-28 00:33:51 UTC
Confirmed with v4.3.6.1 under windows 7 x64.
Confirmed with v4.4.0.3 under mint 17.1 x64.

In 'line arrangement' I select 'user-defined' and upper arrow.
If you select style and/or color, after reload these are set back to the default.
Happens when you set the line width to 1.10 pt or under.
Also doesn't happen when you save it as xlsx, because the line width is set to 2.50 pt no matter what. But that's another bug, I guess.
Comment 2 raal 2015-04-14 02:47:14 UTC
*** Bug 90599 has been marked as a duplicate of this bug. ***
Comment 3 raal 2015-04-14 02:49:27 UTC
works OK in LibreOffice 3.5.0 
Build ID: d6cde02  -> regression
Comment 4 Matthew Francis 2015-04-15 03:01:13 UTC
This seems to have begun at the below commit.

commit 2c62596cf264ef10749d8bfdb2bb2ebef2d98fbc
Author: Kohei Yoshida <kohei.yoshida@collabora.com>
Date:   Mon Mar 3 17:58:11 2014 -0500

    fdo#75260: Correctly draw double lines for both Writer and Calc.
    
    Fix all sorts of incorrect double line handling in drawinglayer in order to
    draw thick-thin double line types correctly.  Also change handling of border
    lines in writer tables. There are still some outstanding issues but it's
    much better than how it was before.
    
    Also realized that Word and Excel handle simple thin double lines differently;
    Word varies widths of all of the lines and the gap whereas Excel only has one
    fixed size for its double line.  For this reason I decided to add a separate
    double line type (DOUBLE_THIN) to handle Excel's double line.
    
    Change-Id: Iaaa353b6e4f998b524262bea59260b4333e0cdb4
Comment 5 V Stuart Foote 2015-07-19 17:57:34 UTC
*** Bug 92638 has been marked as a duplicate of this bug. ***
Comment 6 raal 2015-08-31 14:39:15 UTC
*** Bug 93809 has been marked as a duplicate of this bug. ***
Comment 7 Robinson Tryon (qubit) 2015-12-13 11:12:11 UTC Comment hidden (obsolete)
Comment 8 Laurent Bigonville 2016-04-10 14:57:08 UTC
Hi,

This is still the case in 5.1.2 release
Comment 9 Jakub Narębski 2016-05-15 11:30:29 UTC
Confirmed in LibreOffice 5.1.0.3.

I have selected a range of cells, and formatted them using double line edge (right side of range instead of upper edge as in original poster submission). After saving the document, closing LibreOffice Calc, then reopening - double lines disappeared, and opening cell formatting shows that they have *no* cell border.
Comment 10 Wolfgang Jäger 2016-07-16 16:37:15 UTC
Confirmed for LibO Calc V5.2.0.0 RC2
Comment 11 Wolfgang Jäger 2016-07-16 16:42:52 UTC
The error must occur when the file is saved. Saving a (nearly empty) .ods containing a double bordered range with LibO and reopening it with AOO 4.1.2 leads to the same result: Border missing.
Comment 12 Wolfgang Jäger 2016-07-16 17:03:44 UTC
(Everything tested again with 5.2.0.0 RC2)
The error did not occur in a test when the simple file was saved in xls (1997-2003) or in xlsx (2003-2013). 
Reloading such an alien file and saving it again in native ods produced file correctly containing the double border!
The original bug did not show as soon as the border width (for the double line!) was set to a minimum of 1.25 point (default setting was 0.75 point). 
The cycle of creating an example, saving it in xlsx, reloading it, saving it in ods again, an reloading it another time leads to the changed border width of 1.75 pint.
Comment 13 Roeland 2016-09-06 19:50:31 UTC
I think this is a duplicate of bug 79260 which is also talking about problems with saving double line borders. See the third comment over there.
Comment 14 Cor Nouws 2016-09-06 19:59:46 UTC
*** Bug 79260 has been marked as a duplicate of this bug. ***
Comment 15 Cor Nouws 2016-09-06 20:01:51 UTC
Thanks Roeland for pointing this out.
(you might consider to do triage like this yourself, when you see an issue like you did now.)
Comment 16 Roeland 2016-09-06 20:13:50 UTC
You're welcome Cor. I will!
Comment 17 Cor Nouws 2016-09-06 21:08:39 UTC
(In reply to Roeland from comment #16)
> You're welcome Cor. I will!

Very friendly Roeland! Please now where to find other QA-ers (irc, qa-mailinglist) for discussion and questions.
Enjoy ! Cor
Comment 18 Xisco Faulí 2016-10-03 09:24:39 UTC
Adding Cc: to Kohei Yoshida
Comment 19 Xisco Faulí 2016-10-07 12:36:27 UTC
*** Bug 88208 has been marked as a duplicate of this bug. ***
Comment 20 Timur 2016-10-07 12:45:49 UTC
I don't understand why this is considered a regression and new bug when Bug 75260 is still open. All those duplicates here should be duplicates there and that one should be of highest importance.
Comment 21 Xisco Faulí 2016-10-07 15:30:23 UTC
Hi timur, you're right.
Closing this one as dupe of that one.

*** This bug has been marked as a duplicate of bug 75260 ***
Comment 22 Xisco Faulí 2016-10-07 15:58:10 UTC
Well, I've reconsidered it and I think it's better to have different bugs as bug 75260 is too general, and this one is only focus on the FILESAVE problem. are they related? of course they're, but betther to keep them splitted. Sorry for the noise.
Comment 23 Xisco Faulí 2016-10-07 16:00:50 UTC Comment hidden (obsolete)
Comment 24 Xisco Faulí 2016-10-07 16:02:36 UTC Comment hidden (obsolete)
Comment 25 Xisco Faulí 2016-10-07 16:04:51 UTC
*** Bug 93809 has been marked as a duplicate of this bug. ***
Comment 26 Xisco Faulí 2016-10-07 16:27:49 UTC
*** Bug 102858 has been marked as a duplicate of this bug. ***
Comment 27 Xisco Faulí 2016-10-07 16:33:19 UTC
*** Bug 94736 has been marked as a duplicate of this bug. ***
Comment 28 Xisco Faulí 2016-10-07 16:36:04 UTC
*** Bug 95458 has been marked as a duplicate of this bug. ***
Comment 29 lynstef 2016-10-08 12:12:32 UTC
(In reply to Wolfgang Jäger from comment #12)
> (Everything tested again with 5.2.0.0 RC2)
> The error did not occur in a test when the simple file was saved in xls
> (1997-2003) or in xlsx (2003-2013). 
> Reloading such an alien file and saving it again in native ods produced file
> correctly containing the double border!
> The original bug did not show as soon as the border width (for the double
> line!) was set to a minimum of 1.25 point (default setting was 0.75 point). 
> The cycle of creating an example, saving it in xlsx, reloading it, saving it
> in ods again, an reloading it another time leads to the changed border width
> of 1.75 pint.

thanksWolfgang Jager tried the 1.25 point and it worked great cheers:)
Comment 30 lynstef 2016-10-08 12:14:57 UTC
(In reply to Wolfgang Jäger from comment #12)
> (Everything tested again with 5.2.0.0 RC2)
> The error did not occur in a test when the simple file was saved in xls
> (1997-2003) or in xlsx (2003-2013). 
> Reloading such an alien file and saving it again in native ods produced file
> correctly containing the double border!
> The original bug did not show as soon as the border width (for the double
> line!) was set to a minimum of 1.25 point (default setting was 0.75 point). 
> The cycle of creating an example, saving it in xlsx, reloading it, saving it
> in ods again, an reloading it another time leads to the changed border width
> of 1.75 pint.

Cheers Wolfgang jager changing to 1.25 point worked for me thank you :)
Comment 31 lynstef 2016-10-08 12:17:49 UTC
I tried Wolfgangs suggestion of changing the point to 1.25 (default 0.75) and it worked for me so thanx very much and thanx to you all for your help and advice :)
Comment 32 Justin L 2016-11-11 11:43:06 UTC
The absolute minimum size for double_thin borders to become visible is 1.15pt (1.14 doesn't work). Double-thin can be hidden until the size is 1.15 in cui/source/tabpages/border.cxx by changing the mnMinWidth from 10 to 23 in
 { DOUBLE_THIN,         23, &sameColor, &sameColor, &sameDistColor },

I'm still trying to figure out WHY it requires 1.15pt.
Comment 33 Justin L 2016-11-12 06:49:53 UTC
A better solution is changing svtools/source/control/ctrlbox.cxx:
-    if ( bGapChange && nGap > MINGAPWIDTH )
+    if ( bGapChange && nGap >= MINGAPWIDTH )

The width size is automatically increased to 1.10 when reloaded.

However, that looks like it exposes another bug, where extra borders are added to other cells - perhaps because of duplicate styles.
Comment 34 Justin L 2016-11-14 13:06:04 UTC
(In reply to Justin L from comment #33)
> However, that looks like it exposes another bug, where extra borders are
> added to other cells - perhaps because of duplicate styles.

bug 103924 is unrelated, so proposing the fix https://gerrit.libreoffice.org/#/c/30836
Comment 35 Commit Notification 2016-11-15 05:42:45 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9259fcd40b1749cd421c433bcc436cb335cbbe43

tdf#88827 - double-thin border: MINGAPWIDTH is a valid width

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 36 Commit Notification 2016-11-15 05:48:54 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8fc6be8d2c0fd455b9c461143594457a08a3e250&h=libreoffice-5-2

tdf#88827 - double-thin border: MINGAPWIDTH is a valid width

It will be available in 5.2.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 37 Xavier Van Wijmeersch 2017-07-12 19:58:07 UTC
i tested the fix with homebuild LO V6.0 kde4
i have followed the steps in the description even changed the color to red
saved the file closed and reopen the double line in red is still there

Version: 6.0.0.0.alpha0+
Build ID: 0a7fe0ab0b5b18cfbf1d9f7971d851fe00b6d36a
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group