diff options
-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; |