summaryrefslogtreecommitdiff
path: root/lotuswordpro/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-29 12:24:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-29 18:25:31 +0200
commit04aafba860f613c20e7078d038cc83eb02de0b54 (patch)
tree8153152b87089419bde17313d9ac7b9de6fcce32 /lotuswordpro/source
parent76c793d2acf66f46e9edcda43d2f4327e8374841 (diff)
loplugin:stringadd simplify some *StringBuffer operations
pulled from a larger patch which I created with a more permissive variant of this plugin Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lotuswordpro/source')
-rw-r--r--lotuswordpro/source/filter/lwptblformula.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/lotuswordpro/source/filter/lwptblformula.cxx b/lotuswordpro/source/filter/lwptblformula.cxx
index 301b414e1b4d..bec6bcf7466b 100644
--- a/lotuswordpro/source/filter/lwptblformula.cxx
+++ b/lotuswordpro/source/filter/lwptblformula.cxx
@@ -408,11 +408,7 @@ void LwpFormulaFunc::AddArg(std::unique_ptr<LwpFormulaArg> pArg)
*/
OUString LwpFormulaFunc::ToArgString(LwpTableLayout* pCellsMap)
{
- OUStringBuffer aFormula;
- aFormula.append('(');
- aFormula.append(ToString(pCellsMap));
- aFormula.append(')');
- return aFormula.makeStringAndClear();
+ return "(" + ToString(pCellsMap) + ")";
}
/**
* Convert the function to a formula string.
@@ -422,8 +418,8 @@ OUString LwpFormulaFunc::ToString(LwpTableLayout* pCellsMap)
OUStringBuffer aFormula;
OUString aFuncName = LwpFormulaTools::GetName(m_nTokenType);
- aFormula.append(aFuncName);
- aFormula.append(" ");//Append a blank space
+ aFormula.append(aFuncName +
+ " ");//Append a blank space
//Append args
for (auto const& elem : m_aArgs)