editeng/source/editeng/impedit3.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 7c00544d672f0fc0f08c12f5fd9cd53fdbe96733 Author: Andreas Heinisch <andreas.heini...@yahoo.de> AuthorDate: Mon Feb 14 18:29:03 2022 +0100 Commit: Andreas Heinisch <andreas.heini...@yahoo.de> CommitDate: Tue Feb 15 12:27:40 2022 +0100 tdf#143709 - Create repaint rectangle with the old text size Otherwise, the repaint rectangle uses the new text size, which may lead to visual artifacts, if the old text size exceeds the new one. Change-Id: I9b49755bf6b8c453e319e2a4081d58bf2e433cd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129920 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heini...@yahoo.de> diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index d8c7419ca2ea..4bff8d26c94d 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -425,7 +425,11 @@ void ImpEditEngine::FormatDoc() tools::Long nNewHeight = CalcTextHeight(&nNewHeightNTP); tools::Long nDiff = nNewHeight - nCurTextHeight; if ( nDiff ) + { + aInvalidRect.Union(tools::Rectangle::Justify( + { 0, nNewHeight }, { getWidthDirectionAware(aPaperSize), nCurTextHeight })); aStatus.GetStatusWord() |= !IsEffectivelyVertical() ? EditStatusFlags::TextHeightChanged : EditStatusFlags::TEXTWIDTHCHANGED; + } nCurTextHeight = nNewHeight; nCurTextHeightNTP = nNewHeightNTP; @@ -450,10 +454,6 @@ void ImpEditEngine::FormatDoc() } } - if (nDiff) - aInvalidRect.Union(tools::Rectangle::Justify( - { 0, nNewHeight }, { getWidthDirectionAware(aPaperSize), nCurTextHeight })); - if (!aRepaintParas.empty()) { auto CombineRepaintParasAreas = [&](const LineAreaInfo& rInfo) {