editeng/source/editeng/editview.cxx | 5 +++++ include/editeng/editview.hxx | 2 ++ sw/source/uibase/docvw/edtwin.cxx | 12 ++++++++++++ 3 files changed, 19 insertions(+)
New commits: commit 6e6eac5c5126d196d3ef6f0e1ef6a43b5ebd5286 Author: Miklos Vajna <[email protected]> Date: Tue Mar 17 11:22:07 2015 +0100 editeng tiled rendering: implement drag of the middle selection handle With this, it's possible to drag the middle selection handle of editeng text (e.g. Writer shape text) and the cursor position will be updated accordingly. Change-Id: I2b03c8543efca477f2e377f3bb93732cd1775f81 diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 684e7de..db3b6cf 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -1320,4 +1320,9 @@ Selection EditView::GetSurroundingTextSelection() const } } +void EditView::SetCursorLogicPosition(const Point& rPosition, bool /*bPoint*/, bool /*bClearMark*/) +{ + pImpEditView->SetCursorAtPoint(rPosition); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index 3e70126..a1d05ef 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -250,6 +250,8 @@ public: com::sun::star::uno::Reference< com::sun::star::linguistic2::XSpellChecker1 > xSpell, com::sun::star::uno::Reference< com::sun::star::linguistic2::XLanguageGuessing > xLangGuess, bool bIsParaText ); + /// Allows adjusting the point or mark of the selection to a document coordinate. + void SetCursorLogicPosition(const Point& rPosition, bool bPoint, bool bClearMark); }; #endif // INCLUDED_EDITENG_EDITVIEW_HXX diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index ca6dd8b..7e74b90 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -54,6 +54,7 @@ #include <svx/svdhdl.hxx> #include <svx/svdoutl.hxx> #include <editeng/editeng.hxx> +#include <editeng/editview.hxx> #include <editeng/svxacorr.hxx> #include <editeng/scripttypeitem.hxx> #include <editeng/flditem.hxx> @@ -6269,6 +6270,17 @@ void SwEditWin::LogicMouseButtonUp(const MouseEvent& rMouseEvent) void SwEditWin::SetCursorLogicPosition(const Point& rPosition, bool bPoint, bool bClearMark) { + if (SdrView* pSdrView = m_rView.GetWrtShell().GetDrawView()) + { + // Editing shape text, then route the call to editeng. + if (pSdrView->GetTextEditObject()) + { + EditView& rEditView = pSdrView->GetTextEditOutlinerView()->GetEditView(); + rEditView.SetCursorLogicPosition(rPosition, bPoint, bClearMark); + return; + } + } + // Not an SwWrtShell, as that would make SwCrsrShell::GetCrsr() inaccessible. SwEditShell& rShell = m_rView.GetWrtShell(); SwMvContext aMvContext(&rShell); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
