Kaydet (Commit) fa22a60e authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

com::sun::star->css in include/i18nlangtag,i18nutil

Change-Id: I847a5729911474e8dd72e28aea53969f7037ce9b
Reviewed-on: https://gerrit.libreoffice.org/19526Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst c1d0074d
...@@ -23,7 +23,7 @@ typedef struct _rtl_Locale rtl_Locale; // as in rtl/locale.h ...@@ -23,7 +23,7 @@ typedef struct _rtl_Locale rtl_Locale; // as in rtl/locale.h
/** The ISO 639-2 code reserved for local use used to indicate that a /** The ISO 639-2 code reserved for local use used to indicate that a
com::sun::star::Locale contains a BCP 47 string in its Variant field. The css::Locale contains a BCP 47 string in its Variant field. The
Locale's Language field then will contain this language code. Locale's Language field then will contain this language code.
@see LanguageTag::getLocale() @see LanguageTag::getLocale()
...@@ -71,7 +71,7 @@ public: ...@@ -71,7 +71,7 @@ public:
explicit LanguageTag( const OUString & rBcp47LanguageTag, bool bCanonicalize = false ); explicit LanguageTag( const OUString & rBcp47LanguageTag, bool bCanonicalize = false );
/** Init LanguageTag with Locale. */ /** Init LanguageTag with Locale. */
explicit LanguageTag( const com::sun::star::lang::Locale & rLocale ); explicit LanguageTag( const css::lang::Locale & rLocale );
/** Init LanguageTag with LanguageType MS-LangID. */ /** Init LanguageTag with LanguageType MS-LangID. */
explicit LanguageTag( LanguageType nLanguage ); explicit LanguageTag( LanguageType nLanguage );
...@@ -107,7 +107,7 @@ public: ...@@ -107,7 +107,7 @@ public:
/** Obtain language tag as Locale. /** Obtain language tag as Locale.
As a convention, language tags that can not be expressed as "pure" As a convention, language tags that can not be expressed as "pure"
com::sun::star::lang::Locale content using Language and Country fields css::lang::Locale content using Language and Country fields
store "qlt" (ISO 639 reserved for local use) in the Language field and store "qlt" (ISO 639 reserved for local use) in the Language field and
the entire BCP 47 language tag in the Variant field. The Country field the entire BCP 47 language tag in the Variant field. The Country field
contains the corresponding ISO 3166 country code _if_ there is one, or contains the corresponding ISO 3166 country code _if_ there is one, or
...@@ -118,7 +118,7 @@ public: ...@@ -118,7 +118,7 @@ public:
locale to the real locale used. locale to the real locale used.
If FALSE, return an empty Locale for such a tag. If FALSE, return an empty Locale for such a tag.
*/ */
const com::sun::star::lang::Locale & getLocale( bool bResolveSystem = true ) const; const css::lang::Locale & getLocale( bool bResolveSystem = true ) const;
/** Obtain mapping to MS-LangID. /** Obtain mapping to MS-LangID.
...@@ -242,7 +242,7 @@ public: ...@@ -242,7 +242,7 @@ public:
LanguageTag & reset( const OUString & rBcp47LanguageTag, bool bCanonicalize = false ); LanguageTag & reset( const OUString & rBcp47LanguageTag, bool bCanonicalize = false );
/** Reset with Locale. */ /** Reset with Locale. */
LanguageTag & reset( const com::sun::star::lang::Locale & rLocale ); LanguageTag & reset( const css::lang::Locale & rLocale );
/** Reset with LanguageType MS-LangID. */ /** Reset with LanguageType MS-LangID. */
LanguageTag & reset( LanguageType nLanguage ); LanguageTag & reset( LanguageType nLanguage );
...@@ -354,9 +354,9 @@ public: ...@@ -354,9 +354,9 @@ public:
locale list. If no matching locale could be found it points to locale list. If no matching locale could be found it points to
the end of the list. the end of the list.
*/ */
static ::std::vector< com::sun::star::lang::Locale >::const_iterator getMatchingFallback( static ::std::vector< css::lang::Locale >::const_iterator getMatchingFallback(
const ::std::vector< com::sun::star::lang::Locale > & rList, const ::std::vector< css::lang::Locale > & rList,
const com::sun::star::lang::Locale & rReference ); const css::lang::Locale & rReference );
/** Test equality of two LanguageTag, possibly resolving system locale. /** Test equality of two LanguageTag, possibly resolving system locale.
...@@ -398,7 +398,7 @@ public: ...@@ -398,7 +398,7 @@ public:
locale to the real locale used. locale to the real locale used.
If FALSE, return an empty Locale for such a tag. If FALSE, return an empty Locale for such a tag.
*/ */
static com::sun::star::lang::Locale convertToLocale( LanguageType nLangID, bool bResolveSystem = true ); static css::lang::Locale convertToLocale( LanguageType nLangID, bool bResolveSystem = true );
/** Convert Locale to MS-LangID. /** Convert Locale to MS-LangID.
...@@ -407,7 +407,7 @@ public: ...@@ -407,7 +407,7 @@ public:
locale to the real locale used. locale to the real locale used.
If FALSE, return LANGUAGE_SYSTEM for such a tag. If FALSE, return LANGUAGE_SYSTEM for such a tag.
*/ */
static LanguageType convertToLanguageType( const com::sun::star::lang::Locale& rLocale, bool bResolveSystem = true ); static LanguageType convertToLanguageType( const css::lang::Locale& rLocale, bool bResolveSystem = true );
/** Convert MS-LangID to BCP 47 string. /** Convert MS-LangID to BCP 47 string.
...@@ -425,7 +425,7 @@ public: ...@@ -425,7 +425,7 @@ public:
locale to the real locale used. locale to the real locale used.
If FALSE, return an empty OUString for such a tag. If FALSE, return an empty OUString for such a tag.
*/ */
static OUString convertToBcp47( const com::sun::star::lang::Locale& rLocale, bool bResolveSystem = true ); static OUString convertToBcp47( const css::lang::Locale& rLocale, bool bResolveSystem = true );
/** Convert BCP 47 string to Locale, convenience method. /** Convert BCP 47 string to Locale, convenience method.
...@@ -439,7 +439,7 @@ public: ...@@ -439,7 +439,7 @@ public:
locale to the real locale used. locale to the real locale used.
If FALSE, return an empty Locale for such a tag. If FALSE, return an empty Locale for such a tag.
*/ */
static com::sun::star::lang::Locale convertToLocale( const OUString& rBcp47, bool bResolveSystem = true ); static css::lang::Locale convertToLocale( const OUString& rBcp47, bool bResolveSystem = true );
/** Convert BCP 47 string to MS-LangID, convenience method. /** Convert BCP 47 string to MS-LangID, convenience method.
...@@ -479,7 +479,7 @@ public: ...@@ -479,7 +479,7 @@ public:
Always resolves an empty tag to the system locale. Always resolves an empty tag to the system locale.
*/ */
static com::sun::star::lang::Locale convertToLocaleWithFallback( const OUString& rBcp47 ); static css::lang::Locale convertToLocaleWithFallback( const OUString& rBcp47 );
/** If rString represents a valid BCP 47 language tag. /** If rString represents a valid BCP 47 language tag.
...@@ -511,7 +511,7 @@ public: ...@@ -511,7 +511,7 @@ public:
private: private:
mutable com::sun::star::lang::Locale maLocale; mutable css::lang::Locale maLocale;
mutable OUString maBcp47; mutable OUString maBcp47;
mutable LanguageType mnLangID; mutable LanguageType mnLangID;
mutable ImplPtr mpImpl; mutable ImplPtr mpImpl;
......
...@@ -94,8 +94,7 @@ public: ...@@ -94,8 +94,7 @@ public:
designating the SYSTEM language. Returns the same Locale if an exact designating the SYSTEM language. Returns the same Locale if an exact
match was found. match was found.
*/ */
static ::com::sun::star::lang::Locale getFallbackLocale( static css::lang::Locale getFallbackLocale( const css::lang::Locale & rLocale );
const ::com::sun::star::lang::Locale & rLocale );
// TODO: refactor to LanguageTag, used only in // TODO: refactor to LanguageTag, used only in
...@@ -129,10 +128,10 @@ public: ...@@ -129,10 +128,10 @@ public:
static bool isKorean( LanguageType nLang ); static bool isKorean( LanguageType nLang );
/** Whether locale is a simplified chinese locale */ /** Whether locale is a simplified chinese locale */
static bool isSimplifiedChinese( const ::com::sun::star::lang::Locale & rLocale ); static bool isSimplifiedChinese( const css::lang::Locale & rLocale );
/** Whether locale is a traditional chinese locale */ /** Whether locale is a traditional chinese locale */
static bool isTraditionalChinese( const ::com::sun::star::lang::Locale & rLocale ); static bool isTraditionalChinese( const css::lang::Locale & rLocale );
/** Whether locale is one where family name comes first, e.g. Japan, Hungary, Samoa */ /** Whether locale is one where family name comes first, e.g. Japan, Hungary, Samoa */
static bool isFamilyNameFirst( LanguageType nLang ); static bool isFamilyNameFirst( LanguageType nLang );
...@@ -149,7 +148,7 @@ public: ...@@ -149,7 +148,7 @@ public:
static bool needsSequenceChecking( LanguageType nLang ); static bool needsSequenceChecking( LanguageType nLang );
/** Get ::com::sun::star::i18n::ScriptType of locale. */ /** Get css::i18n::ScriptType of locale. */
static sal_Int16 getScriptType( LanguageType nLang ); static sal_Int16 getScriptType( LanguageType nLang );
/** Whether locale is "Western" but not Latin script, e.g. Cyrillic or Greek. */ /** Whether locale is "Western" but not Latin script, e.g. Cyrillic or Greek. */
...@@ -228,8 +227,8 @@ public: ...@@ -228,8 +227,8 @@ public:
friend class LanguageTag; friend class LanguageTag;
friend class LanguageTagImpl; friend class LanguageTagImpl;
friend ::com::sun::star::lang::Locale MsLangId::getFallbackLocale( friend css::lang::Locale MsLangId::getFallbackLocale(
const ::com::sun::star::lang::Locale & rLocale ); const css::lang::Locale & rLocale );
friend LanguageType MsLangId::convertUnxByteStringToLanguage( friend LanguageType MsLangId::convertUnxByteStringToLanguage(
const OString& rString ); const OString& rString );
...@@ -239,19 +238,19 @@ public: ...@@ -239,19 +238,19 @@ public:
language name designating LANGUAGE_SYSTEM. language name designating LANGUAGE_SYSTEM.
*/ */
I18NLANGTAG_DLLPRIVATE static LanguageType convertLocaleToLanguage( I18NLANGTAG_DLLPRIVATE static LanguageType convertLocaleToLanguage(
const ::com::sun::star::lang::Locale & rLocale ); const css::lang::Locale & rLocale );
/** Used by convertLocaleToLanguage(Locale) */ /** Used by convertLocaleToLanguage(Locale) */
I18NLANGTAG_DLLPRIVATE static LanguageType convertLocaleToLanguageImpl( I18NLANGTAG_DLLPRIVATE static LanguageType convertLocaleToLanguageImpl(
const ::com::sun::star::lang::Locale & rLocale ); const css::lang::Locale & rLocale );
/** Convert x-... privateuse, used by convertLocaleToLanguageImpl(Locale) */ /** Convert x-... privateuse, used by convertLocaleToLanguageImpl(Locale) */
I18NLANGTAG_DLLPRIVATE static LanguageType convertPrivateUseToLanguage( I18NLANGTAG_DLLPRIVATE static LanguageType convertPrivateUseToLanguage(
const OUString& rPriv ); const OUString& rPriv );
/** Used by LanguageTag::canonicalize() */ /** Used by LanguageTag::canonicalize() */
I18NLANGTAG_DLLPRIVATE static ::com::sun::star::lang::Locale getOverride( I18NLANGTAG_DLLPRIVATE static css::lang::Locale getOverride(
const ::com::sun::star::lang::Locale & rLocale ); const css::lang::Locale & rLocale );
/** Used by convertLocaleToLanguage(Locale) */ /** Used by convertLocaleToLanguage(Locale) */
I18NLANGTAG_DLLPRIVATE static LanguageType convertIsoNamesToLanguage( I18NLANGTAG_DLLPRIVATE static LanguageType convertIsoNamesToLanguage(
...@@ -264,11 +263,11 @@ public: ...@@ -264,11 +263,11 @@ public:
/** Used by lookupFallbackLocale(Locale) */ /** Used by lookupFallbackLocale(Locale) */
I18NLANGTAG_DLLPRIVATE static com::sun::star::lang::Locale getLocale( I18NLANGTAG_DLLPRIVATE static css::lang::Locale getLocale(
const IsoLanguageCountryEntry * pEntry ); const IsoLanguageCountryEntry * pEntry );
/** Used by lookupFallbackLocale(Locale) */ /** Used by lookupFallbackLocale(Locale) */
I18NLANGTAG_DLLPRIVATE static com::sun::star::lang::Locale getLocale( I18NLANGTAG_DLLPRIVATE static css::lang::Locale getLocale(
const IsoLanguageScriptCountryEntry * pEntry ); const IsoLanguageScriptCountryEntry * pEntry );
...@@ -279,7 +278,7 @@ public: ...@@ -279,7 +278,7 @@ public:
If bResolveSystem==false, a LANGUAGE_SYSTEM results in an If bResolveSystem==false, a LANGUAGE_SYSTEM results in an
empty Locale. empty Locale.
*/ */
I18NLANGTAG_DLLPRIVATE static ::com::sun::star::lang::Locale convertLanguageToLocale( I18NLANGTAG_DLLPRIVATE static css::lang::Locale convertLanguageToLocale(
LanguageType nLang, bool bResolveSystem ); LanguageType nLang, bool bResolveSystem );
/** Used by convertLanguageToLocale(LanguageType,bool) and /** Used by convertLanguageToLocale(LanguageType,bool) and
...@@ -297,11 +296,11 @@ public: ...@@ -297,11 +296,11 @@ public:
for that case. for that case.
*/ */
I18NLANGTAG_DLLPRIVATE static void convertLanguageToLocaleImpl( I18NLANGTAG_DLLPRIVATE static void convertLanguageToLocaleImpl(
LanguageType nLang, ::com::sun::star::lang::Locale & rLocale, bool bIgnoreOverride ); LanguageType nLang, css::lang::Locale & rLocale, bool bIgnoreOverride );
I18NLANGTAG_DLLPRIVATE static ::com::sun::star::lang::Locale lookupFallbackLocale( I18NLANGTAG_DLLPRIVATE static css::lang::Locale lookupFallbackLocale(
const ::com::sun::star::lang::Locale & rLocale ); const css::lang::Locale & rLocale );
}; };
private: private:
......
...@@ -70,9 +70,9 @@ struct MappingElement ...@@ -70,9 +70,9 @@ struct MappingElement
class I18NUTIL_DLLPUBLIC casefolding class I18NUTIL_DLLPUBLIC casefolding
{ {
public: public:
static Mapping& getValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 len, com::sun::star::lang::Locale& aLocale, sal_uInt8 nMappingType) throw (com::sun::star::uno::RuntimeException); static Mapping& getValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 len, css::lang::Locale& aLocale, sal_uInt8 nMappingType) throw (css::uno::RuntimeException);
static Mapping& getConditionalValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 len, com::sun::star::lang::Locale& aLocale, sal_uInt8 nMappingType) throw (com::sun::star::uno::RuntimeException); static Mapping& getConditionalValue(const sal_Unicode* str, sal_Int32 pos, sal_Int32 len, css::lang::Locale& aLocale, sal_uInt8 nMappingType) throw (css::uno::RuntimeException);
static sal_Unicode getNextChar(const sal_Unicode *str, sal_Int32& idx, sal_Int32 len, MappingElement& e, com::sun::star::lang::Locale& aLocale,sal_uInt8 nMappingtype, TransliterationModules moduleLoaded) throw (com::sun::star::uno::RuntimeException); static sal_Unicode getNextChar(const sal_Unicode *str, sal_Int32& idx, sal_Int32 len, MappingElement& e, css::lang::Locale& aLocale,sal_uInt8 nMappingtype, TransliterationModules moduleLoaded) throw (css::uno::RuntimeException);
}; };
......
...@@ -135,7 +135,7 @@ public: ...@@ -135,7 +135,7 @@ public:
bool doSloppyFit(); bool doSloppyFit();
static PaperInfo getSystemDefaultPaper(); static PaperInfo getSystemDefaultPaper();
static PaperInfo getDefaultPaperForLocale(const ::com::sun::star::lang::Locale & rLocale); static PaperInfo getDefaultPaperForLocale(const css::lang::Locale & rLocale);
static Paper fromPSName(const OString &rName); static Paper fromPSName(const OString &rName);
static OString toPSName(Paper eType); static OString toPSName(Paper eType);
......
...@@ -39,8 +39,8 @@ public: ...@@ -39,8 +39,8 @@ public:
static sal_Int16 SAL_CALL getUnicodeType( const sal_Unicode ch ); static sal_Int16 SAL_CALL getUnicodeType( const sal_Unicode ch );
static sal_Int16 SAL_CALL getUnicodeScriptType( const sal_Unicode ch, const ScriptTypeList *typeList = NULL, sal_Int16 unknownType = 0 ); static sal_Int16 SAL_CALL getUnicodeScriptType( const sal_Unicode ch, const ScriptTypeList *typeList = NULL, sal_Int16 unknownType = 0 );
static sal_Unicode SAL_CALL getUnicodeScriptStart(com::sun::star::i18n::UnicodeScript type); static sal_Unicode SAL_CALL getUnicodeScriptStart(css::i18n::UnicodeScript type);
static sal_Unicode SAL_CALL getUnicodeScriptEnd(com::sun::star::i18n::UnicodeScript type); static sal_Unicode SAL_CALL getUnicodeScriptEnd(css::i18n::UnicodeScript type);
static sal_uInt8 SAL_CALL getUnicodeDirection( const sal_Unicode ch ); static sal_uInt8 SAL_CALL getUnicodeDirection( const sal_Unicode ch );
static bool SAL_CALL isControl( const sal_Unicode ch); static bool SAL_CALL isControl( const sal_Unicode ch);
static bool SAL_CALL isAlpha( const sal_Unicode ch); static bool SAL_CALL isAlpha( const sal_Unicode ch);
......
...@@ -40,9 +40,9 @@ public: ...@@ -40,9 +40,9 @@ public:
static oneToOneMapping& getfullKana2halfKanaTable(); static oneToOneMapping& getfullKana2halfKanaTable();
static oneToOneMapping& gethalfKana2fullKanaTable(); static oneToOneMapping& gethalfKana2fullKanaTable();
static OUString decompose_ja_voiced_sound_marks(const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, com::sun::star::uno::Sequence< sal_Int32 >& offset, bool useOffset); static OUString decompose_ja_voiced_sound_marks(const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 >& offset, bool useOffset);
static sal_Unicode decompose_ja_voiced_sound_marksChar2Char (sal_Unicode inChar); static sal_Unicode decompose_ja_voiced_sound_marksChar2Char (sal_Unicode inChar);
static OUString compose_ja_voiced_sound_marks(const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, com::sun::star::uno::Sequence< sal_Int32 >& offset, bool useOffset, sal_Int32 nFlags = 0 ); static OUString compose_ja_voiced_sound_marks(const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 >& offset, bool useOffset, sal_Int32 nFlags = 0 );
static sal_Unicode getCompositionChar(sal_Unicode c1, sal_Unicode c2); static sal_Unicode getCompositionChar(sal_Unicode c1, sal_Unicode c2);
}; };
......
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