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

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
üst 9c7d3345
...@@ -945,6 +945,13 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16 ...@@ -945,6 +945,13 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16
// LOK output is always in twips, convert from mm100 if necessary. // LOK output is always in twips, convert from mm100 if necessary.
if (pOutWin->GetMapMode().GetMapUnit() == MAP_100TH_MM) if (pOutWin->GetMapMode().GetMapUnit() == MAP_100TH_MM)
aRect = OutputDevice::LogicToLogic(aRect, MAP_100TH_MM, MAP_TWIP); 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. // Let the LOK client decide the cursor width.
aRect.setWidth(0); aRect.setWidth(0);
......
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