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

Jochen Nitschke j.nitschke+logerrit at ok.de
Tue Apr 19 06:34:15 UTC 2016


 svx/source/table/tablecontroller.cxx |   23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

New commits:
commit c977def4a1f38662db96383eb3dc7047a1e772dc
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Mon Apr 18 09:35:33 2016 +0000

    cppcheck: silence known condition warning in svx tablecontroller
    
    Change-Id: I5c56c99e6b2cc767e0a7a411f9d66f1eee630b2a
    Reviewed-on: https://gerrit.libreoffice.org/24207
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: David Tardon <dtardon at redhat.com>

diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index e361133..b98feb2 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -1552,7 +1552,6 @@ sal_uInt16 SvxTableController::getKeyboardAction( const KeyEvent& rKEvt, vcl::Wi
     case awt::Key::RIGHT:
     case awt::Key::NUM6:
     {
-        bool bTextMove = false;
 
         if( !bMod1 && bMod2 )
         {
@@ -1567,20 +1566,18 @@ sal_uInt16 SvxTableController::getKeyboardAction( const KeyEvent& rKEvt, vcl::Wi
             break;
         }
 
-        if( !bTextMove )
+        bool bTextMove = false;
+        OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
+        if( pOLV )
         {
-            OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
-            if( pOLV )
+            RemoveSelection();
+            // during text edit, check if we navigate out of the cell
+            ESelection aOldSelection = pOLV->GetSelection();
+            pOLV->PostKeyEvent(rKEvt);
+            bTextMove = pOLV && ( aOldSelection.IsEqual(pOLV->GetSelection()) );
+            if( !bTextMove )
             {
-                RemoveSelection();
-                // during text edit, check if we navigate out of the cell
-                ESelection aOldSelection = pOLV->GetSelection();
-                pOLV->PostKeyEvent(rKEvt);
-                bTextMove = pOLV && ( aOldSelection.IsEqual(pOLV->GetSelection()) );
-                if( !bTextMove )
-                {
-                    nAction = ACTION_NONE;
-                }
+                nAction = ACTION_NONE;
             }
         }
 


More information about the Libreoffice-commits mailing list