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

sc: No need for a special LogicMouseButtonUp/Down.

They were not in logic units but in pixels anyway.

Change-Id: I5b6cea13b84659c3404b38b9a19c091b41ccd3c4
üst 3aed864e
......@@ -324,12 +324,6 @@ public:
/// @see OutputDevice::LogicInvalidate().
void LogicInvalidate(const Rectangle* pRectangle) SAL_OVERRIDE;
/// Same as MouseButtonDown(), but coordinates are in logic unit.
void LogicMouseButtonDown(const MouseEvent& rMouseEvent);
/// Same as MouseButtonUp(), but coordinates are in logic unit.
void LogicMouseButtonUp(const MouseEvent& rMouseEvent);
/// Update the cell selection according to what handles have been dragged.
/// @see vcl::ITiledRenderable::setTextSelection() for the values of nType.
/// Coordinates are in pixels.
......
......@@ -545,10 +545,16 @@ void ScModelObj::postMouseEvent(int nType, int nX, int nY, int nCount)
switch (nType)
{
case LOK_MOUSEEVENT_MOUSEBUTTONDOWN:
pGridWindow->LogicMouseButtonDown(aEvent);
pGridWindow->MouseButtonDown(aEvent);
break;
case LOK_MOUSEEVENT_MOUSEBUTTONUP:
pGridWindow->LogicMouseButtonUp(aEvent);
pGridWindow->MouseButtonUp(aEvent);
// sometimes MouseButtonDown captures mouse and starts tracking, and VCL
// will not take care of releasing that with tiled rendering
if (pGridWindow->IsTracking())
pGridWindow->EndTracking();
break;
default:
assert(false);
......
......@@ -2421,33 +2421,6 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
}
}
void ScGridWindow::LogicMouseButtonDown(const MouseEvent& rMouseEvent)
{
// When we're not doing tiled rendering, then positions must be passed as pixels.
ScDocShell* pDocSh = pViewData->GetDocShell();
ScDocument& rDoc = pDocSh->GetDocument();
(void)rDoc;
assert(rDoc.GetDrawLayer()->isTiledRendering());
MouseButtonDown(rMouseEvent);
}
void ScGridWindow::LogicMouseButtonUp(const MouseEvent& rMouseEvent)
{
// When we're not doing tiled rendering, then positions must be passed as pixels.
ScDocShell* pDocSh = pViewData->GetDocShell();
ScDocument& rDoc = pDocSh->GetDocument();
(void)rDoc;
assert(rDoc.GetDrawLayer()->isTiledRendering());
MouseButtonUp(rMouseEvent);
// sometimes MouseButtonDown captures mouse and starts tracking, and VCL
// will not take care of releasing that with tiled rendering
if (IsTracking())
EndTracking();
}
void ScGridWindow::FakeButtonUp()
{
if ( nButtonDown )
......
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