Kaydet (Commit) 455836cd authored tarafından Thorsten Behrens's avatar Thorsten Behrens

Rename loop variable in ImpEditEngine::Paint

This had nothing to do with y coordinates.

Change-Id: I36baf05cd4c4a67b24574f6651b1c3f1eb12e22e
üst dd3e879c
...@@ -2976,13 +2976,13 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta ...@@ -2976,13 +2976,13 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
aTextLineColor); aTextLineColor);
} }
for ( sal_uInt16 y = pLine->GetStartPortion(); y <= pLine->GetEndPortion(); y++ ) for ( sal_uInt16 nPortion = pLine->GetStartPortion(); nPortion <= pLine->GetEndPortion(); nPortion++ )
{ {
DBG_ASSERT( pPortion->GetTextPortions().Count(), "Line without Textportion in Paint!" ); DBG_ASSERT( pPortion->GetTextPortions().Count(), "Line without Textportion in Paint!" );
const TextPortion* pTextPortion = pPortion->GetTextPortions()[y]; const TextPortion* pTextPortion = pPortion->GetTextPortions()[nPortion];
DBG_ASSERT( pTextPortion, "NULL-Pointer in Portion iterator in UpdateViews" ); DBG_ASSERT( pTextPortion, "NULL-Pointer in Portion iterator in UpdateViews" );
long nPortionXOffset = GetPortionXOffset( pPortion, pLine, y ); long nPortionXOffset = GetPortionXOffset( pPortion, pLine, nPortion );
if ( !IsVertical() ) if ( !IsVertical() )
{ {
aTmpPos.X() = aStartPos.X() + nPortionXOffset; aTmpPos.X() = aStartPos.X() + nPortionXOffset;
...@@ -3306,7 +3306,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta ...@@ -3306,7 +3306,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
const lang::Locale aLocale(GetLocale(EditPaM(pPortion->GetNode(), nIndex + 1))); const lang::Locale aLocale(GetLocale(EditPaM(pPortion->GetNode(), nIndex + 1)));
// create EOL and EOP bools // create EOL and EOP bools
const bool bEndOfLine(y == pLine->GetEndPortion()); const bool bEndOfLine(nPortion == pLine->GetEndPortion());
const bool bEndOfParagraph(bEndOfLine && nLine + 1 == nLines); const bool bEndOfParagraph(bEndOfLine && nLine + 1 == nLines);
// get Overline color (from ((const SvxOverlineItem*)GetItem())->GetColor() in // get Overline color (from ((const SvxOverlineItem*)GetItem())->GetColor() in
...@@ -3537,7 +3537,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta ...@@ -3537,7 +3537,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
if ( bStripOnly ) if ( bStripOnly )
{ {
// create EOL and EOP bools // create EOL and EOP bools
const bool bEndOfLine(y == pLine->GetEndPortion()); const bool bEndOfLine(nPortion == pLine->GetEndPortion());
const bool bEndOfParagraph(bEndOfLine && nLine + 1 == nLines); const bool bEndOfParagraph(bEndOfLine && nLine + 1 == nLines);
const Color aOverlineColor(pOutDev->GetOverlineColor()); const Color aOverlineColor(pOutDev->GetOverlineColor());
...@@ -3557,7 +3557,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta ...@@ -3557,7 +3557,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
// #i108052# When stripping, a callback for _empty_ paragraphs is also needed. // #i108052# When stripping, a callback for _empty_ paragraphs is also needed.
// This was optimized away (by not rendering the space-only tab portion), so do // This was optimized away (by not rendering the space-only tab portion), so do
// it manually here. // it manually here.
const bool bEndOfLine(y == pLine->GetEndPortion()); const bool bEndOfLine(nPortion == pLine->GetEndPortion());
const bool bEndOfParagraph(bEndOfLine && nLine + 1 == nLines); const bool bEndOfParagraph(bEndOfLine && nLine + 1 == nLines);
const Color aOverlineColor(pOutDev->GetOverlineColor()); const Color aOverlineColor(pOutDev->GetOverlineColor());
...@@ -3577,7 +3577,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta ...@@ -3577,7 +3577,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
break; break;
} }
if( bParsingFields ) if( bParsingFields )
y--; nPortion--;
else else
nIndex = nIndex + pTextPortion->GetLen(); nIndex = nIndex + pTextPortion->GetLen();
......
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