vcl/source/edit/texteng.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
New commits: commit 187017ee35386018ac4bf249d30c863dd839df07 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Sep 3 12:28:01 2015 +0200 clang-tidy clang-analyzer-deadcode.DeadStores ...given that setting bCalcPortion to false is always followed by a break out of the while loop ever since the code's inception in 8ab086b6cc054501bfbf7ef6fa509c393691e860 "initial import," bCalcPortion is apparently always true when read Change-Id: I83ba29a78512360500a0c9c8c1baf1ccbad87951 diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index abacae2..bc9bc3f 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -2210,8 +2210,6 @@ bool TextEngine::CreateLines( sal_uInt32 nPara ) vcl::Font aFont; - bool bCalcPortion = true; - while ( nIndex < pNode->GetText().getLength() ) { bool bEOL = false; @@ -2255,8 +2253,7 @@ bool TextEngine::CreateLines( sal_uInt32 nPara ) else { - if ( bCalcPortion || !pPortion->HasValidSize() ) - pPortion->GetWidth() = CalcTextWidth( nPara, nTmpPos, pPortion->GetLen() ); + pPortion->GetWidth() = CalcTextWidth( nPara, nTmpPos, pPortion->GetLen() ); nTmpWidth += pPortion->GetWidth(); pPortion->SetRightToLeft( ImpGetRightToLeft( nPara, nTmpPos+1 ) ); @@ -2361,9 +2358,8 @@ bool TextEngine::CreateLines( sal_uInt32 nPara ) ( ( nEnd-nInvalidDiff ) == aSaveLine.GetEnd() ) ) { pLine->SetValid(); - if ( bCalcPortion && bQuickFormat ) + if ( bQuickFormat ) { - bCalcPortion = false; pTEParaPortion->CorrectValuesBehindLastFormattedLine( nLine ); break; } @@ -2376,7 +2372,6 @@ bool TextEngine::CreateLines( sal_uInt32 nPara ) // the text width does not have to be recalculated. if ( nEnd == ( aSaveLine.GetEnd() + nInvalidDiff ) ) { - bCalcPortion = false; pTEParaPortion->CorrectValuesBehindLastFormattedLine( nLine ); break; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits