[Libreoffice-commits] core.git: sfx2/source

Julien Nabet serval2412 at yahoo.fr
Tue Mar 5 11:03:58 PST 2013


 sfx2/source/control/thumbnailview.cxx |    3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 03c51284b9a23dabc9139504691d061ce38be279
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Mar 5 20:00:53 2013 +0100

    Remove unused nTotalItems
    
    See http://nabble.documentfoundation.org/Cppcheck-nTotalItems-is-assigned-a-value-never-used-sfx2-part-td4036724.html
    
    Change-Id: I8c752dc7bede7cbf5e450d62500a227458b8dc25

diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index dce93ae..a1ff4d3 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -279,7 +279,6 @@ void ThumbnailView::CalculateItemPositions ()
     // draw items
     size_t nFirstItem = mnFirstLine * mnCols;
     size_t nLastItem = nFirstItem + (mnVisLines * mnCols);
-    size_t nTotalItems = mnFirstLine*mnCols + mnVisLines*mnCols;
 
     maItemListRect.Left() = x;
     maItemListRect.Top() = y;
@@ -289,8 +288,6 @@ void ThumbnailView::CalculateItemPositions ()
     // If want also draw parts of items in the last line,
     // then we add one more line if parts of these line are
     // visible
-    if ( y+(mnVisLines*(mnItemHeight+nVItemSpace)) < aWinSize.Height() )
-        nTotalItems += mnCols;
 
     size_t nCurCount = 0;
     for ( size_t i = 0; i < nItemCount; i++ )


More information about the Libreoffice-commits mailing list