summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2023-06-26 11:18:58 +0300
committerMichael Stahl <michael.stahl@allotropia.de>2023-06-27 11:17:06 +0200
commit83155f319f46dc348f6f90b23e816f87e80e65e1 (patch)
tree27170979181ad28bfbe5b030032360c13e3e8da6 /svx
parent60e842da3ec3b48b715d9793a3cdeff76efa4152 (diff)
tdf#156050: Fix how misspelling line is calculated for RTL text
Partially revert: commit 74b6c5ea3c333de7c5e7ef8636732edadd9083f2 Author: Khaled Hosny <khaled@libreoffice.org> Date: Thu Jun 8 16:41:18 2023 +0300 tdf#151968: Fix vertical position of RTL spelling wavy line Instead of changing how fStart and fEnd are calculated, calculate them like before then swap them. This seems to be more reliable, and matches what we do in Writer. Change-Id: Ia15408881666a86151a12fcf016cc81c1568f7e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153572 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org> (cherry picked from commit 2ef138de767c312188d41a7f206234eafac3108b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153597 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 6d9d5cd9d5f8..0955a8b23604 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -427,12 +427,14 @@ namespace
// full portion width
const double fTextWidth(aDXArray[aDXArray.size() - 1]);
+ fStart = fTextWidth - fStart;
+ fEnd = fTextWidth - fEnd;
+
// tdf#151968
// if start < end, OutputDevice::DrawWaveLine() will
// think it is a rotated line, so we swap fStart and
// fEnd to avoid this.
- fStart = fTextWidth - fEnd;
- fEnd = fTextWidth - fStart;
+ std::swap(fStart, fEnd);
}
// need to take FontScaling out of values; it's already part of