diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2017-04-17 21:35:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-26 08:50:54 +0200 |
commit | c70d49c7c888da8cfd73db8585e7be1f37fc398a (patch) | |
tree | c0e540401850018464ca76300536faf9aa7e27d2 /lingucomponent | |
parent | cd4344d3bdef631b3e64ac12a9e64bc9670c1b7c (diff) |
use strong_int for LanguageType
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448
Reviewed-on: https://gerrit.libreoffice.org/36629
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lingucomponent')
4 files changed, 11 insertions, 11 deletions
diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm index e17240146d78..4c4c23fed3ff 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm @@ -292,7 +292,7 @@ sal_Bool SAL_CALL sal_Int16 nFailure = GetSpellFailure( rWord, rLocale ); if (nFailure != -1) { - sal_Int16 nLang = LinguLocaleToLanguage( rLocale ); + LanguageType nLang = LinguLocaleToLanguage( rLocale ); // postprocess result for errors that should be ignored if ( (!rHelper.IsSpellUpperCase() && IsUpper( rWord, nLang )) || (!rHelper.IsSpellWithDigits() && HasDigits( rWord )) @@ -316,7 +316,7 @@ Reference< XSpellAlternatives > Reference< XSpellAlternatives > xRes; // note: mutex is held by higher up by spell which covers both - sal_Int16 nLang = LinguLocaleToLanguage( rLocale ); + LanguageType 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 686f52fe24b0..29f94cf8babb 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -431,7 +431,7 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL sal_Int16 nFailure = GetSpellFailure( rWord, rLocale ); if (nFailure != -1 && !rWord.match(SPELL_XML, 0)) { - sal_Int16 nLang = LinguLocaleToLanguage( rLocale ); + LanguageType nLang = LinguLocaleToLanguage( rLocale ); // postprocess result for errors that should be ignored const bool bIgnoreError = (!rHelper.IsSpellUpperCase() && IsUpper( rWord, nLang )) || @@ -472,7 +472,7 @@ Reference< XSpellAlternatives > if (n) { - sal_Int16 nLang = LinguLocaleToLanguage( rLocale ); + LanguageType 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 579c45228835..581bae3368e6 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -286,7 +286,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM sal_Int32 stem = 0; sal_Int32 stem2 = 0; - sal_Int16 nLanguage = LinguLocaleToLanguage( rLocale ); + LanguageType nLanguage = LinguLocaleToLanguage( rLocale ); if (LinguIsUnspecified( nLanguage) || aRTerm.isEmpty()) return noMeanings; @@ -375,7 +375,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM if (stem) { xTmpRes2 = xSpell->spell( "<?xml?><query type='analyze'><word>" + - aPTerm + "</word></query>", nLanguage, rProperties ); + aPTerm + "</word></query>", (sal_uInt16)nLanguage, rProperties ); if (xTmpRes2.is()) { Sequence<OUString>seq = xTmpRes2->getAlternatives(); @@ -412,7 +412,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM { Reference< XSpellAlternatives > xTmpRes; xTmpRes = xSpell->spell( "<?xml?><query type='generate'><word>" + - sTerm + "</word>" + codeTerm + "</query>", nLanguage, rProperties ); + sTerm + "</word>" + codeTerm + "</query>", (sal_uInt16)nLanguage, rProperties ); if (xTmpRes.is()) { Sequence<OUString>seq = xTmpRes->getAlternatives(); @@ -464,11 +464,11 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM stem = 1; xSpell.set( xLngSvcMgr->getSpellChecker(), UNO_QUERY ); - if (!xSpell.is() || !xSpell->isValid( SPELLML_SUPPORT, nLanguage, rProperties )) + if (!xSpell.is() || !xSpell->isValid( SPELLML_SUPPORT, (sal_uInt16)nLanguage, rProperties )) return noMeanings; Reference< XSpellAlternatives > xTmpRes; xTmpRes = xSpell->spell( "<?xml?><query type='stem'><word>" + - aRTerm + "</word></query>", nLanguage, rProperties ); + aRTerm + "</word></query>", (sal_uInt16)nLanguage, rProperties ); if (xTmpRes.is()) { Sequence<OUString>seq = xTmpRes->getAlternatives(); @@ -485,7 +485,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM if (!pos) return noMeanings; xTmpRes = xSpell->spell( "<?xml?><query type='stem'><word>" + - aRTerm.copy(pos + 1) + "</word></query>", nLanguage, rProperties ); + aRTerm.copy(pos + 1) + "</word></query>", (sal_uInt16)nLanguage, rProperties ); if (xTmpRes.is()) { Sequence<OUString>seq = xTmpRes->getAlternatives(); diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx index 1fc520e781e9..97a03c039ad9 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx @@ -79,7 +79,7 @@ class Thesaurus : // cache for the Thesaurus dialog Sequence < Reference < css::linguistic2::XMeaning > > prevMeanings; OUString prevTerm; - sal_Int16 prevLocale; + LanguageType prevLocale; Thesaurus(const Thesaurus &) = delete; Thesaurus & operator = (const Thesaurus &) = delete; |