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 /svx/source/items | |
parent | c1e06b7a91e0a2f2ddcf9d669bccb0eb488dc4f8 (diff) |
Remove some temporaries around calls to SvNumberFormatter methods
Change-Id: Ib03c97a52df120bac1ac9b2b9d2e52431ead1027
Diffstat (limited to 'svx/source/items')
-rw-r--r-- | svx/source/items/numfmtsh.cxx | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx index 7fbaae33a857..402f03fb0cab 100644 --- a/svx/source/items/numfmtsh.cxx +++ b/svx/source/items/numfmtsh.cxx @@ -429,11 +429,8 @@ void SvxNumberFormatShell::MakePreviewString( const OUString& rFormatStr, if ( nExistingFormat == NUMBERFORMAT_ENTRY_NOT_FOUND ) { // real preview - not implemented in NumberFormatter for text formats - OUString sTempOut(rPreviewStr); - - pFormatter->GetPreviewString( rFormatStr, nValNum, sTempOut, + pFormatter->GetPreviewString( rFormatStr, nValNum, rPreviewStr, &rpFontColor, eCurLanguage, bUseStarFormat ); - rPreviewStr = sTempOut; } else { @@ -444,19 +441,13 @@ void SvxNumberFormatShell::MakePreviewString( const OUString& rFormatStr, ( !aValStr.isEmpty() && ( pFormatter->GetType(nExistingFormat) & NUMBERFORMAT_TEXT ) ) ); if ( bUseText ) { - OUString sTempIn(aValStr); - OUString sTempOut(rPreviewStr); - pFormatter->GetOutputString( sTempIn, nExistingFormat, - sTempOut, &rpFontColor ); - aValStr = sTempIn; - rPreviewStr = sTempOut; + pFormatter->GetOutputString( aValStr, nExistingFormat, + rPreviewStr, &rpFontColor ); } else { - OUString sTemp(rPreviewStr); pFormatter->GetOutputString( nValNum, nExistingFormat, - sTemp, &rpFontColor, bUseStarFormat ); - rPreviewStr = sTemp; + rPreviewStr, &rpFontColor, bUseStarFormat ); } } } @@ -1134,17 +1125,11 @@ void SvxNumberFormatShell::GetPreviewString_Impl( OUString& rString, Color*& rpC if ( bUseText ) { - OUString sTempIn(aValStr); - OUString sTempOut(rString); - pFormatter->GetOutputString( sTempIn, nCurFormatKey, sTempOut, &rpColor ); - aValStr = sTempIn; - rString = sTempOut; + pFormatter->GetOutputString( aValStr, nCurFormatKey, rString, &rpColor ); } else { - OUString sTemp(rString); - pFormatter->GetOutputString( nValNum, nCurFormatKey, sTemp, &rpColor, bUseStarFormat ); - rString = sTemp; + pFormatter->GetOutputString( nValNum, nCurFormatKey, rString, &rpColor, bUseStarFormat ); } } @@ -1246,9 +1231,7 @@ void SvxNumberFormatShell::MakePrevStringFromVal( double nValue) { rpFontColor = NULL; - OUString sTempOut(rPreviewStr); - pFormatter->GetPreviewString( rFormatStr, nValue, sTempOut, &rpFontColor, eCurLanguage ); - rPreviewStr = sTempOut; + pFormatter->GetPreviewString( rFormatStr, nValue, rPreviewStr, &rpFontColor, eCurLanguage ); } /************************************************************************* |