summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2022-02-14 18:29:03 +0100
committerAndreas Heinisch <andreas.heinisch@yahoo.de>2022-02-15 12:27:40 +0100
commit7c00544d672f0fc0f08c12f5fd9cd53fdbe96733 (patch)
treed92735d84de73fa24ca232c7a748b018415edd0d /editeng
parent5f21eaa0e6b689233336cacc949b9a55d545088f (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>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit3.cxx8
1 files changed, 4 insertions, 4 deletions
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) {