Bug 77369 - Dashed and dotted Calc borders appear solid at some zoom factor
Summary: Dashed and dotted Calc borders appear solid at some zoom factor
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.1.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
: 120868 (view as bug list)
Depends on:
Blocks: Cell-Border
  Show dependency treegraph
 
Reported: 2014-04-12 16:22 UTC by Pedro
Modified: 2018-10-30 09:49 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
ODS spreadsheet with 3 border styles (7.35 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-04-12 16:22 UTC, Pedro
Details
ODS compared in LO versions (111.66 KB, image/png)
2018-10-25 15:46 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro 2014-04-12 16:22:24 UTC
Created attachment 97259 [details]
ODS spreadsheet with 3 border styles

LibreOffice no longer displays the correct border line style in the spreadsheet (although it looks correct in Print Preview)

This is a regression in 4.2.1.1 (works correctly in 4.2.0.4) and it's still broken in 4.2.3.3
Comment 1 Jorendc 2014-04-15 20:13:01 UTC
Reproducible, tested using Windows 8.1 with LibreOffice Version: 4.3.0.0.alpha0+
Build ID: d2555ebb240fea2780f152e5ea39d145aab508fe
TinderBox: Win-x86@39, Branch:master, Time: 2014-04-14_07:59:52

Kind regards,
Joren
Comment 2 Chris 2014-05-28 19:54:53 UTC
Whats is going on? Now is Libreoffice 4.2.5.1 and bug is still reproducible. Where is stability of LibreOffice?
Comment 3 Xisco Faulí 2014-05-29 10:52:30 UTC Comment hidden (obsolete)
Comment 4 Matthew Francis 2015-01-09 05:24:19 UTC
This behaviour changed across the set of commits ec1a3157c1851dcb481f402ec25aa38fa9e7c51c..30f97564f86ff2fff3e682a14191db0d841df0cf


commit 30f97564f86ff2fff3e682a14191db0d841df0cf
Author: Kohei Yoshida <kohei.yoshida@collabora.com>
Date:   Mon Jan 20 11:41:41 2014 -0500

    Substitute dashed line with a solid line at lower zoom levels.
    
    Change-Id: I0437409b6a5d6163fadf777df5c028950727e786

commit ae22838d2ff4d388e97c30317a6a9f83e652a06a
Author: Kohei Yoshida <kohei.yoshida@collabora.com>
Date:   Mon Jan 20 11:10:52 2014 -0500

    Better on-screen drawing of vertical dashed lines.
    
    Change-Id: I53d5f8b0278d1228cd941221a07cd360943c5ce6

commit b3b57c7a3a43a056217c72716d18bdeced029b66
Author: Kohei Yoshida <kohei.yoshida@collabora.com>
Date:   Mon Jan 20 10:12:53 2014 -0500

    Same solid line treatment for vertical lines during on-screen drawing.
    
    Change-Id: Idb352dc2afeb2ee7b48620c972c2a186209228ea

commit 82599357ae6066b002ca2bd2b7060b26e51ba00f
Author: Kohei Yoshida <kohei.yoshida@collabora.com>
Date:   Mon Jan 20 10:04:26 2014 -0500

    Add vertical lines for testing.
    
    Change-Id: I93d3613547b74a37cebbb6e791e0d23ea405401b
Comment 5 Matthew Francis 2015-01-09 09:39:14 UTC
(Missed quoting the earliest commit in the above range)

commit ec1a3157c1851dcb481f402ec25aa38fa9e7c51c
Author: Kohei Yoshida <kohei.yoshida@collabora.com>
Date:   Sat Jan 18 23:02:05 2014 -0500

    Better pixelization of dashed lines for screen rendering.
    
    Now the dashed lines are evenly placed on screen.  For now, horizontal lines
    only.  I'll work on vertical lines later.
    
    Change-Id: I474e9c8214e5f079ea2cfca12b35381d8fcf2ae1
Comment 6 Robinson Tryon (qubit) 2015-12-13 11:09:33 UTC Comment hidden (obsolete)
Comment 7 Aron Budea 2016-09-11 05:35:01 UTC
The issue seems to be pieces similar to this:
double nThick = rtl::math::round(rSource.getLeftWidth());
...
if (basegfx::fTools::equalZero(nThick))
{
// Dash line segment too small to draw.  Substitute it with a solid line.
...
from http://opengrok.libreoffice.org/xref/core/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx

Since nThick is a very small number like 0.07 (depends on zoom), it will get rounded to zero, and then the line is substituted. Removing the rounding will produce acceptable results in default rendering mode, but the dashed/dotted lines look really bad with OpenGL rendering (probably unrelated, but still not an improvement from users' perspective).

That, and some effort should be put into properly understanding the whole code.
Comment 8 Xisco Faulí 2016-10-03 09:23:45 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2017-10-23 14:08:16 UTC Comment hidden (obsolete)
Comment 10 Pedro 2017-10-24 09:21:59 UTC
Yes, this regression still occurs in LO 5.3.6 and 5.4.2 under Windows 7.
Comment 11 QA Administrators 2018-10-25 03:02:52 UTC Comment hidden (obsolete)
Comment 12 Pedro 2018-10-25 09:14:55 UTC
This is now partially fixed since branch 6.0. The dotted line type still has some problems in the vertical lines.
I no longer use LibreOffice, so if someone has the time it would probably make sense to close this Bug and open a new one with the limitation mentioned before.
Comment 13 Timur 2018-10-25 15:46:14 UTC
Created attachment 146005 [details]
ODS compared in LO versions

As Pedro noted, there was a change. Screen preview depends on zoom factor. 
Dashed border looks good now (for zoom >50%).
Dotted border doesn't look good for 100% but looks better with 120%.
Comment 14 Timur 2018-10-25 15:47:38 UTC
*** Bug 120868 has been marked as a duplicate of this bug. ***
Comment 15 johnmcfarlane01 2018-10-25 16:47:31 UTC
(In reply to Timur from comment #14)
> *** Bug 120868 has been marked as a duplicate of this bug. ***

Please see BUG 120408 and attachment. this has worked and displays perfectly in 5.4.7.2  and earlier but not latest versions.
Comment 16 Aron Budea 2018-10-26 14:38:41 UTC
Bug 120408 is fixed now with a very recent commit from Armin (313392119522c21a6ecd14403d6f92c948149df7), let's close this as well as WORKSFORME.
Comment 17 Timur 2018-10-26 16:31:29 UTC
Yes. Thanks Armin and Aron!
Comment 18 johnmcfarlane01 2018-10-26 17:11:02 UTC
Thanks but as i am new to this how can i check this out myself?
Comment 19 Aron Budea 2018-10-26 17:54:39 UTC
(In reply to johnmcfarlane01 from comment #18)
> Thanks but as i am new to this how can i check this out myself?

You can find daily builds for different platforms on this link:
https://dev-builds.libreoffice.org/daily/master/

Since you reported using Windows in your bug report, Win-x86_64@42 should have builds suitable for you, grab the latest one (mind the date of the build, it should be after the commit, which in this case was pushed on the 25th).

Thanks for the fix, Armin!
Comment 20 johnmcfarlane01 2018-10-28 11:43:11 UTC
(In reply to Aron Budea from comment #19)
> (In reply to johnmcfarlane01 from comment #18)
> > Thanks but as i am new to this how can i check this out myself?
> 
> You can find daily builds for different platforms on this link:
> https://dev-builds.libreoffice.org/daily/master/
> 
> Since you reported using Windows in your bug report, Win-x86_64@42 should
> have builds suitable for you, grab the latest one (mind the date of the
> build, it should be after the commit, which in this case was pushed on the
> 25th).
> 
> Thanks for the fix, Armin!

Looks much better but still darker and heavier dotted line compared with my typical spreadsheet attachment display in 5.4.7.2. Vertical thick left hand border lines adjacent to hidden columns not displaying either.
Comment 21 Timur 2018-10-30 09:49:11 UTC
One issue per bug. Last issue is something else, maybe Bug 116051.