summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-04-18 09:35:33 +0000
committerDavid Tardon <dtardon@redhat.com>2016-04-19 06:33:53 +0000
commitc977def4a1f38662db96383eb3dc7047a1e772dc (patch)
tree12d0d5ad200ab515c011a44771e372ab5d069953
parent5d3d8467b3d451742e65f86626ffb275f866327a (diff)
cppcheck: silence known condition warning in svx tablecontroller
Change-Id: I5c56c99e6b2cc767e0a7a411f9d66f1eee630b2a Reviewed-on: https://gerrit.libreoffice.org/24207 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
-rw-r--r--svx/source/table/tablecontroller.cxx23
1 files changed, 10 insertions, 13 deletions
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index e361133db0d1..b98feb21c87b 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;
}
}