Bug Hunting Session
Bug 81643 - Borders are drawn as rectangles and so they are not joined well at the corners
Summary: Borders are drawn as rectangles and so they are not joined well at the corners
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
4.2.2.1 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:4.4.0
Keywords: bibisected, bisected, regression
: 78754 89604 93324 94900 96650 99188 105475 107065 116612 (view as bug list)
Depends on:
Blocks: Table-Borders
  Show dependency treegraph
 
Reported: 2014-07-22 11:40 UTC by Tamás Zolnai
Modified: 2018-03-25 15:18 UTC (History)
16 users (show)

See Also:
Crash report or crash signature:


Attachments
Character border showing borders are not joined well (71.31 KB, image/png)
2014-07-22 11:41 UTC, Tamás Zolnai
Details
Page, paragraph and table borders in 6.0.0.0.alpha1+ from 2017-10-31 (14.13 KB, image/png)
2017-11-02 10:05 UTC, Thomas Lendo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tamás Zolnai 2014-07-22 11:40:41 UTC
When using a border (it can be character border, paragraph border, page border, cell border) with solid/dotted/dashed style and with a larger line width, it can be seen that the borders on all sides are drawn as rectangles, which means they are not connected to each other well.
Comment 1 Tamás Zolnai 2014-07-22 11:41:56 UTC
Created attachment 103276 [details]
Character border showing borders are not joined well
Comment 2 Tamás Zolnai 2014-07-22 11:55:41 UTC
First commit causing regression in solid lines:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=6a3fb868b2b8af21f7b6140424b6f8377599a786

This commit introduce tryDrawBorderLinePrimitive2DDirect()
method which seemingly draws borders as rectangles instead of
trapezoids.
Comment 3 Commit Notification 2014-11-21 11:16:15 UTC
Zolnai Tamás committed a patch related to this issue.
It has been pushed to "master":

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

fdo#81643: Regression in rendering of borders

It will be available in 4.4.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 4 Commit Notification 2014-11-21 12:20:45 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=305461aafe2527fcf9bf796f59648c81b38d7850

Revert "fdo#81643: Regression in rendering of borders"

It will be available in 4.4.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 5 Matthew Francis 2015-01-16 12:10:51 UTC
*** Bug 78754 has been marked as a duplicate of this bug. ***
Comment 6 Matthew Francis 2015-01-16 12:20:55 UTC
I still see the lumpy corners shown in the attached image on current 4.5 master. From bisecting source across the time period in question, the below commit seems to me to be the most directly responsible. Despite its mention of "cell grid", the effects of this were not Calc specific.

(In addition, changed Component to "graphics stack" - "Drawing" is clearly not right, "Writer" might be better, but in fact this is about the interaction of low-mid level graphics code (drawinglayer/) with several other modules including Writer and Calc)

commit 15974abe63f0d4fc88099634d5cd2ddb9760ec23
Author: Kohei Yoshida <kohei.yoshida@collabora.com>
Date:   Mon Jan 20 18:37:08 2014 -0500

    fdo#73487: Center thick border lines around cell grid.
    
    This reduces the amount of gap at line joins. Plus it generally looks better
    this way.
    
    Change-Id: Ifd21cd0bc1f61f8a875b1bad9cfb33564c18b9ae
Comment 7 Jacques Guilleron 2015-10-09 17:48:05 UTC
*** Bug 94900 has been marked as a duplicate of this bug. ***
Comment 8 Robinson Tryon (qubit) 2015-12-14 05:16:23 UTC Comment hidden (obsolete)
Comment 9 Roeland 2016-06-27 19:13:12 UTC
*** Bug 99188 has been marked as a duplicate of this bug. ***
Comment 10 Cor Nouws 2016-06-28 11:02:34 UTC
see https://bugs.documentfoundation.org/show_bug.cgi?id=99188#c3 for bibisect data
Comment 11 Xisco Faulí 2016-10-03 09:23:52 UTC
Adding Cc: to Kohei Yoshida
Comment 12 Xisco Faulí 2016-10-07 15:43:37 UTC
*** Bug 93324 has been marked as a duplicate of this bug. ***
Comment 13 Xisco Faulí 2016-10-07 16:11:18 UTC
*** Bug 89604 has been marked as a duplicate of this bug. ***
Comment 14 Xisco Faulí 2016-10-07 16:24:48 UTC
*** Bug 96650 has been marked as a duplicate of this bug. ***
Comment 15 Xisco Faulí 2017-01-22 14:21:40 UTC
*** Bug 105475 has been marked as a duplicate of this bug. ***
Comment 16 RJ Grady 2017-03-29 06:42:53 UTC
Clearly, the borders either need to be drawn with diagonal corners, or the rectangles need to be drawn inside the area, not centered on the line.
Comment 17 RJ Grady 2017-03-29 06:45:47 UTC
I just checked, and the borders of text boxes have this issue handled. What's the deal here?
Comment 18 gkorepanov.gk 2017-03-29 06:57:45 UTC
It also clear that borders shouldn't be drawn as rectangles at all, otherwise the non-trivial borders consisting at least of two lines would look ugly.
Now we have an algorithm of drawing borders with diagonal edges (as trapesoids, in particular), but it's replaced for speed purposes by 

tryDrawBorderLinePrimitive2DDirect(),

which unfortunately doesn't represent the functionality of the former in a good way (there are problems with initial one as well). Pity, now borders in LO are just in a mess, and a great deal of work should be done there.
Comment 19 Xisco Faulí 2017-04-11 15:22:46 UTC
*** Bug 107065 has been marked as a duplicate of this bug. ***
Comment 20 Thomas Lendo 2017-04-18 16:08:11 UTC
Earliest affected version changed acc. to https://bugs.documentfoundation.org/show_bug.cgi?id=107065#c3

Test file (odt, made with 5.3.1.2):
https://bugs.documentfoundation.org/attachment.cgi?id=132444

Screenshot of 3.3.0:
https://bugs.documentfoundation.org/attachment.cgi?id=132445
Comment 21 Thomas Lendo 2017-11-02 10:05:30 UTC
Created attachment 137450 [details]
Page, paragraph and table borders in 6.0.0.0.alpha1+ from 2017-10-31

Is someone working on this?

In

Version: 6.0.0.0.alpha1+ (x64)
Build ID: 13c5dd1d98a480cb01ca8f24242c80e326e4ade8
CPU threads: 8; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-10-31_01:03:30

it looks good without rectlange cut-outs in the border corners except left bottom corner of page and paragraph borders.
Comment 22 Xisco Faulí 2018-02-08 23:24:30 UTC
Hi Armin,
I guess this can be close now, isn't it ?
Comment 23 Xisco Faulí 2018-02-12 14:38:11 UTC
Fixed by the commits in https://bugs.documentfoundation.org/show_bug.cgi?id=114934
Comment 24 Thomas Lendo 2018-03-04 22:45:39 UTC
Verified with Version: 6.1.0.0.alpha0+
Build ID: e108a31a8fee09c2fa4031e45e45ed73bbdb7c6f
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-03-04_00:58:03
Locale: de-DE (de_DE.UTF-8); Calc: group
Comment 25 V Stuart Foote 2018-03-25 15:18:37 UTC
*** Bug 116612 has been marked as a duplicate of this bug. ***