Kaydet (Commit) efbf462e authored tarafından Jan Holesovsky's avatar Jan Holesovsky Kaydeden (comit) Miklos Vajna

sc tiled editing: Implement moving of the selection handles.

Change-Id: I724f1693a03194426dfe233c1be08f1fbec1242d
üst c14a2662
......@@ -394,6 +394,9 @@ public:
/// @see vcl::ITiledRenderable::postMouseEvent().
virtual void postMouseEvent(int nType, int nX, int nY, int nCount) SAL_OVERRIDE;
/// @see vcl::ITiledRenderable::setTextSelection().
virtual void setTextSelection(int nType, int nX, int nY) SAL_OVERRIDE;
/// @see vcl::ITiledRenderable::initializeForTiledRendering().
virtual void initializeForTiledRendering() SAL_OVERRIDE;
};
......
......@@ -20,6 +20,7 @@
#include <config_features.h>
#include "scitems.hxx"
#include <editeng/editview.hxx>
#include <svx/fmdpage.hxx>
#include <svx/fmview.hxx>
#include <svx/svditer.hxx>
......@@ -81,6 +82,7 @@
#include "formulagroup.hxx"
#include "gridwin.hxx"
#include "hints.hxx"
#include <inputhdl.hxx>
#include <inputopt.hxx>
#include "interpre.hxx"
#include "linkuno.hxx"
......@@ -555,6 +557,38 @@ void ScModelObj::postMouseEvent(int nType, int nX, int nY, int nCount)
}
}
void ScModelObj::setTextSelection(int nType, int nX, int nY)
{
SolarMutexGuard aGuard;
ScViewData* pViewData = ScDocShell::GetViewData();
ScInputHandler* pInputHandler = SC_MOD()->GetInputHdl(pViewData->GetViewShell());
if (!pInputHandler)
return;
EditView* pTableView = pInputHandler->GetTableView();
if (!pTableView)
return;
Point aPoint(convertTwipToMm100(nX), convertTwipToMm100(nY));
switch (nType)
{
case LOK_SETTEXTSELECTION_START:
pTableView->SetCursorLogicPosition(aPoint, /*bPoint=*/false, /*bClearMark=*/false);
break;
case LOK_SETTEXTSELECTION_END:
pTableView->SetCursorLogicPosition(aPoint, /*bPoint=*/true, /*bClearMark=*/false);
break;
case LOK_SETTEXTSELECTION_RESET:
pTableView->SetCursorLogicPosition(aPoint, /*bPoint=*/true, /*bClearMark=*/true);
break;
default:
assert(false);
break;
}
}
void ScModelObj::initializeForTiledRendering()
{
SolarMutexGuard aGuard;
......
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