diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-28 18:01:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-29 12:14:22 +0200 |
commit | e593b623dad9456d3452c4c537479596bcd0b00b (patch) | |
tree | d9d21031cdd75df25749de8c6ae5b9c0afb1c196 /drawinglayer | |
parent | a612d738a8c909e18ed89675432ca42b376ef624 (diff) |
loplugin:stringloop in various
Change-Id: Ic2436c6d94729211cd5bc72fee18af228381e4a3
Reviewed-on: https://gerrit.libreoffice.org/58250
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx index 952ef92284ae..e63728c48023 100644 --- a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx @@ -87,20 +87,21 @@ namespace drawinglayer const double fStrikeCharCount(fabs(getWidth()/fStrikeCharWidth)); const sal_uInt32 nStrikeCharCount(static_cast< sal_uInt32 >(fStrikeCharCount + 0.5)); std::vector<double> aDXArray(nStrikeCharCount); - OUString aStrikeoutString; + OUStringBuffer aStrikeoutString; for(sal_uInt32 a(0); a < nStrikeCharCount; a++) { - aStrikeoutString += aSingleCharString; + aStrikeoutString.append(aSingleCharString); aDXArray[a] = (a + 1) * fStrikeCharWidth; } + auto len = aStrikeoutString.getLength(); rContainer.push_back( new TextSimplePortionPrimitive2D( getObjectTransformation(), - aStrikeoutString, + aStrikeoutString.makeStringAndClear(), 0, - aStrikeoutString.getLength(), + len, aDXArray, getFontAttribute(), getLocale(), |