diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-28 18:01:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-30 11:06:14 +0200 |
commit | 70bfdd828b01e9db0713b87645ffe39f3dc21c7e (patch) | |
tree | b53e22d4c582e7cad6155f2c0c2536241cadb0f5 /starmath | |
parent | dead246b1955a99b66b0a69e8da3db1a61f3ab88 (diff) |
loplugin:stringloop in sfx2..svx
Change-Id: Ie4ca2421f00259f974b6d94f883adfa11600b1fe
Reviewed-on: https://gerrit.libreoffice.org/58251
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/mathtype.cxx | 18 | ||||
-rw-r--r-- | starmath/source/mathtype.hxx | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index 611ea68d3019..af59301b8f80 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -2759,28 +2759,28 @@ void MathType::HandleEmblishments() case 0x05: if (!nPostSup) { - sPost += " sup {}"; + sPost.append(" sup {}"); nPostSup = sPost.getLength(); } - sPost = sPost.replaceAt(nPostSup-1,0," ' "); + sPost.insert(nPostSup-1," ' "); nPostSup += 3; break; case 0x06: if (!nPostSup) { - sPost += " sup {}"; + sPost.append(" sup {}"); nPostSup = sPost.getLength(); } - sPost = sPost.replaceAt(nPostSup-1,0," '' "); + sPost.insert(nPostSup-1," '' "); nPostSup += 4; break; case 0x07: if (!nPostlSup) { - sPost += " lsup {}"; + sPost.append(" lsup {}"); nPostlSup = sPost.getLength(); } - sPost = sPost.replaceAt(nPostlSup-1,0," ' "); + sPost.insert(nPostlSup-1," ' "); nPostlSup += 3; break; case 0x08: @@ -2801,10 +2801,10 @@ void MathType::HandleEmblishments() case 0x12: if (!nPostSup) { - sPost += " sup {}"; + sPost.append(" sup {}"); nPostSup = sPost.getLength(); } - sPost = sPost.replaceAt(nPostSup-1,0," ''' "); + sPost.insert(nPostSup-1," ''' "); nPostSup += 5; break; case 0x14: @@ -2882,7 +2882,7 @@ bool MathType::HandleChar(sal_Int32 &rTextStart, int &rSetSize, int nLevel, //follows the char and nPostSup and nPostlSup are the //indexes at which this class of emblishment is //collated together - sPost.clear(); + sPost = ""; nPostSup = nPostlSup = 0; int nOriglen=rRet.getLength()-rTextStart; rRet.append(" {"); // #i24340# make what would be "vec {A}_n" become "{vec {A}}_n" diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx index f69ebccf7b19..1e3a744d7789 100644 --- a/starmath/source/mathtype.hxx +++ b/starmath/source/mathtype.hxx @@ -165,7 +165,7 @@ private: sal_Int16 nLastSize; sal_uInt8 nSpec; bool bIsReInterpBrace; - OUString sPost; + OUStringBuffer sPost; sal_Int32 nPostSup; sal_Int32 nPostlSup; sal_uInt8 nTypeFace; |