From 83aa6d8180f289e5ae4034560dbd95ab160b1ac2 Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Mon, 24 Feb 2014 09:05:50 +0100 Subject: Remove some temporaries around calls to SvNumberFormatter methods Change-Id: Ib03c97a52df120bac1ac9b2b9d2e52431ead1027 --- svtools/source/control/fmtfield.cxx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'svtools') diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx index b422d0c13080..67049c804bd5 100644 --- a/svtools/source/control/fmtfield.cxx +++ b/svtools/source/control/fmtfield.cxx @@ -382,11 +382,10 @@ void FormattedField::SetTextFormatted(const OUString& rStr) } else { - OUString sTempIn(m_sCurrentTextValue); - OUString sTempOut(sFormatted); - ImplGetFormatter()->GetOutputString(sTempIn, m_nFormatKey, sTempOut, &m_pLastOutputColor); - m_sCurrentTextValue = sTempIn; - sFormatted = sTempOut; + ImplGetFormatter()->GetOutputString(m_sCurrentTextValue, + m_nFormatKey, + sFormatted, + &m_pLastOutputColor); } // calculate the new selection @@ -913,10 +912,8 @@ void FormattedField::ImplSetValue(double dVal, sal_Bool bForce) // first convert the number as string in standard format OUString sTemp; ImplGetFormatter()->GetOutputString(dVal, 0, sTemp, &m_pLastOutputColor); - // than encode the string in the corresponding text format - { - ImplGetFormatter()->GetOutputString(sTemp, m_nFormatKey, sNewText, &m_pLastOutputColor); - } + // then encode the string in the corresponding text format + ImplGetFormatter()->GetOutputString(sTemp, m_nFormatKey, sNewText, &m_pLastOutputColor); } else { -- cgit