diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-11-18 18:55:49 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-11-18 19:57:23 -0600 |
commit | 271b11a3d56ba0c5f542a142ab859a0819530dba (patch) | |
tree | d8719dd652134f89ea980b1a42d3a59a8db949b6 /svtools | |
parent | cc63555fd02217e3b68caccfa5c8a0171aca149c (diff) |
migrate one GetOutputString variatn to OUString
that create some clutter on some of the caller, this will
be resolved as things progress to ward OUString only
This is done that way to be incremental and avoid creating too big patches
Change-Id: I4a881d85cc2ee1eb53bc0c0d0902838b1d3720a2
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/fmtfield.cxx | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx index 3bfa00a81b3f..2d1445f9b38e 100644 --- a/svtools/source/control/fmtfield.cxx +++ b/svtools/source/control/fmtfield.cxx @@ -413,9 +413,17 @@ void FormattedField::SetTextFormatted(const OUString& rStr) sal_uInt32 nTempFormatKey = static_cast< sal_uInt32 >( m_nFormatKey ); if( IsUsingInputStringForFormatting() && ImplGetFormatter()->IsNumberFormat(m_sCurrentTextValue, nTempFormatKey, dNumber) ) + { ImplGetFormatter()->GetInputLineString(dNumber, m_nFormatKey, sFormatted); + } else - ImplGetFormatter()->GetOutputString(m_sCurrentTextValue, m_nFormatKey, sFormatted, &m_pLastOutputColor); + { + OUString sTempIn(m_sCurrentTextValue); + OUString sTempOut(sFormatted); + ImplGetFormatter()->GetOutputString(sTempIn, m_nFormatKey, sTempOut, &m_pLastOutputColor); + m_sCurrentTextValue = sTempIn; + sFormatted = sTempOut; + } // calculate the new selection Selection aSel(GetSelection()); @@ -956,14 +964,23 @@ void FormattedField::ImplSetValue(double dVal, sal_Bool bForce) String sTemp; ImplGetFormatter()->GetOutputString(dVal, 0, sTemp, &m_pLastOutputColor); // dann den String entsprechend dem Text-Format - ImplGetFormatter()->GetOutputString(sTemp, m_nFormatKey, sNewText, &m_pLastOutputColor); + { + OUString sTempIn(m_sCurrentTextValue); + OUString sTempOut; + ImplGetFormatter()->GetOutputString(sTempIn, m_nFormatKey, sTempOut, &m_pLastOutputColor); + sNewText = sTempOut; + } } else { if( IsUsingInputStringForFormatting()) + { ImplGetFormatter()->GetInputLineString(dVal, m_nFormatKey, sNewText); + } else + { ImplGetFormatter()->GetOutputString(dVal, m_nFormatKey, sNewText, &m_pLastOutputColor); + } } ImplSetTextImpl(sNewText, NULL); |