summaryrefslogtreecommitdiff
path: root/editeng/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-03-20 14:12:57 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-23 09:19:06 +0100
commit97ea96fed5a189e59982f97f57119938448296e2 (patch)
tree8b0b63dc55cc4eaab664c0a9bf4949904ab4b088 /editeng/source
parentf9c9f57e6901ce6a55a153962d0852324d9cadcf (diff)
ImpEditView::ShowCursor: don't assume map mode is twips
This makes the blinking cursor appear at the expected position in Impress when editing shape text. Change-Id: I71ad9d10f40f1ae290dc235ae26072955af84a2d
Diffstat (limited to 'editeng/source')
-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 8435e0d8bd29..574cfd43fd87 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -920,6 +920,13 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16
{
const Point& rPos = GetCursor()->GetPos();
Rectangle aRect(rPos.getX(), rPos.getY(), rPos.getX() + GetCursor()->GetWidth(), rPos.getY() + GetCursor()->GetHeight());
+
+ // LOK output is always in twips, convert from mm100 if necessary.
+ if (pOutWin->IsMapModeEnabled() && pOutWin->GetMapMode().GetMapUnit() == MAP_100TH_MM)
+ aRect = OutputDevice::LogicToLogic(aRect, MAP_100TH_MM, MAP_TWIP);
+ // Let the LOK client decide the cursor width.
+ aRect.setWidth(0);
+
OString sRect = aRect.toString();
libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, sRect.getStr());
}