Kaydet (Commit) 4c5d0e48 authored tarafından Miklos Vajna's avatar Miklos Vajna

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: 's avatarMiklos Vajna <vmiklos@collabora.com>
üst 9b1ae71e
......@@ -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();
......
......@@ -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() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment