diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:20:29 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:20:29 +0100 |
commit | 4b557ffbccf4062b0626ab8d068fa6103ba6a837 (patch) | |
tree | cdef6510accb769759a6e05df30fa86ea514c235 /lingucomponent | |
parent | 4288c320b236e6f1643846a78618c3ce365aec82 (diff) |
More loplugin:cstylecast: lingucomponent
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: I0aed24dcacb95873df50e34a41a54979ad725e9d
Diffstat (limited to 'lingucomponent')
-rw-r--r-- | lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx | 8 | ||||
-rw-r--r-- | lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx index 8aa3c2e5e4aa..4bdaa74d0a2a 100644 --- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx @@ -406,7 +406,7 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo { if (eEnc == RTL_TEXTENCODING_UTF8) { - if (((unsigned char) *c) >> 6 != 2) + if (static_cast<unsigned char>(*c) >> 6 != 2) leftrep++; } else @@ -468,17 +468,17 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo } // handle shortening - sal_Int16 nPos = (sal_Int16) ((nHyphenationPosAltHyph < nHyphenationPos) ? + sal_Int16 nPos = static_cast<sal_Int16>((nHyphenationPosAltHyph < nHyphenationPos) ? nHyphenationPosAltHyph : nHyphenationPos); // discretionary hyphenation xRes = HyphenatedWord::CreateHyphenatedWord( aWord, LinguLocaleToLanguage( aLocale ), nPos, aWord.replaceAt(nHyphenationPosAlt + 1, cut[nHyphenationPos], repHyph), - (sal_Int16) nHyphenationPosAltHyph); + static_cast<sal_Int16>(nHyphenationPosAltHyph)); } else { xRes = HyphenatedWord::CreateHyphenatedWord( aWord, LinguLocaleToLanguage( aLocale ), - (sal_Int16)nHyphenationPos, aWord, (sal_Int16) nHyphenationPos); + static_cast<sal_Int16>(nHyphenationPos), aWord, static_cast<sal_Int16>(nHyphenationPos)); } } diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index 723d06617381..88a6550ddf5e 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -378,7 +378,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM if (stem) { xTmpRes2 = xSpell->spell( "<?xml?><query type='analyze'><word>" + - aPTerm + "</word></query>", (sal_uInt16)nLanguage, rProperties ); + aPTerm + "</word></query>", static_cast<sal_uInt16>(nLanguage), rProperties ); if (xTmpRes2.is()) { Sequence<OUString>seq = xTmpRes2->getAlternatives(); @@ -415,7 +415,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>", (sal_uInt16)nLanguage, rProperties ); + sTerm + "</word>" + codeTerm + "</query>", static_cast<sal_uInt16>(nLanguage), rProperties ); if (xTmpRes.is()) { Sequence<OUString>seq = xTmpRes->getAlternatives(); @@ -467,11 +467,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, (sal_uInt16)nLanguage, rProperties )) + if (!xSpell.is() || !xSpell->isValid( SPELLML_SUPPORT, static_cast<sal_uInt16>(nLanguage), rProperties )) return noMeanings; Reference< XSpellAlternatives > xTmpRes; xTmpRes = xSpell->spell( "<?xml?><query type='stem'><word>" + - aRTerm + "</word></query>", (sal_uInt16)nLanguage, rProperties ); + aRTerm + "</word></query>", static_cast<sal_uInt16>(nLanguage), rProperties ); if (xTmpRes.is()) { Sequence<OUString>seq = xTmpRes->getAlternatives(); @@ -488,7 +488,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>", (sal_uInt16)nLanguage, rProperties ); + aRTerm.copy(pos + 1) + "</word></query>", static_cast<sal_uInt16>(nLanguage), rProperties ); if (xTmpRes.is()) { Sequence<OUString>seq = xTmpRes->getAlternatives(); |