summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
Diffstat (limited to 'lingucomponent')
-rw-r--r--lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx8
-rw-r--r--lingucomponent/source/lingutil/lingutil.cxx2
-rw-r--r--lingucomponent/source/spellcheck/macosxspell/macspellimp.mm4
-rw-r--r--lingucomponent/source/spellcheck/spell/sspellimp.cxx4
-rw-r--r--lingucomponent/source/thesaurus/libnth/nthesimp.cxx4
5 files changed, 11 insertions, 11 deletions
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
index 9bbddae2f85e..749c61571793 100644
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
@@ -479,13 +479,13 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const ::rtl::OUStri
sal_Int16 nPos = (sal_Int16) ((nHyphenationPosAltHyph < nHyphenationPos) ?
nHyphenationPosAltHyph : nHyphenationPos);
// dicretionary hyphenation
- xRes = HyphenatedWord::CreateHyphenatedWord( aWord, LanguageTag( aLocale ).getLanguageType(), nPos,
+ xRes = HyphenatedWord::CreateHyphenatedWord( aWord, LinguLocaleToLanguage( aLocale ), nPos,
aWord.replaceAt(nHyphenationPosAlt + 1, cut[nHyphenationPos], repHyph),
(sal_Int16) nHyphenationPosAltHyph);
}
else
{
- xRes = HyphenatedWord::CreateHyphenatedWord( aWord, LanguageTag( aLocale ).getLanguageType(),
+ xRes = HyphenatedWord::CreateHyphenatedWord( aWord, LinguLocaleToLanguage( aLocale ),
(sal_Int16)nHyphenationPos, aWord, (sal_Int16) nHyphenationPos);
}
}
@@ -536,7 +536,7 @@ Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const
//well as "hyphenate"
if (aWord.getLength() < minLen)
{
- return PossibleHyphens::CreatePossibleHyphens( aWord, LanguageTag( aLocale ).getLanguageType(),
+ return PossibleHyphens::CreatePossibleHyphens( aWord, LinguLocaleToLanguage( aLocale ),
aWord, Sequence< sal_Int16 >() );
}
@@ -683,7 +683,7 @@ Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const
OUString hyphenatedWord = hyphenatedWordBuffer.makeStringAndClear();
Reference< XPossibleHyphens > xRes = PossibleHyphens::CreatePossibleHyphens(
- aWord, LanguageTag( aLocale ).getLanguageType(), hyphenatedWord, aHyphPos);
+ aWord, LinguLocaleToLanguage( aLocale ), hyphenatedWord, aHyphPos);
delete[] hyphens;
delete[] lcword;
diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx
index 194f0b753f73..8754442e471f 100644
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -216,7 +216,7 @@ void MergeNewStyleDicsAndOldStyleDics(
{
LanguageType nLang = LanguageTag( aIt2->aLocaleNames[0] ).getLanguageType();
- if (nLang == LANGUAGE_DONTKNOW || nLang == LANGUAGE_NONE)
+ if (nLang == LANGUAGE_DONTKNOW || linguistic::LinguIsUnspecified( nLang))
{
OSL_FAIL( "old style dictionary with invalid language found!" );
continue;
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
index d021fc02693c..3149c02d6ddd 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
@@ -296,7 +296,7 @@ sal_Bool SAL_CALL
sal_Int16 nFailure = GetSpellFailure( rWord, rLocale );
if (nFailure != -1)
{
- sal_Int16 nLang = LanguageTag( rLocale ).getLanguageType();
+ sal_Int16 nLang = LinguLocaleToLanguage( rLocale );
// postprocess result for errors that should be ignored
if ( (!rHelper.IsSpellUpperCase() && IsUpper( rWord, nLang ))
|| (!rHelper.IsSpellWithDigits() && HasDigits( rWord ))
@@ -320,7 +320,7 @@ Reference< XSpellAlternatives >
Reference< XSpellAlternatives > xRes;
// note: mutex is held by higher up by spell which covers both
- sal_Int16 nLang = LanguageTag( rLocale ).getLanguageType();
+ sal_Int16 nLang = LinguLocaleToLanguage( rLocale );
int count;
Sequence< OUString > aStr( 0 );
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index 160eed154c4f..273743b57057 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -375,7 +375,7 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL
sal_Int16 nFailure = GetSpellFailure( rWord, rLocale );
if (nFailure != -1 && !rWord.match(A2OU(SPELLML_HEADER), 0))
{
- sal_Int16 nLang = LanguageTag( rLocale ).getLanguageType();
+ sal_Int16 nLang = LinguLocaleToLanguage( rLocale );
// postprocess result for errors that should be ignored
const bool bIgnoreError =
(!rHelper.IsSpellUpperCase() && IsUpper( rWord, nLang )) ||
@@ -418,7 +418,7 @@ Reference< XSpellAlternatives >
if (n)
{
- sal_Int16 nLang = LanguageTag( rLocale ).getLanguageType();
+ sal_Int16 nLang = LinguLocaleToLanguage( rLocale );
int numsug = 0;
Sequence< OUString > aStr( 0 );
diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
index fd4608ec85af..c4d0a7610b84 100644
--- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
+++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx
@@ -301,9 +301,9 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thes
sal_Int32 stem = 0;
sal_Int32 stem2 = 0;
- sal_Int16 nLanguage = LanguageTag( rLocale ).getLanguageType();
+ sal_Int16 nLanguage = LinguLocaleToLanguage( rLocale );
- if (nLanguage == LANGUAGE_NONE || rTerm.isEmpty())
+ if (LinguIsUnspecified( nLanguage) || rTerm.isEmpty())
return noMeanings;
if (!hasLocale( rLocale ))