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 /sw | |
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 'sw')
-rw-r--r-- | sw/source/core/fields/fldbas.cxx | 16 | ||||
-rw-r--r-- | sw/source/core/table/swtable.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/utlui/numfmtlb.cxx | 12 |
3 files changed, 25 insertions, 9 deletions
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index 38bcee9173ce..f2439f1f49f4 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -511,11 +511,15 @@ String SwValueFieldType::ExpandValue( const double& rVal, { String sValue; DoubleToString(sValue, rVal, nFmtLng); - pFormatter->GetOutputString(sValue, nFmt, sExpand, &pCol); + OUString sTempIn(sValue); + OUString sTempOut(sExpand); + pFormatter->GetOutputString(sTempIn, nFmt, sTempOut, &pCol); + sExpand = sTempOut; } else + { pFormatter->GetOutputString(rVal, nFmt, sExpand, &pCol); - + } return sExpand; } @@ -748,11 +752,15 @@ String SwFormulaField::GetExpandedFormula() const { String sValue; ((SwValueFieldType *)GetTyp())->DoubleToString(sValue, GetValue(), nFmt); - pFormatter->GetOutputString(sValue, nFmt, sFormattedValue, &pCol); + OUString sTempOut(sFormattedValue); + OUString sTempIn(sValue); + pFormatter->GetOutputString(sTempIn, nFmt, sTempOut, &pCol); + sFormattedValue = sTempOut; } else + { pFormatter->GetOutputString(GetValue(), nFmt, sFormattedValue, &pCol); - + } return sFormattedValue; } else diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index b790bbe66207..413b7efd8302 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -2148,7 +2148,11 @@ void ChgNumToText( SwTableBox& rBox, sal_uLong nFmt ) { // special text format: String sTmp, sTxt( pTNd->GetTxt() ); - pDoc->GetNumberFormatter()->GetOutputString( sTxt, nFmt, sTmp, &pCol ); + OUString sTempIn(sTxt); + OUString sTempOut; + pDoc->GetNumberFormatter()->GetOutputString( sTempIn, nFmt, sTempOut, &pCol ); + sTxt = sTempIn; + sTmp = sTempOut; if( sTxt != sTmp ) { // exchange text diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx index 8f3679f6556c..71def9e92e66 100644 --- a/sw/source/ui/utlui/numfmtlb.cxx +++ b/sw/source/ui/utlui/numfmtlb.cxx @@ -242,8 +242,10 @@ void NumFormatListBox::SetFormatType(const short nFormatType) sValue = pFmt->GetFormatstring(); else if( nFormatType == NUMBERFORMAT_TEXT ) { - String sTxt(rtl::OUString("\"ABC\"")); - pFormatter->GetOutputString( sTxt, nFormat, sValue, &pCol); + OUString sTxt("\"ABC\""); + OUString sTempOut(sValue); + pFormatter->GetOutputString( sTxt, nFormat, sTempOut, &pCol); + sValue = sTempOut; } if (nFormat != nSysNumFmt && @@ -317,8 +319,10 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt) if (nType == NUMBERFORMAT_TEXT) { - String sTxt(rtl::OUString("\"ABC\"")); - pFormatter->GetOutputString(sTxt, nDefFmt, sValue, &pCol); + OUString sTxt("\"ABC\""); + OUString sTempOut(sValue); + pFormatter->GetOutputString(sTxt, nDefFmt, sTempOut, &pCol); + sValue = sTempOut; } else pFormatter->GetOutputString(fValue, nDefFmt, sValue, &pCol); |