diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-11-24 19:01:58 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-11-27 22:59:29 -0600 |
commit | 739146b75d8f3e537759925ba6e17cddd28e1acf (patch) | |
tree | 48e9e2320c539de28ea8cd8fd03e5ea69bf55767 /svl | |
parent | 621cdc7a446e500a6c1b7fd417199be34cdaf3da (diff) |
convert the last SvNumberformat::GetOutputString and users to OUString
Change-Id: I9766872069ef5c2ee740dcbd8ac288aa8063a752
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/svl/zformat.hxx | 9 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 20 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 10 |
3 files changed, 20 insertions, 19 deletions
diff --git a/svl/inc/svl/zformat.hxx b/svl/inc/svl/zformat.hxx index 8958663626fd..965c92d31b18 100644 --- a/svl/inc/svl/zformat.hxx +++ b/svl/inc/svl/zformat.hxx @@ -20,7 +20,6 @@ #define _ZFORMAT_HXX #include "svl/svldllapi.h" -#include <tools/string.hxx> #include <i18npool/mslangid.hxx> #include <svl/zforlist.hxx> #include <svl/nfversi.hxx> @@ -173,7 +172,7 @@ class SVL_DLLPUBLIC SvNumberformat sal_uInt8 mnCalendarType; LanguageType meLanguage; - ::rtl::OUString generateCode() const; + OUString generateCode() const; LocaleType(); LocaleType(sal_uInt32 nRawCode); @@ -239,7 +238,7 @@ public: // Load a string which might contain an Euro symbol, // in fact that could be any string used in number formats. - static rtl::OUString LoadString( SvStream& rStream ); + static OUString LoadString( SvStream& rStream ); /** * Get output string from a numeric value that fits the number of @@ -247,7 +246,7 @@ public: */ bool GetOutputString( double fNumber, sal_uInt16 nCharCount, OUString& rOutString ) const; - bool GetOutputString( double fNumber, String& OutString, Color** ppColor ); + bool GetOutputString( double fNumber, OUString& OutString, Color** ppColor ); bool GetOutputString( OUString& sString, OUString& OutString, Color** ppColor ); // True if type text @@ -282,7 +281,7 @@ public: // nPos == 0xFFFF => last substring // bString==true: first/last SYMBOLTYPE_STRING or SYMBOLTYPE_CURRENCY const OUString* GetNumForString( sal_uInt16 nNumFor, sal_uInt16 nPos, - bool bString = false ) const; + bool bString = false ) const; // Subtype of a subformat code nNumFor (0..3) // nPos == 0xFFFF => last substring diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 9496d9acb841..a1376e1111cc 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -1449,7 +1449,9 @@ void SvNumberFormatter::GetInputLineString(const double& fOutNumber, ChangeStandardPrec(INPUTSTRING_PRECISION); bPrecChanged = true; } - pFormat->GetOutputString(fOutNumber, sOutString, &pColor); + OUString sTemp(sOutString); + pFormat->GetOutputString(fOutNumber, sTemp, &pColor); + sOutString = sTemp; } if (bPrecChanged) ChangeStandardPrec(nOldPrec); @@ -1481,7 +1483,9 @@ void SvNumberFormatter::GetOutputString(const double& fOutNumber, ChangeIntl(pFormat->GetLanguage()); if ( bUseStarFormat ) pFormat->SetStarFormatSupport( true ); - pFormat->GetOutputString(fOutNumber, sOutString, ppColor); + OUString sTemp(sOutString); + pFormat->GetOutputString(fOutNumber, sTemp, ppColor); + sOutString = sTemp; if ( bUseStarFormat ) pFormat->SetStarFormatSupport( false ); } @@ -1532,13 +1536,11 @@ void SvNumberFormatter::GetOutputString(const double& fOutNumber, if (!pFormat) pFormat = GetFormatEntry(ZF_STANDARD); ChangeIntl(pFormat->GetLanguage()); - String aOutString; if ( bUseStarFormat ) pFormat->SetStarFormatSupport( true ); - pFormat->GetOutputString(fOutNumber, aOutString, ppColor); + pFormat->GetOutputString(fOutNumber, sOutString, ppColor); if ( bUseStarFormat ) pFormat->SetStarFormatSupport( false ); - sOutString = aOutString; } bool SvNumberFormatter::GetPreviewString(const String& sFormatString, @@ -1579,7 +1581,9 @@ bool SvNumberFormatter::GetPreviewString(const String& sFormatString, { p_Entry->SetStarFormatSupport( true ); } - p_Entry->GetOutputString(fPreviewNumber, sOutString, ppColor); + OUString sTemp(sOutString); + p_Entry->GetOutputString(fPreviewNumber, sTemp, ppColor); + sOutString = sTemp; if ( bUseStarFormat ) { p_Entry->SetStarFormatSupport( false ); @@ -1688,7 +1692,9 @@ bool SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString, if (nCheckPos == 0) // String ok { ImpGenerateCL( eLnge ); // create new standard formats if necessary - pEntry->GetOutputString( fPreviewNumber, sOutString, ppColor ); + OUString sTemp(sOutString); + pEntry->GetOutputString( fPreviewNumber, sTemp, ppColor ); + sOutString = sTemp; delete pEntry; return true; } diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 15d98d0e7f64..3dc994adc5d8 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -49,8 +49,6 @@ #include <cmath> using namespace svt; -using ::rtl::OUString; -using ::rtl::OUStringBuffer; namespace { struct Gregorian : public rtl::StaticWithInit<const OUString, Gregorian> @@ -2393,12 +2391,12 @@ bool SvNumberformat::GetOutputString(double fNumber, sal_uInt16 nCharCount, OUSt } bool SvNumberformat::GetOutputString(double fNumber, - String& OutString, + OUString& OutString, Color** ppColor) { bool bRes = false; OUStringBuffer sBuff; - OutString.Erase(); + OutString = ""; *ppColor = NULL; // keine Farbaenderung if (eType & NUMBERFORMAT_LOGICAL) { @@ -2423,9 +2421,7 @@ bool SvNumberformat::GetOutputString(double fNumber, { if (rScan.GetStandardPrec() == SvNumberFormatter::INPUTSTRING_PRECISION) // alle Zahlformate InputLine { - OUString sTemp; - ImpGetOutputInputLine(fNumber, sTemp); - OutString = sTemp; + ImpGetOutputInputLine(fNumber, OutString); return false; } switch (eType) |