diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-02-24 09:05:50 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-02-24 09:08:35 +0100 |
commit | 83aa6d8180f289e5ae4034560dbd95ab160b1ac2 (patch) | |
tree | 10fea22a5780ba93c594456130b4db1a93626592 /sw | |
parent | c1e06b7a91e0a2f2ddcf9d669bccb0eb488dc4f8 (diff) |
Remove some temporaries around calls to SvNumberFormatter methods
Change-Id: Ib03c97a52df120bac1ac9b2b9d2e52431ead1027
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/fields/fldbas.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/table/swtable.cxx | 9 | ||||
-rw-r--r-- | sw/source/core/text/EnhancedPDFExportHelper.cxx | 5 | ||||
-rw-r--r-- | sw/source/ui/utlui/numfmtlb.cxx | 8 |
4 files changed, 10 insertions, 16 deletions
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index 553b1eca375f..1931d821c4ac 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -478,8 +478,8 @@ OUString SwValueFieldType::ExpandValue( const double& rVal, if( pFormatter->IsTextFormat( nFmt ) ) { - OUString sTempIn(DoubleToString(rVal, nFmtLng)); - pFormatter->GetOutputString(sTempIn, nFmt, sExpand, &pCol); + pFormatter->GetOutputString(DoubleToString(rVal, nFmtLng), nFmt, + sExpand, &pCol); } else { diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 25ed11ef4de2..11c316152743 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -2142,12 +2142,9 @@ void ChgNumToText( SwTableBox& rBox, sal_uLong nFmt ) if( NUMBERFORMAT_TEXT != nFmt ) { // special text format: - OUString sTmp, sTxt( pTNd->GetTxt() ); - OUString sTempIn(sTxt); - OUString sTempOut; - pDoc->GetNumberFormatter()->GetOutputString( sTempIn, nFmt, sTempOut, &pCol ); - sTxt = sTempIn; - sTmp = sTempOut; + OUString sTmp; + const OUString sTxt( pTNd->GetTxt() ); + pDoc->GetNumberFormatter()->GetOutputString( sTxt, nFmt, sTmp, &pCol ); if( sTxt != sTmp ) { // exchange text diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 42ebd324a9eb..3460d3362b1a 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -1634,10 +1634,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() pNumFormatter->GetOutputString( aDateDiff.GetDate(), nFormat, sDate, &pColor ); // The title should consist of the author and the date: - OUString sTitle( pField->GetPar1() ); - sTitle += ", "; - sTitle += sDate; - aNote.Title = sTitle; + aNote.Title = pField->GetPar1() + ", " + sDate; // Guess what the contents contains... aNote.Contents = pField->GetTxt(); diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx index 6ec8700f3999..99427622e656 100644 --- a/sw/source/ui/utlui/numfmtlb.cxx +++ b/sw/source/ui/utlui/numfmtlb.cxx @@ -234,8 +234,7 @@ void NumFormatListBox::SetFormatType(const short nFormatType) } else if( nFormatType == NUMBERFORMAT_TEXT ) { - OUString sTxt("\"ABC\""); - pFormatter->GetOutputString( sTxt, nFormat, sValue, &pCol); + pFormatter->GetOutputString( "\"ABC\"", nFormat, sValue, &pCol); } if (nFormat != nSysNumFmt && @@ -309,11 +308,12 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt) if (nType == NUMBERFORMAT_TEXT) { - OUString sTxt("\"ABC\""); - pFormatter->GetOutputString(sTxt, nDefFmt, sValue, &pCol); + pFormatter->GetOutputString("\"ABC\"", nDefFmt, sValue, &pCol); } else + { pFormatter->GetOutputString(fValue, nDefFmt, sValue, &pCol); + } sal_uInt16 nPos = 0; while ((sal_uLong)GetEntryData(nPos) == ULONG_MAX) |