diff --git a/sot/source/sdstor/stgcache.cxx b/sot/source/sdstor/stgcache.cxx index 93f7d3090c93..9b0fc316f79a 100644 --- a/sot/source/sdstor/stgcache.cxx +++ b/sot/source/sdstor/stgcache.cxx @@ -213,7 +213,7 @@ bool StgCache::Commit() std::sort( aToWrite.begin(), aToWrite.end(), StgPage::IsPageGreater ); for (StgPage* pWr : aToWrite) { - const rtl::Reference< StgPage > &pPage = pWr; + const rtl::Reference< StgPage > pPage = pWr; if ( !Write( pPage->GetPage(), pPage->GetData() ) ) return false; } diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 86bd8f836bb5..7bcaaca98c89 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -222,7 +222,7 @@ OUString SmPrintOptionsTabPage::GetAllStrings() for (const auto& label : labels) { - if (const auto& pString = m_xBuilder->weld_label(label)) + if (const auto pString = m_xBuilder->weld_label(label)) sAllStrings += pString->get_label() + " "; } @@ -231,7 +231,7 @@ OUString SmPrintOptionsTabPage::GetAllStrings() for (const auto& check : checkButton) { - if (const auto& pString = m_xBuilder->weld_check_button(check)) + if (const auto pString = m_xBuilder->weld_check_button(check)) sAllStrings += pString->get_label() + " "; } @@ -239,7 +239,7 @@ OUString SmPrintOptionsTabPage::GetAllStrings() for (const auto& radio : radioButton) { - if (const auto& pString = m_xBuilder->weld_radio_button(radio)) + if (const auto pString = m_xBuilder->weld_radio_button(radio)) sAllStrings += pString->get_label() + " "; } diff --git a/starmath/source/mathml/mathmlimport.cxx b/starmath/source/mathml/mathmlimport.cxx index 0ac32397e099..d3ec8f949977 100644 --- a/starmath/source/mathml/mathmlimport.cxx +++ b/starmath/source/mathml/mathmlimport.cxx @@ -497,9 +497,9 @@ void SmXMLImportContext::characters(const OUString& rChars) 1 or more whitespace characters is replaced with one blank character). */ //collapsing not done yet! - const OUString& rChars2 = rChars.trim(); - if (!rChars2.isEmpty()) - TCharacters(rChars2 /*.collapse()*/); + const OUString aChars2 = rChars.trim(); + if (!aChars2.isEmpty()) + TCharacters(aChars2 /*.collapse()*/); } namespace diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 70ed1dbb8cb6..cf56852a69aa 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -2229,12 +2229,12 @@ std::optional SmViewShell::getLOKPayload(int nType, int nViewId) const void SmViewShell::SendCaretToLOK() const { const int nViewId = sal_Int32(GetViewShellId()); - if (const auto& payload = getLOKPayload(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, nViewId)) + if (const auto payload = getLOKPayload(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, nViewId)) { libreOfficeKitViewCallbackWithViewId(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, *payload, nViewId); } - if (const auto& payload = getLOKPayload(LOK_CALLBACK_TEXT_SELECTION, nViewId)) + if (const auto payload = getLOKPayload(LOK_CALLBACK_TEXT_SELECTION, nViewId)) { libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, *payload); } diff --git a/stoc/source/corereflection/crcomp.cxx b/stoc/source/corereflection/crcomp.cxx index b370b00adc4a..83b3aa2844c6 100644 --- a/stoc/source/corereflection/crcomp.cxx +++ b/stoc/source/corereflection/crcomp.cxx @@ -222,11 +222,11 @@ sal_Bool CompoundIdlClassImpl::isAssignableFrom( const Reference< XIdlClass > & return true; else { - const Sequence< Reference< XIdlClass > > & rSeq = xType->getSuperclasses(); - if (rSeq.hasElements()) + const Sequence< Reference< XIdlClass > > aSeq = xType->getSuperclasses(); + if (aSeq.hasElements()) { - OSL_ENSURE( rSeq.getLength() == 1, "### unexpected len of super classes!" ); - return isAssignableFrom( rSeq[0] ); + OSL_ENSURE( aSeq.getLength() == 1, "### unexpected len of super classes!" ); + return isAssignableFrom( aSeq[0] ); } } } diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx index 7b35020fb67f..490c5aaa7bab 100644 --- a/stoc/source/corereflection/criface.cxx +++ b/stoc/source/corereflection/criface.cxx @@ -708,8 +708,8 @@ sal_Bool InterfaceIdlClassImpl::isAssignableFrom( const Reference< XIdlClass > & return true; else { - const Sequence< Reference< XIdlClass > > & rSeq = xType->getSuperclasses(); - if (std::any_of(rSeq.begin(), rSeq.end(), + const Sequence< Reference< XIdlClass > > aSeq = xType->getSuperclasses(); + if (std::any_of(aSeq.begin(), aSeq.end(), [this](const Reference& rType){ return isAssignableFrom(rType); })) return true; } diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 7d4143901bd6..5907193a63b3 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -1175,8 +1175,8 @@ sal_uInt32 SvNFFormatData::ImpGenerateCL(SvNFLanguageData& rCurrentLanguage, con // new CL combination if (LocaleDataWrapper::areChecksEnabled()) { - const LanguageTag& rLoadedLocale = rCurrentLanguage.xLocaleData->getLoadedLanguageTag(); - if ( !rLoadedLocale.equals( rCurrentLanguage.aLanguageTag ) ) + const LanguageTag aLoadedLocale = rCurrentLanguage.xLocaleData->getLoadedLanguageTag(); + if ( !aLoadedLocale.equals( rCurrentLanguage.aLanguageTag ) ) { LocaleDataWrapper::outputCheckMessage( rCurrentLanguage.xLocaleData->appendLocaleInfo( u"SvNumberFormatter::ImpGenerateCL: locales don't match:" )); } diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx index 909488cf2889..d79f0bb9d35b 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -264,8 +264,8 @@ void ImpSvNumberformatScan::SetDependentKeywords() const LocaleDataWrapper* pLocaleData = mrCurrentLanguageData.GetLocaleData(); // #80023# be sure to generate keywords for the loaded Locale, not for the // requested Locale, otherwise number format codes might not match - const LanguageTag& rLoadedLocale = pLocaleData->getLoadedLanguageTag(); - LanguageType eLang = rLoadedLocale.getLanguageType( false); + const LanguageTag aLoadedLocale = pLocaleData->getLoadedLanguageTag(); + LanguageType eLang = aLoadedLocale.getLanguageType( false); bool bL10n = (meKeywordLocalization != KeywordLocalization::EnglishOnly); if (bL10n) @@ -326,7 +326,7 @@ void ImpSvNumberformatScan::SetDependentKeywords() sKeyword = sEnglishKeyword; // Set the uppercase localized General name, e.g. Standard -> STANDARD - i18n::NumberFormatCode aFormat = xNFC->getFormatCode( NF_NUMBER_STANDARD, rLoadedLocale.getLocale() ); + i18n::NumberFormatCode aFormat = xNFC->getFormatCode( NF_NUMBER_STANDARD, aLoadedLocale.getLocale() ); sNameStandardFormat = lcl_extractStandardGeneralName( aFormat.Code ); sKeyword[NF_KEY_GENERAL] = pCharClass->uppercase( sNameStandardFormat );