diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-03-26 12:00:55 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-30 09:23:51 +0200 |
commit | f951ab5c46a3cb128a52646bcb9381b37242c3f3 (patch) | |
tree | be27f75df930dbce0049bf1f75a2c19391f28bde /sc | |
parent | 3aed864e7a2f7024fd81ba81bdc6182848320e0e (diff) |
sc: No need for a special LogicMouseButtonUp/Down.
They were not in logic units but in pixels anyway.
Change-Id: I5b6cea13b84659c3404b38b9a19c091b41ccd3c4
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/inc/gridwin.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 27 |
3 files changed, 8 insertions, 35 deletions
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index 3d4f90fe5451..9d8965d052fb 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -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. diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 2c77ec6ac500..4ec5415a5da6 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -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); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 313557fb2e77..0856107b5999 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -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 ) |