sw/qa/extras/layout/data/btlr-cell.odt |binary sw/qa/extras/layout/layout.cxx | 5 +++++ sw/source/core/text/inftxt.cxx | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-)
New commits: commit 4c5d0e4822dcd0c6c9397a45e3afb66d53ebaafc Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Thu Mar 21 21:05:44 2019 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Mar 22 09:02:20 2019 +0100 tdf#123943 sw btlr writing mode render: fix text portion background The text frame is swapped in this case, so handle BTLR similar to the normal vert (TBRL) case and the background will be positioned correctly behind the text portion. Change-Id: I2399131ef74ea8849577a467ad9bb02d980d8609 Reviewed-on: https://gerrit.libreoffice.org/69539 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sw/qa/extras/layout/data/btlr-cell.odt b/sw/qa/extras/layout/data/btlr-cell.odt index 17a9c19eef25..a4439218b057 100644 Binary files a/sw/qa/extras/layout/data/btlr-cell.odt and b/sw/qa/extras/layout/data/btlr-cell.odt differ diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index daca397a4d05..ea0eaac86c61 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -2817,6 +2817,11 @@ void SwLayoutWriter::testBtlrCell() assertXPath(pXmlDoc, "//textarray[1]", "x", "1915"); assertXPath(pXmlDoc, "//textarray[1]", "y", "2707"); + // Without the accompanying fix in place, this test would have failed with 'Expected: 1979; + // Actual : 2129', i.e. the gray background of the "AAA2." text was too close to the right edge + // of the text portion. Now it's exactly behind the text portion. + assertXPath(pXmlDoc, "//rect[@top='2159']", "left", "1979"); + // Without the accompanying fix in place, this test would have failed with 'Expected: 269; // Actual : 0', i.e. the AAA2 frame was not visible due to 0 width. pXmlDoc = parseLayoutDump(); diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index b18e7273672c..4fe1bf96e9bb 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -749,7 +749,7 @@ void SwTextPaintInfo::CalcRect( const SwLinePortion& rPor, else { aPoint.setX( X() ); - if ( GetTextFrame()->IsVertLR() ) + if (GetTextFrame()->IsVertLR() && !GetTextFrame()->IsVertLRBT()) aPoint.setY( Y() - rPor.Height() + rPor.GetAscent() ); else aPoint.setY( Y() - rPor.GetAscent() ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits