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

Make SetCellSelection work in pixels, and change the name accordingly.

Change-Id: Ic08f436b8196f29bb958845505a517cebba09f4b
üst 16d8839c
...@@ -331,9 +331,9 @@ public: ...@@ -331,9 +331,9 @@ public:
void LogicMouseButtonUp(const MouseEvent& rMouseEvent); void LogicMouseButtonUp(const MouseEvent& rMouseEvent);
/// Update the cell selection according to what handles have been dragged. /// Update the cell selection according to what handles have been dragged.
/// Uses the same parameteres as vcl::ITiledRenderable::setTextSelection() /// @see vcl::ITiledRenderable::setTextSelection() for the values of nType.
/// (ie. they are in twips here). /// Coordinates are in pixels.
void SetCellSelection(int nType, int nX, int nY); void SetCellSelectionPixel(int nType, int nPixelX, int nPixelY);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE; virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE;
......
...@@ -598,7 +598,7 @@ void ScModelObj::setTextSelection(int nType, int nX, int nY) ...@@ -598,7 +598,7 @@ void ScModelObj::setTextSelection(int nType, int nX, int nY)
if (!pGridWindow) if (!pGridWindow)
return; return;
pGridWindow->SetCellSelection(nType, nX, nY); pGridWindow->SetCellSelectionPixel(nType, nX * pViewData->GetPPTX(), nY * pViewData->GetPPTY());
} }
} }
......
...@@ -991,7 +991,7 @@ void ScGridWindow::LogicInvalidate(const Rectangle* pRectangle) ...@@ -991,7 +991,7 @@ void ScGridWindow::LogicInvalidate(const Rectangle* pRectangle)
pViewData->GetDocument()->GetDrawLayer()->libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr()); pViewData->GetDocument()->GetDrawLayer()->libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr());
} }
void ScGridWindow::SetCellSelection(int nType, int nX, int nY) void ScGridWindow::SetCellSelectionPixel(int nType, int nPixelX, int nPixelY)
{ {
ScTabView* pTabView = pViewData->GetView(); ScTabView* pTabView = pViewData->GetView();
...@@ -1020,7 +1020,7 @@ void ScGridWindow::SetCellSelection(int nType, int nX, int nY) ...@@ -1020,7 +1020,7 @@ void ScGridWindow::SetCellSelection(int nType, int nX, int nY)
SCsCOL nNewPosX; SCsCOL nNewPosX;
SCsROW nNewPosY; SCsROW nNewPosY;
SCTAB nTab = pViewData->GetTabNo(); SCTAB nTab = pViewData->GetTabNo();
pViewData->GetPosFromPixel(nX * pViewData->GetPPTX(), nY * pViewData->GetPPTY(), eWhich, nNewPosX, nNewPosY); pViewData->GetPosFromPixel(nPixelX, nPixelY, eWhich, nNewPosX, nNewPosY);
// change the selection // change the selection
switch (nType) switch (nType)
......
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