diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-01 09:38:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-01 10:52:47 +0200 |
commit | 63b00ec7d8d140853feb7108a788bfc4f0c79db6 (patch) | |
tree | 73d3589ae411699ddab6e6e24bf4c8e2a03ebf8f /sc/source/ui/formdlg | |
parent | 21d14c51c2f07b795ba286430eb96cca0085f627 (diff) |
no need to allocate these on the heap
Change-Id: I6eb3853883c724b5cb28bbf4debf6f56a587ff88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116515
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, 3 insertions, 4 deletions
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index 4af9a35fb7a5..93f51d2c91d2 100644 --- a/sc/source/ui/formdlg/formula.cxx +++ b/sc/source/ui/formdlg/formula.cxx @@ -297,8 +297,8 @@ void ScFormulaDlg::Close() bool ScFormulaDlg::calculateValue( const OUString& rStrExp, OUString& rStrResult, bool bMatrixFormula ) { - std::unique_ptr<ScSimpleFormulaCalculator> pFCell( new ScSimpleFormulaCalculator( - *m_pDoc, m_CursorPos, rStrExp, bMatrixFormula)); + std::optional<ScSimpleFormulaCalculator> pFCell(std::in_place, + *m_pDoc, m_CursorPos, rStrExp, bMatrixFormula); pFCell->SetLimitString(true); // HACK! to avoid neither #REF! from ColRowNames @@ -312,8 +312,7 @@ bool ScFormulaDlg::calculateValue( const OUString& rStrExp, OUString& rStrResult { // ==1: area // ==0: would be an area if... OUString aBraced = "(" + rStrExp + ")"; - pFCell.reset( new ScSimpleFormulaCalculator( - *m_pDoc, m_CursorPos, aBraced, bMatrixFormula)); + pFCell.emplace(*m_pDoc, m_CursorPos, aBraced, bMatrixFormula); pFCell->SetLimitString(true); } else |