diff options
author | Eike Rathke <erack@redhat.com> | 2013-03-27 18:48:02 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-03-27 20:38:18 +0100 |
commit | a0edc3fc9cc77172aec6d865e4aaf2500229fd96 (patch) | |
tree | 8f462afa6252dd1d1e125583dc6f7753b18fd940 /i18npool | |
parent | 6558e62d58d0daf1d4a2562ca4618eb1083f30d4 (diff) |
rtl::OUString to OUString
Change-Id: I2ce2b88532a22a8f0379605523e5e67b974bb6ba
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/inc/i18npool/languagetag.hxx | 48 | ||||
-rw-r--r-- | i18npool/source/languagetag/languagetag.cxx | 40 |
2 files changed, 44 insertions, 44 deletions
diff --git a/i18npool/inc/i18npool/languagetag.hxx b/i18npool/inc/i18npool/languagetag.hxx index 7dedc8f16bbc..5b88542b7b71 100644 --- a/i18npool/inc/i18npool/languagetag.hxx +++ b/i18npool/inc/i18npool/languagetag.hxx @@ -45,7 +45,7 @@ public: so specifying bCanonicalize=false is not a guarantee that the tag will stay identical to what was passed. */ - explicit LanguageTag( const rtl::OUString & rBcp47LanguageTag, bool bCanonicalize = false ); + explicit LanguageTag( const OUString & rBcp47LanguageTag, bool bCanonicalize = false ); /** Init LanguageTag with Locale. */ explicit LanguageTag( const com::sun::star::lang::Locale & rLocale ); @@ -59,7 +59,7 @@ public: country to replace the MsLangId::convert...IsoNames...() calls. Avoid use in new code. */ - explicit LanguageTag( const rtl::OUString& rLanguage, const rtl::OUString& rCountry ); + explicit LanguageTag( const OUString& rLanguage, const OUString& rCountry ); /** Init LanguageTag with rtl_Locale. @@ -78,7 +78,7 @@ public: locale to the real locale used. If FALSE, return an empty OUString for such a tag. */ - const rtl::OUString & getBcp47( bool bResolveSystem = true ) const; + const OUString & getBcp47( bool bResolveSystem = true ) const; /** Obtain language tag as Locale. @@ -118,13 +118,13 @@ public: Always resolves an empty tag to the system locale. */ - void getIsoLanguageCountry( rtl::OUString& rLanguage, rtl::OUString& rCountry ) const; + void getIsoLanguageCountry( OUString& rLanguage, OUString& rCountry ) const; /** Get ISO 639 language code, or BCP 47 language. Always resolves an empty tag to the system locale. */ - rtl::OUString getLanguage() const; + OUString getLanguage() const; /** Get ISO 15924 script code, if not the default script according to BCP 47. For default script an empty string is returned. @@ -133,7 +133,7 @@ public: Always resolves an empty tag to the system locale. */ - rtl::OUString getScript() const; + OUString getScript() const; /** Get combined language and script code, separated by '-' if non-default script, if default script only language. @@ -142,21 +142,21 @@ public: Always resolves an empty tag to the system locale. */ - rtl::OUString getLanguageAndScript() const; + OUString getLanguageAndScript() const; /** Get ISO 3166 country alpha code. Empty if the BCP 47 tags denote a region not expressable as 2 character country code. Always resolves an empty tag to the system locale. */ - rtl::OUString getCountry() const; + OUString getCountry() const; /** Get BCP 47 region tag, which may be an ISO 3166 country alpha code or any other BCP 47 region tag. Always resolves an empty tag to the system locale. */ - rtl::OUString getRegion() const; + OUString getRegion() const; /** If language tag has a non-default script specified. */ @@ -197,7 +197,7 @@ public: /** Reset with existing BCP 47 language tag string. See ctor. */ - void reset( const rtl::OUString & rBcp47LanguageTag, bool bCanonicalize = false ); + void reset( const OUString & rBcp47LanguageTag, bool bCanonicalize = false ); /** Reset with Locale. */ void reset( const com::sun::star::lang::Locale & rLocale ); @@ -272,10 +272,10 @@ private: }; mutable com::sun::star::lang::Locale maLocale; - mutable rtl::OUString maBcp47; - mutable rtl::OUString maCachedLanguage; ///< cache getLanguage() - mutable rtl::OUString maCachedScript; ///< cache getScript() - mutable rtl::OUString maCachedCountry; ///< cache getCountry() + mutable OUString maBcp47; + mutable OUString maCachedLanguage; ///< cache getLanguage() + mutable OUString maCachedScript; ///< cache getScript() + mutable OUString maCachedCountry; ///< cache getCountry() mutable void* mpImplLangtag; ///< actually lt_tag_t pointer, encapsulated mutable LanguageType mnLangID; mutable Decision meIsValid; @@ -302,9 +302,9 @@ private: bool canonicalize(); - rtl::OUString getLanguageFromLangtag(); - rtl::OUString getScriptFromLangtag(); - rtl::OUString getRegionFromLangtag(); + OUString getLanguageFromLangtag(); + OUString getScriptFromLangtag(); + OUString getRegionFromLangtag(); void resetVars(); @@ -315,9 +315,9 @@ private: */ bool cacheSimpleLSC(); - static bool isIsoLanguage( const rtl::OUString& rLanguage ); - static bool isIsoScript( const rtl::OUString& rScript ); - static bool isIsoCountry( const rtl::OUString& rRegion ); + static bool isIsoLanguage( const OUString& rLanguage ); + static bool isIsoScript( const OUString& rScript ); + static bool isIsoCountry( const OUString& rRegion ); /** Of a simple language tag of the form lll[-Ssss][-CC] (i.e. one that would fulfill the isIsoODF() condition) extract the portions. @@ -326,10 +326,10 @@ private: @return TRUE if it detected a simple tag, else FALSE. */ - static bool simpleExtract( const rtl::OUString& rBcp47, - rtl::OUString& rLanguage, - rtl::OUString& rScript, - rtl::OUString& rCountry ); + static bool simpleExtract( const OUString& rBcp47, + OUString& rLanguage, + OUString& rScript, + OUString& rCountry ); }; #endif // INCLUDED_I18NPOOL_LANGUAGETAG_HXX diff --git a/i18npool/source/languagetag/languagetag.cxx b/i18npool/source/languagetag/languagetag.cxx index 238627415400..e43bfe379ce2 100644 --- a/i18npool/source/languagetag/languagetag.cxx +++ b/i18npool/source/languagetag/languagetag.cxx @@ -145,7 +145,7 @@ void LiblantagDataRef::setupDataPath() lt_db_set_datadir( maDataPath.getStr()); } -LanguageTag::LanguageTag( const rtl::OUString & rBcp47LanguageTag, bool bCanonicalize ) +LanguageTag::LanguageTag( const OUString & rBcp47LanguageTag, bool bCanonicalize ) : maBcp47( rBcp47LanguageTag), mpImplLangtag( NULL), @@ -209,7 +209,7 @@ LanguageTag::LanguageTag( LanguageType nLanguage ) } -LanguageTag::LanguageTag( const rtl::OUString& rLanguage, const rtl::OUString& rCountry ) +LanguageTag::LanguageTag( const OUString& rLanguage, const OUString& rCountry ) : maLocale( rLanguage, rCountry, ""), mpImplLangtag( NULL), @@ -353,7 +353,7 @@ void LanguageTag::resetVars() } -void LanguageTag::reset( const rtl::OUString & rBcp47LanguageTag, bool bCanonicalize ) +void LanguageTag::reset( const OUString & rBcp47LanguageTag, bool bCanonicalize ) { resetVars(); maBcp47 = rBcp47LanguageTag; @@ -684,7 +684,7 @@ void LanguageTag::convertFromRtlLocale() } -const rtl::OUString & LanguageTag::getBcp47( bool bResolveSystem ) const +const OUString & LanguageTag::getBcp47( bool bResolveSystem ) const { if (!bResolveSystem && mbSystemLocale) return theEmptyBcp47::get(); @@ -699,7 +699,7 @@ const rtl::OUString & LanguageTag::getBcp47( bool bResolveSystem ) const } -rtl::OUString LanguageTag::getLanguageFromLangtag() +OUString LanguageTag::getLanguageFromLangtag() { OUString aLanguage; if (meIsLiblangtagNeeded != DECISION_NO && !mpImplLangtag) @@ -726,7 +726,7 @@ rtl::OUString LanguageTag::getLanguageFromLangtag() } -rtl::OUString LanguageTag::getScriptFromLangtag() +OUString LanguageTag::getScriptFromLangtag() { OUString aScript; if (meIsLiblangtagNeeded != DECISION_NO && !mpImplLangtag) @@ -753,7 +753,7 @@ rtl::OUString LanguageTag::getScriptFromLangtag() } -rtl::OUString LanguageTag::getRegionFromLangtag() +OUString LanguageTag::getRegionFromLangtag() { OUString aRegion; if (meIsLiblangtagNeeded != DECISION_NO && !mpImplLangtag) @@ -817,7 +817,7 @@ LanguageType LanguageTag::getLanguageType( bool bResolveSystem ) const } -void LanguageTag::getIsoLanguageCountry( rtl::OUString& rLanguage, rtl::OUString& rCountry ) const +void LanguageTag::getIsoLanguageCountry( OUString& rLanguage, OUString& rCountry ) const { if (!isIsoLocale()) { @@ -848,7 +848,7 @@ bool isUpperAscii( sal_Unicode c ) // static -bool LanguageTag::isIsoLanguage( const rtl::OUString& rLanguage ) +bool LanguageTag::isIsoLanguage( const OUString& rLanguage ) { /* TODO: ignore case? For now let's see where rubbish is used. */ bool b2chars; @@ -865,7 +865,7 @@ bool LanguageTag::isIsoLanguage( const rtl::OUString& rLanguage ) // static -bool LanguageTag::isIsoCountry( const rtl::OUString& rRegion ) +bool LanguageTag::isIsoCountry( const OUString& rRegion ) { /* TODO: ignore case? For now let's see where rubbish is used. */ if (rRegion.isEmpty() || @@ -878,7 +878,7 @@ bool LanguageTag::isIsoCountry( const rtl::OUString& rRegion ) // static -bool LanguageTag::isIsoScript( const rtl::OUString& rScript ) +bool LanguageTag::isIsoScript( const OUString& rScript ) { /* TODO: ignore case? For now let's see where rubbish is used. */ if (rScript.isEmpty() || @@ -894,7 +894,7 @@ bool LanguageTag::isIsoScript( const rtl::OUString& rScript ) } -rtl::OUString LanguageTag::getLanguage() const +OUString LanguageTag::getLanguage() const { if (!mbCachedLanguage) { @@ -905,7 +905,7 @@ rtl::OUString LanguageTag::getLanguage() const } -rtl::OUString LanguageTag::getScript() const +OUString LanguageTag::getScript() const { if (!mbCachedScript) { @@ -916,7 +916,7 @@ rtl::OUString LanguageTag::getScript() const } -rtl::OUString LanguageTag::getLanguageAndScript() const +OUString LanguageTag::getLanguageAndScript() const { OUString aLanguageScript( getLanguage()); OUString aScript( getScript()); @@ -930,7 +930,7 @@ rtl::OUString LanguageTag::getLanguageAndScript() const } -rtl::OUString LanguageTag::getCountry() const +OUString LanguageTag::getCountry() const { if (!mbCachedCountry) { @@ -943,7 +943,7 @@ rtl::OUString LanguageTag::getCountry() const } -rtl::OUString LanguageTag::getRegion() const +OUString LanguageTag::getRegion() const { return const_cast<LanguageTag*>(this)->getRegionFromLangtag(); } @@ -1115,10 +1115,10 @@ bool LanguageTag::operator!=( const LanguageTag & rLanguageTag ) const // static -bool LanguageTag::simpleExtract( const rtl::OUString& rBcp47, - rtl::OUString& rLanguage, - rtl::OUString& rScript, - rtl::OUString& rCountry ) +bool LanguageTag::simpleExtract( const OUString& rBcp47, + OUString& rLanguage, + OUString& rScript, + OUString& rCountry ) { bool bRet = false; const sal_Int32 nLen = rBcp47.getLength(); |