summaryrefslogtreecommitdiff
path: root/editeng/source
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-09 11:28:55 +0200
commit3a57c2b6478dfb9d5ffd3245aeafdd747afb69da (patch)
treecd56716e59ac2f1158937664db8f2aead53772d3 /editeng/source
parentd45b6561ef5a229669b50c65f15c42d47e034434 (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/+/98131 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Diffstat (limited to 'editeng/source')
-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 43165fefc1a0..e235d4eb74a4 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1277,7 +1277,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());