|
|
135360 |
From 81c5808af3987e81f571e0436d04a6a96ccf19ca Mon Sep 17 00:00:00 2001
|
|
|
135360 |
From: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
|
135360 |
Date: Fri, 13 Nov 2015 11:33:43 +0100
|
|
|
135360 |
Subject: [PATCH 322/398] editeng lok: respect origin of map mode for
|
|
|
135360 |
INVALIDATE_VISIBLE_CURSOR
|
|
|
135360 |
|
|
|
135360 |
Writer comments are separate widgets, but we want to have coordinates in
|
|
|
135360 |
absolutes twips, so give Writer a chance to inform us about the delta.
|
|
|
135360 |
|
|
|
135360 |
For now only do this in case the map unit is twips, as Impress sets the
|
|
|
135360 |
origin already.
|
|
|
135360 |
|
|
|
135360 |
Change-Id: Idf340944165e44b0888c00965d6be7798712ff76
|
|
|
135360 |
(cherry picked from commit e988ab84f1c32519bfca758086c749ba98a5a85f)
|
|
|
135360 |
---
|
|
|
135360 |
editeng/source/editeng/impedit.cxx | 7 +++++++
|
|
|
135360 |
1 file changed, 7 insertions(+)
|
|
|
135360 |
|
|
|
135360 |
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
|
|
|
135360 |
index f7e2886c0524..8038ac6d3d41 100644
|
|
|
135360 |
--- a/editeng/source/editeng/impedit.cxx
|
|
|
135360 |
+++ b/editeng/source/editeng/impedit.cxx
|
|
|
135360 |
@@ -947,6 +947,13 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16
|
|
|
135360 |
// LOK output is always in twips, convert from mm100 if necessary.
|
|
|
135360 |
if (pOutWin->GetMapMode().GetMapUnit() == MAP_100TH_MM)
|
|
|
135360 |
aRect = OutputDevice::LogicToLogic(aRect, MAP_100TH_MM, MAP_TWIP);
|
|
|
135360 |
+ else if (pOutWin->GetMapMode().GetMapUnit() == MAP_TWIP)
|
|
|
135360 |
+ {
|
|
|
135360 |
+ // Writer comments: they use editeng, but are separate widgets.
|
|
|
135360 |
+ Point aOrigin = pOutWin->GetMapMode().GetOrigin();
|
|
|
135360 |
+ // Move the rectangle, so that we output absolute twips.
|
|
|
135360 |
+ aRect.Move(aOrigin.getX(), aOrigin.getY());
|
|
|
135360 |
+ }
|
|
|
135360 |
// Let the LOK client decide the cursor width.
|
|
|
135360 |
aRect.setWidth(0);
|
|
|
135360 |
|
|
|
135360 |
--
|
|
|
135360 |
2.12.0
|
|
|
135360 |
|