summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2020-06-05 18:10:12 +0530
committerDennis Francis <dennis.francis@collabora.com>2020-07-06 17:45:21 +0200
commit1a6642319631e50c83564de453298930e1f5b17a (patch)
tree8abff4cd3b4a8c78593d2815ae9a59fd08d3391f /editeng
parente02bd1b5aa22c463fbb985df546edc94e63a7c98 (diff)
scPrintTwipsMsgs: Use top-left of output-area as the refpoint
We can't use the transformed version of editeng origin, since it need not be in client view area depending on text alignment, which is unusable as far as the clients are concerned. Top-left corner of output-area is always guaranteed to be in client view area independent of text-alignment settings. Change-Id: I5bd20d2b52e146371de4b605bf7934b7e7d6fc5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98067 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index ed2c8d43bf9c..8f4be0685c0c 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1281,7 +1281,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
// Get rectangle in window-coordinates from editeng(doc) coordinates.
aCursorRectPureLogical = mpLOKSpecialPositioning->GetWindowPos(aCursorRectPureLogical, eDevUnit);
// Lets use the editeng(doc) origin as the refpoint.
- const Point aCursorOrigin = mpLOKSpecialPositioning->GetWindowPos(Point(0, 0), eDevUnit);
+ const Point aCursorOrigin = mpLOKSpecialPositioning->GetOutputArea().TopLeft();
// Get the relative coordinates w.r.t aCursorOrigin.
aCursorRectPureLogical.Move(-aCursorOrigin.X(), -aCursorOrigin.Y());
aMessageParams.put("relrect", aCursorRectPureLogical.toString());