diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-18 12:26:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-18 12:27:11 +0100 |
commit | 033d37baafe02fd9cfadab810742fcfccfbed3a9 (patch) | |
tree | ce5f669d3f278fd10142e42c90646cb4f5df166a /sfx2 | |
parent | 2bd0be819d63588ff0ce6161005d26d313253f74 (diff) |
Related: fdo#69444 unsigned arithmetic is a PITA
Change-Id: I8662fc36476a2a029f6bab306306181359b3f688
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 6089507993a4..7976c6af476a 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -566,7 +566,7 @@ void ThumbnailView::KeyInput( const KeyEvent& rKEvt ) { case KEY_RIGHT: { - if ( bFoundLast && nLastPos < mFilteredItemList.size( ) - 1 ) + if ( bFoundLast && nLastPos + 1 < mFilteredItemList.size() ) { bValidRange = true; nNextPos = nLastPos + 1; @@ -593,7 +593,7 @@ void ThumbnailView::KeyInput( const KeyEvent& rKEvt ) //If we are in the second last row just go the one in //the row below, if theres not row below just go to the //last item but for the last row dont do anything. - if ( nLastPos < mFilteredItemList.size( ) - mnCols ) + if ( nLastPos + mnCols < mFilteredItemList.size( ) ) { bValidRange = true; nNextPos = nLastPos + mnCols; |