convert vcl/i18nhelp.hxx from String to OUString
Change-Id: I804a5713a1d793e4828c78f777418c914a6feb71
This commit is contained in:
parent
624e0c4937
commit
80ef151d96
3 changed files with 20 additions and 20 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue