diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-05-03 14:14:26 +0500 |
---|---|---|
committer | Aron Budea <aron.budea@collabora.com> | 2024-05-08 08:13:32 +0200 |
commit | 5140abd2c94b96f2a32f0f7416ae79239a2af187 (patch) | |
tree | b7aed4a9e397c1f97d3d83294910ffaaf5d54236 /editeng | |
parent | dcd9cf8d045a43f187067c5d709505b1ec382f9c (diff) |
tdf#152906: use correct Y offset
GetEditCursor now returns the position relative to the line, not
to the whole text. In ImpEditEngine::CreateLines, its use wasn't
fixed, and so the Y position of all lines in the calculation was
the same, thus adjusting to the same contour's horizontal stripe.
Change-Id: I16362bab47f3064281eefb45a12834d836a8ada3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167042
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167188
(cherry picked from commit 9f5664f4d34e8f04cc18dc252cad4b3b853db882)
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 464e9ed07550..32875bd76f0b 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -929,7 +929,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) { GetTextRanger()->SetVertical( IsEffectivelyVertical() ); - tools::Long nTextY = nStartPosY + GetEditCursor( pParaPortion, pLine, pLine->GetStart(), GetCursorFlags::NONE ).Top(); + tools::Long nTextY = nCurrentPosY + GetEditCursor( pParaPortion, pLine, pLine->GetStart(), GetCursorFlags::NONE ).Top(); if ( !bSameLineAgain ) { SeekCursor( pNode, nTmpPos+1, aTmpFont ); |