From 5bbe79272ee91bd4c93064e75b7a403025cf5212 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Mon, 24 Dec 2018 08:24:26 +0300 Subject: tdf#120703 PVS: V560 A part of conditional expression is always true/false Change-Id: I5ca32214bab4b26208aecaa98eecc2a6297d9093 Reviewed-on: https://gerrit.libreoffice.org/65592 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sw/source/core/frmedt/tblsel.cxx | 4 ++-- sw/source/ui/table/tabledlg.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sw') diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index d08545eaaf7f..fd1f59a150b0 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -300,7 +300,7 @@ void GetTableSel( const SwLayoutFrame* pStart, const SwLayoutFrame* pEnd, { const SwLayoutFrame *pCell = pRow->FirstCell(); - while( bTableIsValid && pCell && pRow->IsAnLower( pCell ) ) + while (pCell && pRow->IsAnLower(pCell)) { if( !pCell->isFrameAreaDefinitionValid() && nLoopMax ) { @@ -513,7 +513,7 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) { const SwLayoutFrame *pCell = pRow->FirstCell(); - while( bValidChartSel && bTableIsValid && pCell && pRow->IsAnLower( pCell ) ) + while (pCell && pRow->IsAnLower(pCell)) { if( !pCell->isFrameAreaDefinitionValid() && nLoopMax ) { diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index b19711eb2502..3a4f5463b962 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1143,7 +1143,7 @@ SwTwips SwTableColumnPage::GetVisibleWidth(sal_uInt16 nPos) while( nPos ) { - if(pTableData->GetColumns()[i].bVisible && nPos) + if(pTableData->GetColumns()[i].bVisible) nPos--; i++; } @@ -1160,7 +1160,7 @@ void SwTableColumnPage::SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth) sal_uInt16 i=0; while( nPos ) { - if(pTableData->GetColumns()[i].bVisible && nPos) + if(pTableData->GetColumns()[i].bVisible) nPos--; i++; } -- cgit