diff options
author | Noel Grandin <noel@peralex.com> | 2012-10-05 08:42:18 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-10-09 21:23:57 +0000 |
commit | c90e0064357f78ffc9ee8261c6c100c15d904beb (patch) | |
tree | 483dd15222eaa8f7be062108b87d1246db311a3f /svl | |
parent | String->OUString in svl::SvNumberFormat::GetMappedFormatstring method (diff) | |
download | core-c90e0064357f78ffc9ee8261c6c100c15d904beb.tar.gz core-c90e0064357f78ffc9ee8261c6c100c15d904beb.zip |
String->OUString in svl::ImpSvNumFor::GetNewCurrencySymbol method
Change-Id: Ie283a02903b0bf420291e1e4e1e29232cc7ff3a9
Reviewed-on: https://gerrit.libreoffice.org/771
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/svl/zformat.hxx | 4 | ||||
-rw-r--r-- | svl/source/numbers/numfmuno.cxx | 9 | ||||
-rw-r--r-- | svl/source/numbers/zforfind.cxx | 6 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 8 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 14 |
5 files changed, 21 insertions, 20 deletions
diff --git a/svl/inc/svl/zformat.hxx b/svl/inc/svl/zformat.hxx index ead212c9eb68..1dbb9731552c 100644 --- a/svl/inc/svl/zformat.hxx +++ b/svl/inc/svl/zformat.hxx @@ -146,7 +146,7 @@ public: // new SYMBOLTYPE_CURRENCY in subformat? bool HasNewCurrency() const; - bool GetNewCurrencySymbol( String& rSymbol, String& rExtension ) const; + bool GetNewCurrencySymbol( OUString& rSymbol, OUString& rExtension ) const; void SaveNewCurrencyMap( SvStream& rStream ) const; void LoadNewCurrencyMap( SvStream& rStream ); @@ -344,7 +344,7 @@ public: // If a new SYMBOLTYPE_CURRENCY is contained if the format is of type // NUMBERFORMAT_CURRENCY, and if so the symbol xxx and the extension nnn // of [$xxx-nnn] are returned - bool GetNewCurrencySymbol( String& rSymbol, String& rExtension ) const; + bool GetNewCurrencySymbol( OUString& rSymbol, OUString& rExtension ) const; static bool HasStringNegativeSign( const String& rStr ); diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx index 461ff8bb370e..6b6005200e8d 100644 --- a/svl/source/numbers/numfmuno.cxx +++ b/svl/source/numbers/numfmuno.cxx @@ -802,19 +802,19 @@ uno::Any SAL_CALL SvNumberFormatObj::getPropertyValue( const rtl::OUString& aPro } else if (aString.EqualsAscii( PROPERTYNAME_CURRSYM )) { - String aSymbol, aExt; + OUString aSymbol, aExt; pFormat->GetNewCurrencySymbol( aSymbol, aExt ); aRet <<= rtl::OUString( aSymbol ); } else if (aString.EqualsAscii( PROPERTYNAME_CURREXT )) { - String aSymbol, aExt; + OUString aSymbol, aExt; pFormat->GetNewCurrencySymbol( aSymbol, aExt ); aRet <<= rtl::OUString( aExt ); } else if (aString.EqualsAscii( PROPERTYNAME_CURRABB )) { - String aSymbol, aExt; + OUString aSymbol, aExt; bool bBank = false; pFormat->GetNewCurrencySymbol( aSymbol, aExt ); const NfCurrencyEntry* pCurr = pFormatter->GetCurrencyEntry( bBank, @@ -876,7 +876,8 @@ uno::Sequence<beans::PropertyValue> SAL_CALL SvNumberFormatObj::getPropertyValue const SvNumberformat* pFormat = pFormatter ? pFormatter->GetEntry(nKey) : NULL; if (pFormat) { - String aSymbol, aExt, aAbb; + OUString aSymbol, aExt; + String aAbb; bool bBank = false; pFormat->GetNewCurrencySymbol( aSymbol, aExt ); const NfCurrencyEntry* pCurr = pFormatter->GetCurrencyEntry( bBank, diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index 69d676181f46..085d5676659f 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -673,15 +673,15 @@ bool ImpSvNumberInputScan::GetCurrency( const String& rString, xub_StrLen& nPos, } if ( pFormat ) { - String aSymbol, aExtension; + OUString aSymbol, aExtension; if ( pFormat->GetNewCurrencySymbol( aSymbol, aExtension ) ) { - if ( aSymbol.Len() <= rString.Len() - nPos ) + if ( aSymbol.getLength() <= rString.Len() - nPos ) { aSymbol = pFormatter->GetCharClass()->uppercase(aSymbol); if ( StringContains( aSymbol, rString, nPos ) ) { - nPos = nPos + aSymbol.Len(); + nPos = nPos + aSymbol.getLength(); return true; } } diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 22872d1ff9f2..692b228c7da6 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -3307,7 +3307,7 @@ bool SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat, const SvNumberformat* pFormat = GetFormatEntry(nFormat); if ( pFormat ) { - String aSymbol, aExtension; + OUString aSymbol, aExtension; if ( pFormat->GetNewCurrencySymbol( aSymbol, aExtension ) ) { if ( ppEntry ) @@ -3329,8 +3329,8 @@ bool SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat, { // analog to BuildSymbolString rStr = '['; rStr += '$'; - if ( aSymbol.Search( '-' ) != STRING_NOTFOUND || - aSymbol.Search( ']' ) != STRING_NOTFOUND ) + if ( aSymbol.indexOf( '-' ) != -1 || + aSymbol.indexOf( ']' ) != -1 ) { rStr += '"'; rStr += aSymbol; @@ -3338,7 +3338,7 @@ bool SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat, } else rStr += aSymbol; - if ( aExtension.Len() ) + if ( aExtension.getLength() ) rStr += aExtension; rStr += ']'; } diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index ed20ade4112d..b5c583cfb081 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -404,8 +404,8 @@ bool ImpSvNumFor::HasNewCurrency() const return false; } -bool ImpSvNumFor::GetNewCurrencySymbol( String& rSymbol, - String& rExtension ) const +bool ImpSvNumFor::GetNewCurrencySymbol( OUString& rSymbol, + OUString& rExtension ) const { for ( sal_uInt16 j=0; j<nAnzStrings; j++ ) { @@ -415,7 +415,7 @@ bool ImpSvNumFor::GetNewCurrencySymbol( String& rSymbol, if ( j < nAnzStrings-1 && aI.nTypeArray[j+1] == NF_SYMBOLTYPE_CURREXT ) rExtension = aI.sStrArray[j+1]; else - rExtension.Erase(); + rExtension = ""; return true; } } @@ -1849,16 +1849,16 @@ bool SvNumberformat::HasNewCurrency() const return false; } -bool SvNumberformat::GetNewCurrencySymbol( String& rSymbol, - String& rExtension ) const +bool SvNumberformat::GetNewCurrencySymbol( OUString& rSymbol, + OUString& rExtension ) const { for ( sal_uInt16 j=0; j<4; j++ ) { if ( NumFor[j].GetNewCurrencySymbol( rSymbol, rExtension ) ) return true; } - rSymbol.Erase(); - rExtension.Erase(); + rSymbol = ""; + rExtension = ""; return false; } |