summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-07-23 14:24:31 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-07-24 09:30:13 +0200
commita6d01758da37af1d6bab9c14197134ce410d9408 (patch)
tree2b84641f469ad0c4b3e188f890f22ad4ab5bf66a /shell
parent80bab179b259de2d963384444b7eac4579dea06d (diff)
fdo#39812: Writer: fix collapsing merged table border painting:
Create a table with a merged cell like in the screenshot in the bug, with a SAL_DEBUG in SwTabFrmPainter::PaintLines the following lines are painted: debug: paint start 1 debug: start: 2749,1488 end: 12387,1488 2 debug: start: 2749,1945 end: 7567,1945 3 debug: start: 7567,1945 end: 12387,1945 4 debug: start: 2749,2015 end: 12387,2015 5 debug: start: 2749,2542 end: 7567,2542 6 debug: start: 7567,2542 end: 12387,2542 7 debug: start: 2749,1488 end: 2749,1945 8 debug: start: 2749,1945 end: 2749,2015 9 debug: start: 2749,2015 end: 2749,2542 A debug: start: 7567,1945 end: 7567,2542 B debug: start: 12387,1488 end: 12387,1945 C debug: start: 12387,1945 end: 12387,2015 D debug: start: 12387,2015 end: 12387,2542 debug: paint end *11111*11111* 7 B 7 B *22222*33333* 8 A C *44444*44444* 9 A D 9 A D *55555*66666* The problem is obviously that the Y coordinates of the lines 2, 3 and 4 differ; they should be on the same Y position. The problem here is that logically horizontal lines must be painted not centered but "below" the line, and It turns out that SwTabFrmPainter::Insert cannot correct the positions properly to do that, because it only looks at borders in a single cell. When using the UI to set the borders, we get (for innner table borders) only a bottom border in the cells, but no top borders, so the top position of the logically vertical borders needs to be corrected with the width of the bottom border of the cell _above_; a symmetric correction of the bottom position to the top border of the cell below is also necessary. Fortunately if we just leave the positons alone in Insert then TabFrmPainter will eliminate duplicate lines with equal positions and so it's only necessary to correct the positions when actually painting the line in wTabFrmPainter::PaintLines, where we have the neighboring lines available. (cherry picked from commit 02e80d2e431a57ad775a674eb3cfcd6cec53e09f) Change-Id: Ia8519f6673db0f3a1ecaa68038896cac39609129 Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'shell')
0 files changed, 0 insertions, 0 deletions