diff options
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index bf7ac05e868e..919873893575 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -1318,11 +1318,15 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) MapUnit eDevUnit = rOutDev.GetMapMode().GetMapUnit(); tools::Rectangle aCursorRectPureLogical(aEditCursor.TopLeft(), GetCursor()->GetSize()); - // Get rectangle in window-coordinates from editeng(doc) coordinates. - aCursorRectPureLogical = mpLOKSpecialPositioning->GetWindowPos(aCursorRectPureLogical, eDevUnit); + // Get rectangle in window-coordinates from editeng(doc) coordinates in hmm. + aCursorRectPureLogical = GetWindowPos(aCursorRectPureLogical); + Point aRefPointLogical = GetOutputArea().TopLeft(); + // Get the relative coordinates w.r.t refpoint in display hmm. + aCursorRectPureLogical.Move(-aRefPointLogical.X(), -aRefPointLogical.Y()); + // Convert to twips. + aCursorRectPureLogical = OutputDevice::LogicToLogic(aCursorRectPureLogical, MapMode(eDevUnit), MapMode(MapUnit::MapTwip)); + // "refpoint" in print twips. const Point aRefPoint = mpLOKSpecialPositioning->GetRefPoint(); - // Get the relative coordinates w.r.t rRefPoint. - aCursorRectPureLogical.Move(-aRefPoint.X(), -aRefPoint.Y()); aMessageParams.put("relrect", aCursorRectPureLogical.toString()); aMessageParams.put("refpoint", aRefPoint.toString()); } |