|author||Miklos Vajna <firstname.lastname@example.org>||2020-03-09 22:11:35 +0100|
|committer||Miklos Vajna <email@example.com>||2020-03-10 09:28:24 +0100|
tdf#128880 sw btlr: fix SwFrame::GetPaintArea() for the row span case
To be specific, this focuses on the case where a single cell has btlr direction, but the containing row does not, and there is a row span. The old code that took the logical right of the cell frame served two purposes, it seems to me: - in the rare case where the 1st row is wider then a subsequent row, we make sure that as the cell frame is expanded downwards, we're still inside the table polygon - in the tb-rl ("Japanese") case, the logical right maps to physical bottom, and this way the cell frame is OK to render not only into its own row frame, but can expand also downwards. Given that btlr maps left to bottom, this mechanism is broken there. Be consistent with the working tbrl case, so just expand towards the logical left in the btlr case. The rest of the changes just make sure that SwAttrHandler::FontChg() calls SwFont::SetVertical() with the correct bVertLayoutLRBT parameter, which instantly fixes the actual position of the text. Change-Id: I9032e7c6de72cec704843f3aae3c7848e139ebfa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90241 Tested-by: Jenkins Reviewed-by: Miklos Vajna <firstname.lastname@example.org>
Diffstat (limited to 'sw/source/core/layout/ssfrm.cxx')
1 files changed, 13 insertions, 1 deletions
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 1de1f32aa394..1a92144a5583 100644
@@ -607,7 +607,19 @@ SwRect SwFrame::GetPaintArea() const
if( pTmp->IsVertical() )
nTmpLeft = (pNxt->getFrameArea().*fnRect->fnGetLeft)();
- nTmpRight = (pNxt->getFrameArea().*fnRect->fnGetRight)();
+ // pTmp is a row frame, but it's not vertical.
+ if (IsVertLRBT())
+ // This frame cell is OK to expand towards the physical down direction.
+ // Physical down is left.
+ nTmpLeft = (pNxt->getFrameArea().*fnRect->fnGetLeft)();
+ nTmpRight = (pNxt->getFrameArea().*fnRect->fnGetRight)();
OSL_ENSURE( pTmp, "GetPaintArea lost in time and space" );
if( pTmp->IsPageFrame() || pTmp->IsFlyFrame() ||