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

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
üst 1f129c82
...@@ -1320,4 +1320,9 @@ Selection EditView::GetSurroundingTextSelection() const ...@@ -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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -250,6 +250,8 @@ public: ...@@ -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::XSpellChecker1 > xSpell,
com::sun::star::uno::Reference< com::sun::star::linguistic2::XLanguageGuessing > xLangGuess, com::sun::star::uno::Reference< com::sun::star::linguistic2::XLanguageGuessing > xLangGuess,
bool bIsParaText ); 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 #endif // INCLUDED_EDITENG_EDITVIEW_HXX
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
#include <svx/svdhdl.hxx> #include <svx/svdhdl.hxx>
#include <svx/svdoutl.hxx> #include <svx/svdoutl.hxx>
#include <editeng/editeng.hxx> #include <editeng/editeng.hxx>
#include <editeng/editview.hxx>
#include <editeng/svxacorr.hxx> #include <editeng/svxacorr.hxx>
#include <editeng/scripttypeitem.hxx> #include <editeng/scripttypeitem.hxx>
#include <editeng/flditem.hxx> #include <editeng/flditem.hxx>
...@@ -6268,6 +6269,17 @@ void SwEditWin::LogicMouseButtonUp(const MouseEvent& rMouseEvent) ...@@ -6268,6 +6269,17 @@ void SwEditWin::LogicMouseButtonUp(const MouseEvent& rMouseEvent)
void SwEditWin::SetCursorLogicPosition(const Point& rPosition, bool bPoint, bool bClearMark) 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. // Not an SwWrtShell, as that would make SwCrsrShell::GetCrsr() inaccessible.
SwEditShell& rShell = m_rView.GetWrtShell(); SwEditShell& rShell = m_rView.GetWrtShell();
SwMvContext aMvContext(&rShell); SwMvContext aMvContext(&rShell);
......
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