[Libreoffice-commits] core.git: sfx2/source
Caolán McNamara
caolanm at redhat.com
Wed Sep 18 04:27:31 PDT 2013
sfx2/source/control/thumbnailview.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 033d37baafe02fd9cfadab810742fcfccfbed3a9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Sep 18 12:26:54 2013 +0100
Related: fdo#69444 unsigned arithmetic is a PITA
Change-Id: I8662fc36476a2a029f6bab306306181359b3f688
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 6089507..7976c6a 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;
More information about the Libreoffice-commits
mailing list