Kaydet (Commit) 97ea96fe authored tarafından Miklos Vajna's avatar Miklos Vajna

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
üst f9c9f57e
......@@ -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());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment