diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-25 09:59:16 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-26 10:55:58 +0000 |
commit | e8fd5a07eca70912ddee45aaa34d434809b59fb7 (patch) | |
tree | d5dc890d12987cad73f5e64301f823ba23a97f2d /vcl/source/edit/textdata.cxx | |
parent | e6adb3e8b4de3c0f78d249b83de19b849ef65b59 (diff) |
update loplugin stylepolice to check local pointers vars
are actually pointer vars.
Also convert from regex to normal code, so we can enable this
plugin all the time.
Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
Reviewed-on: https://gerrit.libreoffice.org/24391
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/source/edit/textdata.cxx')
-rw-r--r-- | vcl/source/edit/textdata.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx index a3b32c8287c8..841e5cc78433 100644 --- a/vcl/source/edit/textdata.cxx +++ b/vcl/source/edit/textdata.cxx @@ -164,9 +164,9 @@ sal_uInt16 TEParaPortion::GetLineNumber( sal_Int32 nChar, bool bInclEnd ) { for ( size_t nLine = 0; nLine < maLines.size(); nLine++ ) { - TextLine& pLine = maLines[ nLine ]; - if ( ( bInclEnd && ( pLine.GetEnd() >= nChar ) ) || - ( pLine.GetEnd() > nChar ) ) + TextLine& rLine = maLines[ nLine ]; + if ( ( bInclEnd && ( rLine.GetEnd() >= nChar ) ) || + ( rLine.GetEnd() > nChar ) ) { return nLine; } @@ -184,10 +184,10 @@ void TEParaPortion::CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormat DBG_ASSERT( nLines, "CorrectPortionNumbersFromLine: Leere Portion?" ); if ( nLastFormattedLine < ( nLines - 1 ) ) { - const TextLine& pLastFormatted = maLines[ nLastFormattedLine ]; - const TextLine& pUnformatted = maLines[ nLastFormattedLine+1 ]; - short nPortionDiff = pUnformatted.GetStartPortion() - pLastFormatted.GetEndPortion(); - sal_Int32 nTextDiff = pUnformatted.GetStart() - pLastFormatted.GetEnd(); + const TextLine& rLastFormatted = maLines[ nLastFormattedLine ]; + const TextLine& rUnformatted = maLines[ nLastFormattedLine+1 ]; + short nPortionDiff = rUnformatted.GetStartPortion() - rLastFormatted.GetEndPortion(); + sal_Int32 nTextDiff = rUnformatted.GetStart() - rLastFormatted.GetEnd(); nTextDiff++; // LastFormatted.GetEnd() was inclusive => subtracted one too much! // The first unformatted one has to start exactly one portion past the last @@ -199,15 +199,15 @@ void TEParaPortion::CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormat { for ( sal_uInt16 nL = nLastFormattedLine+1; nL < nLines; nL++ ) { - TextLine& pLine = maLines[ nL ]; + TextLine& rLine = maLines[ nL ]; - pLine.GetStartPortion() = pLine.GetStartPortion() + nPDiff; - pLine.GetEndPortion() = pLine.GetEndPortion() + nPDiff; + rLine.GetStartPortion() = rLine.GetStartPortion() + nPDiff; + rLine.GetEndPortion() = rLine.GetEndPortion() + nPDiff; - pLine.GetStart() = pLine.GetStart() + nTDiff; - pLine.GetEnd() = pLine.GetEnd() + nTDiff; + rLine.GetStart() = rLine.GetStart() + nTDiff; + rLine.GetEnd() = rLine.GetEnd() + nTDiff; - pLine.SetValid(); + rLine.SetValid(); } } } |