diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-26 16:29:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-27 09:53:31 +0200 |
commit | 8f3ca2e63b8145b504f764a17ab61d8a93f15a60 (patch) | |
tree | 0f45ed78325bdfdacd8eb290987adc1f04bd0491 /sc | |
parent | 4f5ef1750bb9dacbe4736247ca6dbe00053a328c (diff) |
tdf#113422 Crash in: ScPreview::MouseMove(MouseEvent const &)
regression from
commit 0ad8447d3199e1c1d1f7d6ddabc9b4cded99c2d6
dyncolcontainer: convert nRight to std::vector
Change-Id: I9cdf80115a2be73ec2b30fd875a904de3333fddf
Reviewed-on: https://gerrit.libreoffice.org/43905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/preview.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index 1ebead6706b7..ccd0c5cfa4c5 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -1358,7 +1358,8 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt ) { Point aColumnTop = LogicToPixel( Point( 0, -aOffset.Y() ) ,aMMMode ); Point aColumnBottom = LogicToPixel( Point( 0, (long)( nHeight * HMM_PER_TWIPS - aOffset.Y()) ), aMMMode ); - if( aPixPt.X() < ( mvRight[i] + 2 ) && ( aPixPt.X() > ( mvRight[i] - 2 ) ) && ( aPixPt.X() < aRightTop.X() ) && ( aPixPt.X() > aLeftTop.X() ) + long nRight = i < static_cast<SCCOL>(mvRight.size()) ? mvRight[i] : 0; + if( aPixPt.X() < ( nRight + 2 ) && ( aPixPt.X() > ( nRight - 2 ) ) && ( aPixPt.X() < aRightTop.X() ) && ( aPixPt.X() > aLeftTop.X() ) && ( aPixPt.Y() > aColumnTop.Y() ) && ( aPixPt.Y() < aColumnBottom.Y() ) && !bLeftRulerMove && !bRightRulerMove && !bTopRulerMove && !bBottomRulerMove && !bHeaderRulerMove && !bFooterRulerMove ) { |