summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-11-13 11:33:43 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-11-16 11:38:25 +0100
commit739dad1e67468a256c1d0e15e4e99d055668a1b1 (patch)
tree5ac7c673050d303bae971c1f5895b9e1849e7d25 /editeng
parent8d3c71815d897cd1baa82b23ffc6e38edbdd7e9d (diff)
editeng lok: respect origin of map mode for INVALIDATE_VISIBLE_CURSOR
Writer comments are separate widgets, but we want to have coordinates in absolutes twips, so give Writer a chance to inform us about the delta. For now only do this in case the map unit is twips, as Impress sets the origin already. Change-Id: Idf340944165e44b0888c00965d6be7798712ff76 (cherry picked from commit e988ab84f1c32519bfca758086c749ba98a5a85f)
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index f78cfab12566..19a9bb2294c1 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -946,6 +946,13 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16
// LOK output is always in twips, convert from mm100 if necessary.
if (pOutWin->GetMapMode().GetMapUnit() == MAP_100TH_MM)
aRect = OutputDevice::LogicToLogic(aRect, MAP_100TH_MM, MAP_TWIP);
+ else if (pOutWin->GetMapMode().GetMapUnit() == MAP_TWIP)
+ {
+ // Writer comments: they use editeng, but are separate widgets.
+ Point aOrigin = pOutWin->GetMapMode().GetOrigin();
+ // Move the rectangle, so that we output absolute twips.
+ aRect.Move(aOrigin.getX(), aOrigin.getY());
+ }
// Let the LOK client decide the cursor width.
aRect.setWidth(0);