[REVIEW][3-6-0] Re: [PATCH] Change in core[libreoffice-3-6]: fdo#39812: Writer: fix collapsing merged table border painti...

Michael Stahl mstahl at redhat.com
Tue Jul 24 02:21:56 PDT 2012


i'm trying to push this to gerrit libreoffice-3-6-0, but git-review
warns me that it wants to push not 1 but ~10 patches; apparently the
libreoffice-3-6-0 branch on gerrit is not automatically updated?

anyway, asking for 2 more reviews here.

see also the other border patch that is on gerrit and also needs 2 more
reviews:

https://gerrit.libreoffice.org/#/c/335/

On 23/07/12 14:53, Gerrit wrote:
>>From Michael Stahl <mstahl at redhat.com>:
> 
> Michael Stahl has uploaded a new change for review.
> 
> Change subject: fdo#39812: Writer: fix collapsing merged table border painting:
> .......................................................................
> 
> 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.
> 
> Change-Id: Ia8519f6673db0f3a1ecaa68038896cac39609129
> (cherry picked from commit 02e80d2e431a57ad775a674eb3cfcd6cec53e09f)
> ---
> M sw/source/core/layout/paintfrm.cxx
> 1 file changed, 26 insertions(+), 13 deletions(-)
> 
> 
>   git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/41/341/1
> --
> To view, visit https://gerrit.libreoffice.org/341
> To unsubscribe, visit https://gerrit.libreoffice.org/settings
> 
> Gerrit-MessageType: newchange
> Gerrit-Change-Id: Ia8519f6673db0f3a1ecaa68038896cac39609129
> Gerrit-PatchSet: 1
> Gerrit-Project: core
> Gerrit-Branch: libreoffice-3-6
> Gerrit-Owner: Michael Stahl <mstahl at redhat.com>
> 





More information about the LibreOffice mailing list