Kaydet (Commit) 187017ee authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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
8ab086b6 "initial import," bCalcPortion is
apparently always true when read

Change-Id: I83ba29a78512360500a0c9c8c1baf1ccbad87951
üst c95e3eee
...@@ -2210,8 +2210,6 @@ bool TextEngine::CreateLines( sal_uInt32 nPara ) ...@@ -2210,8 +2210,6 @@ bool TextEngine::CreateLines( sal_uInt32 nPara )
vcl::Font aFont; vcl::Font aFont;
bool bCalcPortion = true;
while ( nIndex < pNode->GetText().getLength() ) while ( nIndex < pNode->GetText().getLength() )
{ {
bool bEOL = false; bool bEOL = false;
...@@ -2255,8 +2253,7 @@ bool TextEngine::CreateLines( sal_uInt32 nPara ) ...@@ -2255,8 +2253,7 @@ bool TextEngine::CreateLines( sal_uInt32 nPara )
else else
{ {
if ( bCalcPortion || !pPortion->HasValidSize() ) pPortion->GetWidth() = CalcTextWidth( nPara, nTmpPos, pPortion->GetLen() );
pPortion->GetWidth() = CalcTextWidth( nPara, nTmpPos, pPortion->GetLen() );
nTmpWidth += pPortion->GetWidth(); nTmpWidth += pPortion->GetWidth();
pPortion->SetRightToLeft( ImpGetRightToLeft( nPara, nTmpPos+1 ) ); pPortion->SetRightToLeft( ImpGetRightToLeft( nPara, nTmpPos+1 ) );
...@@ -2361,9 +2358,8 @@ bool TextEngine::CreateLines( sal_uInt32 nPara ) ...@@ -2361,9 +2358,8 @@ bool TextEngine::CreateLines( sal_uInt32 nPara )
( ( nEnd-nInvalidDiff ) == aSaveLine.GetEnd() ) ) ( ( nEnd-nInvalidDiff ) == aSaveLine.GetEnd() ) )
{ {
pLine->SetValid(); pLine->SetValid();
if ( bCalcPortion && bQuickFormat ) if ( bQuickFormat )
{ {
bCalcPortion = false;
pTEParaPortion->CorrectValuesBehindLastFormattedLine( nLine ); pTEParaPortion->CorrectValuesBehindLastFormattedLine( nLine );
break; break;
} }
...@@ -2376,7 +2372,6 @@ bool TextEngine::CreateLines( sal_uInt32 nPara ) ...@@ -2376,7 +2372,6 @@ bool TextEngine::CreateLines( sal_uInt32 nPara )
// the text width does not have to be recalculated. // the text width does not have to be recalculated.
if ( nEnd == ( aSaveLine.GetEnd() + nInvalidDiff ) ) if ( nEnd == ( aSaveLine.GetEnd() + nInvalidDiff ) )
{ {
bCalcPortion = false;
pTEParaPortion->CorrectValuesBehindLastFormattedLine( nLine ); pTEParaPortion->CorrectValuesBehindLastFormattedLine( nLine );
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment