From da95fc2983e9deea30b9b7148a6e10b5423ed3e1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 13 Apr 2019 14:54:59 +0200 Subject: loplugin:sequentialassign in embeddedobj..l10ntools Change-Id: I69377e2f96a376a7a5ccaec268c4f92c00a250f7 Reviewed-on: https://gerrit.libreoffice.org/70705 Tested-by: Jenkins Reviewed-by: Noel Grandin --- i18npool/source/breakiterator/breakiterator_unicode.cxx | 3 +-- i18npool/source/textconversion/textconversionImpl.cxx | 4 +--- i18npool/source/textconversion/textconversion_ko.cxx | 4 +--- 3 files changed, 3 insertions(+), 8 deletions(-) (limited to 'i18npool') diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx index 1a6818bdae30..25b6c2e8b450 100644 --- a/i18npool/source/breakiterator/breakiterator_unicode.cxx +++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx @@ -516,8 +516,7 @@ LineBreakResults SAL_CALL BreakIterator_Unicode::getLineBreak( if (hOptions.hyphenIndex - wBoundary.startPos < nStartPosWordEnd) nStartPosWordEnd = hOptions.hyphenIndex - wBoundary.startPos; #define SPACE 0x0020 while (boundary_with_punctuation > wBoundary.endPos && Text[--boundary_with_punctuation] == SPACE); - uno::Reference< linguistic2::XHyphenatedWord > aHyphenatedWord; - aHyphenatedWord = hOptions.rHyphenator->hyphenate(Text.copy(wBoundary.startPos, + uno::Reference< linguistic2::XHyphenatedWord > aHyphenatedWord = hOptions.rHyphenator->hyphenate(Text.copy(wBoundary.startPos, wBoundary.endPos - wBoundary.startPos), rLocale, static_cast(hOptions.hyphenIndex - wBoundary.startPos - ((hOptions.hyphenIndex == wBoundary.endPos)? nStartPosWordEnd : 0)), hOptions.aHyphenationOptions); if (aHyphenatedWord.is()) { diff --git a/i18npool/source/textconversion/textconversionImpl.cxx b/i18npool/source/textconversion/textconversionImpl.cxx index fa9af75ff839..ecd1ee699b9f 100644 --- a/i18npool/source/textconversion/textconversionImpl.cxx +++ b/i18npool/source/textconversion/textconversionImpl.cxx @@ -80,9 +80,7 @@ TextConversionImpl::getLocaleSpecificTextConversion(const Locale& rLocale) aLocale = rLocale; OUString aPrefix("com.sun.star.i18n.TextConversion_"); - Reference < XInterface > xI; - - xI = m_xContext->getServiceManager()->createInstanceWithContext( + Reference < XInterface > xI = m_xContext->getServiceManager()->createInstanceWithContext( aPrefix + LocaleDataImpl::getFirstLocaleServiceName( aLocale), m_xContext); if (!xI.is()) { diff --git a/i18npool/source/textconversion/textconversion_ko.cxx b/i18npool/source/textconversion/textconversion_ko.cxx index 4e6ef770f613..6552135d1b91 100644 --- a/i18npool/source/textconversion/textconversion_ko.cxx +++ b/i18npool/source/textconversion/textconversion_ko.cxx @@ -44,9 +44,7 @@ namespace i18npool { TextConversion_ko::TextConversion_ko( const Reference < XComponentContext >& xContext ) : TextConversionService("com.sun.star.i18n.TextConversion_ko") { - Reference < XInterface > xI; - - xI = xContext->getServiceManager()->createInstanceWithContext( + Reference < XInterface > xI = xContext->getServiceManager()->createInstanceWithContext( "com.sun.star.i18n.ConversionDictionary_ko", xContext); if ( xI.is() ) -- cgit