diff options
author | Noel Grandin <noel@peralex.com> | 2013-08-06 11:16:32 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-08-12 11:56:42 +0200 |
commit | 80ef151d967540dfcac54572e6eee643a71ff8c0 (patch) | |
tree | 8f8f88eff37f50e6f471bd851e95a2a3fc3c8155 | |
parent | 624e0c4937c7bed307eddd53bf4a67ee346b742b (diff) |
convert vcl/i18nhelp.hxx from String to OUString
Change-Id: I804a5713a1d793e4828c78f777418c914a6feb71
-rw-r--r-- | include/vcl/i18nhelp.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellLineStyleControl.cxx | 18 | ||||
-rw-r--r-- | vcl/source/app/i18nhelp.cxx | 16 |
3 files changed, 20 insertions, 20 deletions
diff --git a/include/vcl/i18nhelp.hxx b/include/vcl/i18nhelp.hxx index 8ece881a9b03..0ae55a77c514 100644 --- a/include/vcl/i18nhelp.hxx +++ b/include/vcl/i18nhelp.hxx @@ -73,11 +73,11 @@ public: sal_Int32 CompareString( const OUString& rStr1, const OUString& rStr2 ) const; sal_Bool MatchString( const OUString& rStr1, const OUString& rStr2 ) const; - sal_Bool MatchMnemonic( const String& rString, sal_Unicode cMnemonicChar ) const; + sal_Bool MatchMnemonic( const OUString& rString, sal_Unicode cMnemonicChar ) const; - String GetNum( long nNumber, sal_uInt16 nDecimals, sal_Bool bUseThousandSep = sal_True, sal_Bool bTrailingZeros = sal_True ) const; + OUString GetNum( long nNumber, sal_uInt16 nDecimals, sal_Bool bUseThousandSep = sal_True, sal_Bool bTrailingZeros = sal_True ) const; - static String filterFormattingChars( const String& ); + static OUString filterFormattingChars( const OUString& ); }; } // namespace vcl diff --git a/sc/source/ui/sidebar/CellLineStyleControl.cxx b/sc/source/ui/sidebar/CellLineStyleControl.cxx index 39e140a82a39..11ebbf14f720 100644 --- a/sc/source/ui/sidebar/CellLineStyleControl.cxx +++ b/sc/source/ui/sidebar/CellLineStyleControl.cxx @@ -57,15 +57,15 @@ void CellLineStyleControl::Initialize() maCellLineStyleValueSet.InsertItem(i); } - maStr[0] = GetSettings().GetLocaleI18nHelper().GetNum( 5, 2 ).AppendAscii("pt"); - maStr[1] = GetSettings().GetLocaleI18nHelper().GetNum( 250, 2 ).AppendAscii("pt"); - maStr[2] = GetSettings().GetLocaleI18nHelper().GetNum( 400, 2 ).AppendAscii("pt"); - maStr[3] = GetSettings().GetLocaleI18nHelper().GetNum( 500, 2 ).AppendAscii("pt"); - maStr[4] = GetSettings().GetLocaleI18nHelper().GetNum( 110, 2 ).AppendAscii("pt"); - maStr[5] = GetSettings().GetLocaleI18nHelper().GetNum( 260, 2 ).AppendAscii("pt"); - maStr[6] = GetSettings().GetLocaleI18nHelper().GetNum( 450, 2 ).AppendAscii("pt"); - maStr[7] = GetSettings().GetLocaleI18nHelper().GetNum( 505, 2 ).AppendAscii("pt"); - maStr[8] = GetSettings().GetLocaleI18nHelper().GetNum( 750, 2 ).AppendAscii("pt"); + maStr[0] = GetSettings().GetLocaleI18nHelper().GetNum( 5, 2 ) + "pt"; + maStr[1] = GetSettings().GetLocaleI18nHelper().GetNum( 250, 2 ) + "pt"; + maStr[2] = GetSettings().GetLocaleI18nHelper().GetNum( 400, 2 ) + "pt"; + maStr[3] = GetSettings().GetLocaleI18nHelper().GetNum( 500, 2 ) + "pt"; + maStr[4] = GetSettings().GetLocaleI18nHelper().GetNum( 110, 2 ) + "pt"; + maStr[5] = GetSettings().GetLocaleI18nHelper().GetNum( 260, 2 ) + "pt"; + maStr[6] = GetSettings().GetLocaleI18nHelper().GetNum( 450, 2 ) + "pt"; + maStr[7] = GetSettings().GetLocaleI18nHelper().GetNum( 505, 2 ) + "pt"; + maStr[8] = GetSettings().GetLocaleI18nHelper().GetNum( 750, 2 ) + "pt"; maCellLineStyleValueSet.SetUnit(&maStr[0]); for (sal_uInt16 i = 1; i <= CELL_LINE_STYLE_ENTRIES; ++i) diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx index 95d1f5a32de9..829cd96acc25 100644 --- a/vcl/source/app/i18nhelp.cxx +++ b/vcl/source/app/i18nhelp.cxx @@ -97,11 +97,11 @@ inline bool is_formatting_mark( sal_Unicode c ) Of course this copying around is not really good, but looking at i18npool, one more time will not hurt. */ -String vcl::I18nHelper::filterFormattingChars( const String& rStr ) +OUString vcl::I18nHelper::filterFormattingChars( const OUString& rStr ) { - sal_Int32 nUnicodes = rStr.Len(); + sal_Int32 nUnicodes = rStr.getLength(); OUStringBuffer aBuf( nUnicodes ); - const sal_Unicode* pStr = rStr.GetBuffer(); + const sal_Unicode* pStr = rStr.getStr(); while( nUnicodes-- ) { if( ! is_formatting_mark( *pStr ) ) @@ -148,22 +148,22 @@ sal_Bool vcl::I18nHelper::MatchString( const OUString& rStr1, const OUString& rS return ImplGetTransliterationWrapper().isMatch( aStr1, aStr2 ); } -sal_Bool vcl::I18nHelper::MatchMnemonic( const String& rString, sal_Unicode cMnemonicChar ) const +sal_Bool vcl::I18nHelper::MatchMnemonic( const OUString& rString, sal_Unicode cMnemonicChar ) const { ::osl::Guard< ::osl::Mutex > aGuard( ((vcl::I18nHelper*)this)->maMutex ); sal_Bool bEqual = sal_False; - sal_uInt16 n = rString.Search( '~' ); - if ( n != STRING_NOTFOUND ) + sal_Int32 n = rString.indexOf( '~' ); + if ( n != -1 ) { - String aMatchStr( rString, n+1, STRING_LEN ); // not only one char, because of transliteration... + OUString aMatchStr = rString.copy( n+1 ); // not only one char, because of transliteration... bEqual = MatchString( OUString(cMnemonicChar), aMatchStr ); } return bEqual; } -String vcl::I18nHelper::GetNum( long nNumber, sal_uInt16 nDecimals, sal_Bool bUseThousandSep, sal_Bool bTrailingZeros ) const +OUString vcl::I18nHelper::GetNum( long nNumber, sal_uInt16 nDecimals, sal_Bool bUseThousandSep, sal_Bool bTrailingZeros ) const { return ImplGetLocaleDataWrapper().getNum( nNumber, nDecimals, bUseThousandSep, bTrailingZeros ); } |