[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - editeng/source
Dennis Francis (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 9 07:34:54 UTC 2021
editeng/source/editeng/impedit.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 605ac470a071ee4afbb17e75505920dbb659bb1e
Author: Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Tue May 25 10:53:22 2021 +0530
Commit: Dennis Francis <dennis.francis at collabora.com>
CommitDate: Wed Jun 9 09:34:18 2021 +0200
sc: lok: apply the previous fix for selections too
Conflicts:
editeng/source/editeng/impedit.cxx
Change-Id: Ic1f6c1642da71e0ef8c23831786ae405dda21133
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116427
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
Reviewed-by: Dennis Francis <dennis.francis at collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
(cherry picked from commit c5e249877b93e9d11788ec04fffee1dcb142a0e5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116805
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 3b329d567943..e784f564a02e 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -658,9 +658,12 @@ void ImpEditView::ImplDrawHighlightRect( OutputDevice* _pTarget, const Point& rD
{
MapUnit eDevUnit = _pTarget->GetMapMode().GetMapUnit();
tools::Rectangle aSelRect(rDocPosTopLeft, rDocPosBottomRight);
- aSelRect = mpLOKSpecialPositioning->GetWindowPos(aSelRect, eDevUnit);
- const Point aRefPoint = mpLOKSpecialPositioning->GetRefPoint();
- aSelRect.Move(-aRefPoint.X(), -aRefPoint.Y());
+ aSelRect = GetWindowPos(aSelRect);
+ Point aRefPointLogical = GetOutputArea().TopLeft();
+ // Get the relative coordinates w.r.t refpoint in display units.
+ aSelRect.Move(-aRefPointLogical.X(), -aRefPointLogical.Y());
+ // Convert from display unit to twips.
+ aSelRect = OutputDevice::LogicToLogic(aSelRect, MapMode(eDevUnit), MapMode(MapUnit::MapTwip));
tools::Polygon aTmpPoly(4);
aTmpPoly[0] = aSelRect.TopLeft();
More information about the Libreoffice-commits
mailing list