summaryrefslogtreecommitdiff
path: root/sw/source/uibase/docvw/edtwin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/docvw/edtwin.cxx')
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 6666249466da..bb592175fde4 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -6256,4 +6256,18 @@ void SwEditWin::LogicMouseButtonUp(const MouseEvent& rMouseEvent)
MouseButtonUp(rMouseEvent);
}
+void SwEditWin::SetCursorLogicPosition(bool bPoint, const Point& rPosition)
+{
+ // Not an SwWrtShell, as that would make SwCrsrShell::GetCrsr() inaccessible.
+ SwEditShell& rShell = m_rView.GetWrtShell();
+ SwMvContext aMvContext(&rShell);
+ // If the mark is to be updated, then exchange the point and mark before
+ // and after, as we can't easily set the mark.
+ if (!bPoint)
+ rShell.GetCrsr()->Exchange();
+ rShell.SetCrsr(rPosition);
+ if (!bPoint)
+ rShell.GetCrsr()->Exchange();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */