diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2022-02-14 18:29:03 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-02-18 12:35:41 +0100 |
commit | 86fe9bba1e6f8640a48ca8c4a6955021254b6bec (patch) | |
tree | 37f5da516e0a4c226e2db6217ba286f7a68a8b07 /editeng | |
parent | 650b2d6a8c16db3ab2930177484e2f43b29a8dec (diff) |
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.heinisch@yahoo.de>
(cherry picked from commit 7c00544d672f0fc0f08c12f5fd9cd53fdbe96733)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129935
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index a0e4eb43b913..19d942eeb911 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) { |