diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-14 14:27:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-15 14:33:57 +0200 |
commit | f13c6ad5f020a196a0e3aa6f28bda3dc185d465b (patch) | |
tree | f9aaab122974d36c134fb1723ec3c1c8df51eeef /sc/source/ui/formdlg | |
parent | 9270f74466d0eb841babaa24997f608631c70341 (diff) |
new loplugin:bufferadd
look for OUStringBuffer append sequences that can be turned
into creating an OUString with + operations
Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6
Reviewed-on: https://gerrit.libreoffice.org/80809
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/formdlg')
-rw-r--r-- | sc/source/ui/formdlg/formula.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index b87662fb98d1..d71351840b85 100644 --- a/sc/source/ui/formdlg/formula.cxx +++ b/sc/source/ui/formdlg/formula.cxx @@ -309,12 +309,9 @@ bool ScFormulaDlg::calculateValue( const OUString& rStrExp, OUString& rStrResult if ( pFCell->GetCode()->GetCodeLen() <= 1 ) { // ==1: area // ==0: would be an area if... - OUStringBuffer aBraced; - aBraced.append('('); - aBraced.append(rStrExp); - aBraced.append(')'); + OUString aBraced = "(" + rStrExp + ")"; pFCell.reset( new ScSimpleFormulaCalculator( - m_pDoc, m_CursorPos, aBraced.makeStringAndClear(), bMatrixFormula)); + m_pDoc, m_CursorPos, aBraced, bMatrixFormula)); pFCell->SetLimitString(true); } else |