diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-23 16:07:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-27 14:07:56 +0200 |
commit | c7c6f0af6c836ebe0968967a1e7c8320b0ac17d6 (patch) | |
tree | 4bc5b2fa623b9765b88bbfe7de10a7590c87d5c8 /starmath | |
parent | 99482297c7dd497e41fad2e7193759043e305101 (diff) |
loplugin:stringadd convert chained append to +
which can use the more efficient *StringConcat
Also fix a crash in stringview plugin which
started happening while I working on this.
Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/mathtype.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index 6a3147d2f817..cb46776cc618 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -316,7 +316,7 @@ bool MathType::LookupChar(sal_Unicode nChar,OUStringBuffer &rRet,sal_uInt8 nVers break; case 0x2208: // in case 0x2209: // notin - rRet.append(" func ").append(OUStringChar(nChar)).append(" "); + rRet.append(" func " + OUStringChar(nChar) + " "); break; case 0x220d: // owns rRet.append(u" func \u220b "); @@ -432,7 +432,7 @@ bool MathType::LookupChar(sal_Unicode nChar,OUStringBuffer &rRet,sal_uInt8 nVers case 0x2289: // nsupseteq case 0x22b2: // NORMAL SUBGROUP OF case 0x22b3: // CONTAINS AS NORMAL SUBGROUP - rRet.append(" func ").append(OUStringChar(nChar)).append(" "); + rRet.append(" func " + OUStringChar(nChar) + " "); break; case 0x22a5: pC = " ortho "; @@ -1438,7 +1438,7 @@ bool MathType::HandleRecords(int nLevel, sal_uInt8 nSelector, else if (nPart == 1) { rRet.insert(0, sPush); - rRet.append(" over ").append(sMainTerm); + rRet.append(" over " + sMainTerm); sPush.clear(); sMainTerm.clear(); } @@ -2891,7 +2891,7 @@ bool MathType::HandleChar(sal_Int32 &rTextStart, int &rSetSize, int nLevel, aStr.clear(); TypeFaceToString(aStr,nTypeFace); - rRet.append(aStr).append("{"); + rRet.append(aStr + "{"); } else rRet.append(" {"); @@ -2935,7 +2935,7 @@ bool MathType::HandleChar(sal_Int32 &rTextStart, int &rSetSize, int nLevel, if ((xfEMBELL(nTag)) && (!bSilent)) { - rRet.append("}}").append(sPost); // #i24340# make what would be "vec {A}_n" become "{vec {A}}_n" + rRet.append("}}" + sPost); // #i24340# make what would be "vec {A}_n" become "{vec {A}}_n" rTextStart = rRet.getLength(); } return bRet; |