sw/source/core/text/itrcrsr.cxx | 1 + 1 file changed, 1 insertion(+) New commits: commit 8ac6428e4805cc34683595c4d239f0688e0ea9bf Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Wed Aug 9 20:15:51 2023 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Thu Aug 10 06:53:36 2023 +0200
tdf#120715: handle LOK case Commit 690d4eb71509649ad147cfe60f5b97e2cfaaa519 fixed the two problems of wrong paragraph mark position and wrong cursor position, calling AddExtraBlankWidth from SwTextPainter::DrawTextLine. Since this function is called before calculating cursor position in desktop case, this fixed them both: SwCursorShell::EndAction calls SwViewShell::EndAction before UpdateCursor; the former calls ImplEndAction, and in it, PaintSwFrame is called when not in LOK mode. But in LOK mode, PaintSwFrame is not called until SwViewShell::PaintTile runs in a later request; thus, UpdateCursor operated on unadjusted data. The cursor position arrived wrong, but the paragraph mark was painted OK when tiles were rendered. To avoid dependency on the call order, also call AddExtraBlankWidth from SwTextCursor::GetCharRect, which is called inside UpdateCursor. Change-Id: I0984d7c6235a7f2573f9fa8b7ed0cefee5747658 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155531 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> (cherry picked from commit 4aa3cfda7a6007867eba922a1b549471cbced425) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155479 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx index 47befa14d008..3f0ed590cae1 100644 --- a/sw/source/core/text/itrcrsr.cxx +++ b/sw/source/core/text/itrcrsr.cxx @@ -1251,6 +1251,7 @@ void SwTextCursor::GetCharRect( SwRect* pOrig, TextFrameIndex const nOfst, // If necessary, as catch up, do the adjustment GetAdjusted(); + AddExtraBlankWidth(); const Point aCharPos( GetTopLeft() );