Bug 113751 - Borders for Merged Cells are Partially Shown
Summary: Borders for Merged Cells are Partially Shown
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha1+
Hardware: All Linux (All)
: medium normal
Assignee: Armin Le Grand (CIB)
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
: 114402 115091 115240 (view as bug list)
Depends on:
Blocks: Cell-Border borderline-regressions
  Show dependency treegraph
 
Reported: 2017-11-10 08:59 UTC by Kevin Suo
Modified: 2018-02-06 18:31 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
sample (7.58 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-11-12 17:38 UTC, Xisco Faulí
Details
screenshot (5.21 KB, image/png)
2017-11-29 13:45 UTC, Kevin Suo
Details
merged-cell-border.ods (8.14 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-12-13 04:12 UTC, Kevin Suo
Details
merged-cell-border.pdf (13.52 KB, application/pdf)
2017-12-13 04:14 UTC, Kevin Suo
Details
merged-cell-border-good.pdf (in libreoffice5.4) (12.58 KB, application/pdf)
2017-12-13 04:16 UTC, Kevin Suo
Details
screenshot (85.96 KB, image/png)
2018-01-03 15:25 UTC, Kevin Suo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Suo 2017-11-10 08:59:58 UTC
In Calc, borders for merged cells are partially shown.

Steps:
1. Apply 0.75pt borders to range C4:J27.
2. Merge cells C8:C13, and E8:J18.
3. Scroll up and down.

Result: 
A portion of the merged cell borders are not showing.

Version: 6.0.0 alpha 1 on master updated today.
Both in Ubuntu 17.10 and Fedora 26 x64.
Comment 1 Xavier Van Wijmeersch 2017-11-10 10:04:47 UTC
I confirm with

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

Ok with

Version: 5.4.4.0.0+
Build ID: 1649d5dfaca6fb29e75bd18e3e0d4f985a9eebeb
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group
Comment 2 Kevin Suo 2017-11-10 10:10:39 UTC
This is a regression, I am doing the bibisecting.
Comment 3 Kevin Suo 2017-11-10 10:15:38 UTC Comment hidden (obsolete)
Comment 4 Xisco Faulí 2017-11-12 17:38:01 UTC
Created attachment 137698 [details]
sample
Comment 5 Xisco Faulí 2017-11-12 17:42:32 UTC
Regression introduced by:

author	Armin Le Grand <Armin.Le.Grand@cib.de>	2017-08-30 18:40:32 (GMT)
committer	Armin Le Grand <Armin.Le.Grand@cib.de>	2017-09-15 10:58:03 (GMT)
commit	a9c59cbfb9e16469b389db0b4d6befe196d0e2a0 (patch)
tree	a031682ae21ec46bb9c6e1e30b0110213e8e3dac
parent	fe14ddf25003c0f79f9f8a249bc22d45f57a0068 (diff)
borderline: Preparing further to use CellCoordinateSystem
Multiple cleanups, made svx::frame::Style a std::shared_ptr class,
preparing basing all border stuff on transformations, so it will
need a CellCoordinateSystem. Added stuff to get this Coordinate
System from the svx::frame::Cell using the Frame and knowledge
about ownerships

Bisected with: bibisect-linux64-6.0

Adding Cc: to Armin Le Grand
Comment 6 Armin Le Grand (CIB) 2017-11-29 08:43:34 UTC
Took a look, which 'portion of the cell borders' is not shown?
This is not precise enough to get a clear picture what might be wrong, please give more information. (PS: CTRL+SHIFT+R is repaint in calc, there might still be calc-specific scroll/repaint issues)
Comment 7 Kevin Suo 2017-11-29 13:45:45 UTC
Created attachment 138064 [details]
screenshot

In the screenshot, the left-bottom part of the borders for merged cells are missing.
Comment 8 Kevin Suo 2017-12-13 04:12:26 UTC
Created attachment 138404 [details]
merged-cell-border.ods

The new test document with corner cases
Comment 9 Kevin Suo 2017-12-13 04:14:38 UTC
Created attachment 138405 [details]
merged-cell-border.pdf

The worse thing is that, the borders are broken also in exported pdf pages.
And, if the first column contains merged cell and the merge continues to next page, the borders are not rendered correctly (falls to the bottom of the page)
Comment 10 Kevin Suo 2017-12-13 04:16:32 UTC
Created attachment 138406 [details]
merged-cell-border-good.pdf (in libreoffice5.4)

This is the expected result.
Comment 11 Armin Le Grand (CIB) 2017-12-21 15:01:08 UTC
So there is too much shown, not something missing? Plus some borders being too wide (2px as it looks?). Assuming comment 10 shows the correct, comment 9 shows the wrong (and current?) result. This was not completely clear, esp. as orig description states 'A portion of the merged cell borders are not showing'. Please correct when I'm wrong, just want to be 100% sure what the error is here.
Comment 12 Kevin Suo 2018-01-03 15:23:01 UTC
(In reply to Armin Le Grand (CIB) from comment #11)
So there may be two different issues here. Let's focus on the issue as described in the original report here.

Steps:
1. Apply borders to range C4:J27.
2. Merge cells C8:C13, and E8:J18.
3. Scroll up and down.

Result: 
A portion of the merged cell borders are not showing.

Expected:
All borders shown.
Comment 13 Kevin Suo 2018-01-03 15:25:05 UTC
Created attachment 138855 [details]
screenshot

Still reproducible in:

Version: 6.1.0.0.alpha0+
Build ID: 6a29d733651eb307ee8a6c3cf1bc64579070e53a
CPU threads: 4; OS: Linux 4.14; UI render: default; VCL: gtk3; 
Locale: zh-CN (zh_CN.UTF-8); Calc: group threaded

Fedora 27.
Comment 14 Armin Le Grand (CIB) 2018-01-11 15:28:45 UTC
Compared with local installed Version: 5.1.5.2 (x64), indeed there all merged cell borders get shown always, so there seems to be a regression. The example is too huge for debugging, I will try to create a minimal example. BTW, the definitions are correct, it is only a repaint error (as CTRL+SHIFT+R shows). Print, PDFexport seem to merge cell borders 'over' page boundaries, need to check that, too.
Thus, trying to find a minimal example...
Comment 15 Armin Le Grand (CIB) 2018-01-12 10:20:31 UTC
Could reproduce with much smaller cells. Problem seems to have to do with scrolling in merged cells when top-left is not visible in that in-between state. Then merged cells seem not to handle their merged borders correctly - they assume that it's handled from the start cells (leftmost, topmost). If that one is not shown in that in-between state, there may be a problem.
Comment 16 raal 2018-01-18 17:52:06 UTC
*** Bug 115091 has been marked as a duplicate of this bug. ***
Comment 17 Xisco Faulí 2018-01-26 11:20:01 UTC
*** Bug 115240 has been marked as a duplicate of this bug. ***
Comment 18 Xisco Faulí 2018-01-29 11:14:36 UTC
Fixed in

Version: 6.1.0.0.alpha0+
Build ID: 75802ae40ae67737ae9e4f1a38434e0587affff6
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

@Armin, could you please close this as RESOLVED FIXED ?
Comment 19 Xisco Faulí 2018-01-30 00:30:53 UTC
*** Bug 114402 has been marked as a duplicate of this bug. ***
Comment 20 Armin Le Grand (CIB) 2018-02-06 18:31:00 UTC
Fixed with changes for tdf#114934, see there