Kaydet (Commit) 4b557ffb authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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
üst 4288c320
...@@ -406,7 +406,7 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo ...@@ -406,7 +406,7 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo
{ {
if (eEnc == RTL_TEXTENCODING_UTF8) if (eEnc == RTL_TEXTENCODING_UTF8)
{ {
if (((unsigned char) *c) >> 6 != 2) if (static_cast<unsigned char>(*c) >> 6 != 2)
leftrep++; leftrep++;
} }
else else
...@@ -468,17 +468,17 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo ...@@ -468,17 +468,17 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo
} }
// handle shortening // handle shortening
sal_Int16 nPos = (sal_Int16) ((nHyphenationPosAltHyph < nHyphenationPos) ? sal_Int16 nPos = static_cast<sal_Int16>((nHyphenationPosAltHyph < nHyphenationPos) ?
nHyphenationPosAltHyph : nHyphenationPos); nHyphenationPosAltHyph : nHyphenationPos);
// discretionary hyphenation // discretionary hyphenation
xRes = HyphenatedWord::CreateHyphenatedWord( aWord, LinguLocaleToLanguage( aLocale ), nPos, xRes = HyphenatedWord::CreateHyphenatedWord( aWord, LinguLocaleToLanguage( aLocale ), nPos,
aWord.replaceAt(nHyphenationPosAlt + 1, cut[nHyphenationPos], repHyph), aWord.replaceAt(nHyphenationPosAlt + 1, cut[nHyphenationPos], repHyph),
(sal_Int16) nHyphenationPosAltHyph); static_cast<sal_Int16>(nHyphenationPosAltHyph));
} }
else else
{ {
xRes = HyphenatedWord::CreateHyphenatedWord( aWord, LinguLocaleToLanguage( aLocale ), xRes = HyphenatedWord::CreateHyphenatedWord( aWord, LinguLocaleToLanguage( aLocale ),
(sal_Int16)nHyphenationPos, aWord, (sal_Int16) nHyphenationPos); static_cast<sal_Int16>(nHyphenationPos), aWord, static_cast<sal_Int16>(nHyphenationPos));
} }
} }
......
...@@ -378,7 +378,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM ...@@ -378,7 +378,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM
if (stem) if (stem)
{ {
xTmpRes2 = xSpell->spell( "<?xml?><query type='analyze'><word>" + 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()) if (xTmpRes2.is())
{ {
Sequence<OUString>seq = xTmpRes2->getAlternatives(); Sequence<OUString>seq = xTmpRes2->getAlternatives();
...@@ -415,7 +415,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM ...@@ -415,7 +415,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM
{ {
Reference< XSpellAlternatives > xTmpRes; Reference< XSpellAlternatives > xTmpRes;
xTmpRes = xSpell->spell( "<?xml?><query type='generate'><word>" + 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()) if (xTmpRes.is())
{ {
Sequence<OUString>seq = xTmpRes->getAlternatives(); Sequence<OUString>seq = xTmpRes->getAlternatives();
...@@ -467,11 +467,11 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM ...@@ -467,11 +467,11 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM
stem = 1; stem = 1;
xSpell.set( xLngSvcMgr->getSpellChecker(), UNO_QUERY ); 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; return noMeanings;
Reference< XSpellAlternatives > xTmpRes; Reference< XSpellAlternatives > xTmpRes;
xTmpRes = xSpell->spell( "<?xml?><query type='stem'><word>" + 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()) if (xTmpRes.is())
{ {
Sequence<OUString>seq = xTmpRes->getAlternatives(); Sequence<OUString>seq = xTmpRes->getAlternatives();
...@@ -488,7 +488,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM ...@@ -488,7 +488,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM
if (!pos) if (!pos)
return noMeanings; return noMeanings;
xTmpRes = xSpell->spell( "<?xml?><query type='stem'><word>" + 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()) if (xTmpRes.is())
{ {
Sequence<OUString>seq = xTmpRes->getAlternatives(); Sequence<OUString>seq = xTmpRes->getAlternatives();
......
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