[Libreoffice-commits] core.git: 2 commits - svtools/source svx/source

Jochen Nitschke j.nitschke+logerrit at ok.de
Sun Oct 30 23:07:55 UTC 2016


 svtools/source/table/tablecontrol_impl.cxx       |    6 +-----
 svx/source/accessibility/ChildrenManagerImpl.cxx |    2 --
 2 files changed, 1 insertion(+), 7 deletions(-)

New commits:
commit 1011f99ed63b61d9f9a469388729fa7d1b5bf960
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Sun Oct 30 19:47:15 2016 +0100

    cppcheck unreadVariable: diff
    
    since initial commit 27a1e85b656bad222f113f650b03397aa3bc59d3
    
    Change-Id: I46a973fdd6b565117030a3ae218928807e9bac41
    Reviewed-on: https://gerrit.libreoffice.org/30406
    Reviewed-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>
    Tested-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>

diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index e963695..e7c703b 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -2493,17 +2493,14 @@ namespace svt { namespace table
         }
         else if ( m_pTableControl->getAnchor() == m_pTableControl->getCurRow() )
         {
-            //selecting region,
-            int diff = m_pTableControl->getCurRow() - newRow;
             //selected region lies above the last selection
-            if( diff >= 0)
+            if( m_pTableControl->getCurRow() >= newRow)
             {
                 //put selected rows in vector
                 while ( m_pTableControl->getAnchor() >= newRow )
                 {
                     m_pTableControl->markRowAsSelected( m_pTableControl->getAnchor() );
                     m_pTableControl->setAnchor( m_pTableControl->getAnchor() - 1 );
-                    diff--;
                 }
                 m_pTableControl->setAnchor( m_pTableControl->getAnchor() + 1 );
             }
@@ -2514,7 +2511,6 @@ namespace svt { namespace table
                 {
                     m_pTableControl->markRowAsSelected( m_pTableControl->getAnchor() );
                     m_pTableControl->setAnchor( m_pTableControl->getAnchor() + 1 );
-                    diff++;
                 }
                 m_pTableControl->setAnchor( m_pTableControl->getAnchor() - 1 );
             }
commit e1efc55ab4be8ffb7fc51c44e98d88f71b26dc7b
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Sun Oct 30 20:14:55 2016 +0100

    cppcheck unreadVariable: nRemoveSelect
    
    since introduction in commit 60f11adb950e4f9645cc9ecb0f5af8235cc97366
    
    Change-Id: I9e735ec9f39502b90cec40af4397abac0165df83
    Reviewed-on: https://gerrit.libreoffice.org/30407
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>

diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx
index 2831775..d6c5ba7 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -848,7 +848,6 @@ void ChildrenManagerImpl::UpdateSelection()
     typedef std::vector< PAIR_SHAPE > VEC_SHAPE;
     VEC_SHAPE vecSelect;
     int nAddSelect=0;
-    int nRemoveSelect=0;
     bool bHasSelectedShape=false;
     ChildDescriptorListType::const_iterator aEnd = maVisibleChildren.end();
     for (ChildDescriptorListType::iterator I=maVisibleChildren.begin(); I != aEnd; ++I)
@@ -912,7 +911,6 @@ void ChildrenManagerImpl::UpdateSelection()
                     if(bDrawShape)
                     {
                         vecSelect.push_back(std::make_pair(pAccessibleShape,false));
-                        ++nRemoveSelect;
                     }
                 }
             }


More information about the Libreoffice-commits mailing list