diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index acb6bd2c4459..a4e161847a64 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -2426,7 +2426,11 @@ void ScGridWindow::LogicMouseButtonDown(const MouseEvent& rMouseEvent) (void)rDoc; assert(rDoc.GetDrawLayer()->isTiledRendering()); - MouseButtonDown(rMouseEvent); + // Don't allow events outside of our viewport size. + // FIXME this will likely cause trouble when we allow extending the + // document size; but for now this is necessary to workaround a problem + if ( rMouseEvent.GetPosPixel().X() < GetOutputSizePixel().Width() && rMouseEvent.GetPosPixel().Y() < GetOutputSizePixel().Height()) + MouseButtonDown(rMouseEvent); } void ScGridWindow::LogicMouseButtonUp(const MouseEvent& rMouseEvent) |