Kaydet (Commit) 6dcb7199 authored tarafından Noel Grandin's avatar Noel Grandin

convert include/svtools/langtab.hxx from String to OUString

Change-Id: Iae97d742a46a9090a70b247b35b5cecb7bb9883c
üst f4d750cf
...@@ -41,16 +41,16 @@ public: ...@@ -41,16 +41,16 @@ public:
If FALSE, do replace. If FALSE, do replace.
*/ */
const OUString GetString( const LanguageType eType, bool bUserInterfaceSelection = false ) const; const OUString GetString( const LanguageType eType, bool bUserInterfaceSelection = false ) const;
LanguageType GetType( const String& rStr ) const; LanguageType GetType( const OUString& rStr ) const;
sal_uInt32 GetEntryCount() const; sal_uInt32 GetEntryCount() const;
LanguageType GetTypeAtIndex( sal_uInt32 nIndex ) const; LanguageType GetTypeAtIndex( sal_uInt32 nIndex ) const;
static String GetLanguageString( const LanguageType eType ); static OUString GetLanguageString( const LanguageType eType );
}; };
// Add LRE or RLE embedding characters to the string based on the // Add LRE or RLE embedding characters to the string based on the
// String content (see #i78466#, #i32179#) // String content (see #i78466#, #i32179#)
SVT_DLLPUBLIC const String ApplyLreOrRleEmbedding( const String &rText ); SVT_DLLPUBLIC const OUString ApplyLreOrRleEmbedding( const OUString &rText );
#endif #endif
......
...@@ -37,9 +37,9 @@ using namespace ::com::sun::star; ...@@ -37,9 +37,9 @@ using namespace ::com::sun::star;
//------------------------------------------------------------------------ //------------------------------------------------------------------------
SVT_DLLPUBLIC const String ApplyLreOrRleEmbedding( const String &rText ) SVT_DLLPUBLIC const OUString ApplyLreOrRleEmbedding( const OUString &rText )
{ {
const sal_uInt16 nLen = rText.Len(); const sal_Int32 nLen = rText.getLength();
if (nLen == 0) if (nLen == 0)
return String(); return String();
...@@ -49,7 +49,7 @@ SVT_DLLPUBLIC const String ApplyLreOrRleEmbedding( const String &rText ) ...@@ -49,7 +49,7 @@ SVT_DLLPUBLIC const String ApplyLreOrRleEmbedding( const String &rText )
// check if there are alreay embedding characters at the strings start // check if there are alreay embedding characters at the strings start
// if so change nothing // if so change nothing
const sal_Unicode cChar = rText.GetBuffer()[0]; const sal_Unicode cChar = rText[0];
if (cChar == cLRE_Embedding || cChar == cRLE_Embedding) if (cChar == cLRE_Embedding || cChar == cRLE_Embedding)
return rText; return rText;
...@@ -151,7 +151,7 @@ const OUString SvtLanguageTable::GetString( const LanguageType eType, bool bUser ...@@ -151,7 +151,7 @@ const OUString SvtLanguageTable::GetString( const LanguageType eType, bool bUser
return sLangTag; return sLangTag;
} }
String SvtLanguageTable::GetLanguageString( const LanguageType eType ) OUString SvtLanguageTable::GetLanguageString( const LanguageType eType )
{ {
static const SvtLanguageTable aLangTable; static const SvtLanguageTable aLangTable;
return aLangTable.GetString( eType ); return aLangTable.GetString( eType );
...@@ -159,7 +159,7 @@ String SvtLanguageTable::GetLanguageString( const LanguageType eType ) ...@@ -159,7 +159,7 @@ String SvtLanguageTable::GetLanguageString( const LanguageType eType )
//------------------------------------------------------------------------ //------------------------------------------------------------------------
LanguageType SvtLanguageTable::GetType( const String& rStr ) const LanguageType SvtLanguageTable::GetType( const OUString& rStr ) const
{ {
LanguageType eType = LANGUAGE_DONTKNOW; LanguageType eType = LANGUAGE_DONTKNOW;
sal_uInt32 nCount = Count(); sal_uInt32 nCount = Count();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment