loplugin:reftotemp in sot..svl

Change-Id: I4c15b3443f411e81eaf7ea0e8c98e8728ab4ca02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176482
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2024-11-12 15:12:00 +02:00
parent 7a7ba9cbee
commit 65caa58206
8 changed files with 20 additions and 20 deletions

View file

@ -213,7 +213,7 @@ bool StgCache::Commit()
std::sort( aToWrite.begin(), aToWrite.end(), StgPage::IsPageGreater ); std::sort( aToWrite.begin(), aToWrite.end(), StgPage::IsPageGreater );
for (StgPage* pWr : aToWrite) for (StgPage* pWr : aToWrite)
{ {
const rtl::Reference< StgPage > &pPage = pWr; const rtl::Reference< StgPage > pPage = pWr;
if ( !Write( pPage->GetPage(), pPage->GetData() ) ) if ( !Write( pPage->GetPage(), pPage->GetData() ) )
return false; return false;
} }

View file

@ -222,7 +222,7 @@ OUString SmPrintOptionsTabPage::GetAllStrings()
for (const auto& label : labels) 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() + " "; sAllStrings += pString->get_label() + " ";
} }
@ -231,7 +231,7 @@ OUString SmPrintOptionsTabPage::GetAllStrings()
for (const auto& check : checkButton) 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() + " "; sAllStrings += pString->get_label() + " ";
} }
@ -239,7 +239,7 @@ OUString SmPrintOptionsTabPage::GetAllStrings()
for (const auto& radio : radioButton) 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() + " "; sAllStrings += pString->get_label() + " ";
} }

View file

@ -497,9 +497,9 @@ void SmXMLImportContext::characters(const OUString& rChars)
1 or more whitespace characters is replaced with one blank character). 1 or more whitespace characters is replaced with one blank character).
*/ */
//collapsing not done yet! //collapsing not done yet!
const OUString& rChars2 = rChars.trim(); const OUString aChars2 = rChars.trim();
if (!rChars2.isEmpty()) if (!aChars2.isEmpty())
TCharacters(rChars2 /*.collapse()*/); TCharacters(aChars2 /*.collapse()*/);
} }
namespace namespace

View file

@ -2229,12 +2229,12 @@ std::optional<OString> SmViewShell::getLOKPayload(int nType, int nViewId) const
void SmViewShell::SendCaretToLOK() const void SmViewShell::SendCaretToLOK() const
{ {
const int nViewId = sal_Int32(GetViewShellId()); 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, libreOfficeKitViewCallbackWithViewId(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR,
*payload, nViewId); *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); libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, *payload);
} }

View file

@ -222,11 +222,11 @@ sal_Bool CompoundIdlClassImpl::isAssignableFrom( const Reference< XIdlClass > &
return true; return true;
else else
{ {
const Sequence< Reference< XIdlClass > > & rSeq = xType->getSuperclasses(); const Sequence< Reference< XIdlClass > > aSeq = xType->getSuperclasses();
if (rSeq.hasElements()) if (aSeq.hasElements())
{ {
OSL_ENSURE( rSeq.getLength() == 1, "### unexpected len of super classes!" ); OSL_ENSURE( aSeq.getLength() == 1, "### unexpected len of super classes!" );
return isAssignableFrom( rSeq[0] ); return isAssignableFrom( aSeq[0] );
} }
} }
} }

View file

@ -708,8 +708,8 @@ sal_Bool InterfaceIdlClassImpl::isAssignableFrom( const Reference< XIdlClass > &
return true; return true;
else else
{ {
const Sequence< Reference< XIdlClass > > & rSeq = xType->getSuperclasses(); const Sequence< Reference< XIdlClass > > aSeq = xType->getSuperclasses();
if (std::any_of(rSeq.begin(), rSeq.end(), if (std::any_of(aSeq.begin(), aSeq.end(),
[this](const Reference<XIdlClass>& rType){ return isAssignableFrom(rType); })) [this](const Reference<XIdlClass>& rType){ return isAssignableFrom(rType); }))
return true; return true;
} }

View file

@ -1175,8 +1175,8 @@ sal_uInt32 SvNFFormatData::ImpGenerateCL(SvNFLanguageData& rCurrentLanguage, con
// new CL combination // new CL combination
if (LocaleDataWrapper::areChecksEnabled()) if (LocaleDataWrapper::areChecksEnabled())
{ {
const LanguageTag& rLoadedLocale = rCurrentLanguage.xLocaleData->getLoadedLanguageTag(); const LanguageTag aLoadedLocale = rCurrentLanguage.xLocaleData->getLoadedLanguageTag();
if ( !rLoadedLocale.equals( rCurrentLanguage.aLanguageTag ) ) if ( !aLoadedLocale.equals( rCurrentLanguage.aLanguageTag ) )
{ {
LocaleDataWrapper::outputCheckMessage( rCurrentLanguage.xLocaleData->appendLocaleInfo( u"SvNumberFormatter::ImpGenerateCL: locales don't match:" )); LocaleDataWrapper::outputCheckMessage( rCurrentLanguage.xLocaleData->appendLocaleInfo( u"SvNumberFormatter::ImpGenerateCL: locales don't match:" ));
} }

View file

@ -264,8 +264,8 @@ void ImpSvNumberformatScan::SetDependentKeywords()
const LocaleDataWrapper* pLocaleData = mrCurrentLanguageData.GetLocaleData(); const LocaleDataWrapper* pLocaleData = mrCurrentLanguageData.GetLocaleData();
// #80023# be sure to generate keywords for the loaded Locale, not for the // #80023# be sure to generate keywords for the loaded Locale, not for the
// requested Locale, otherwise number format codes might not match // requested Locale, otherwise number format codes might not match
const LanguageTag& rLoadedLocale = pLocaleData->getLoadedLanguageTag(); const LanguageTag aLoadedLocale = pLocaleData->getLoadedLanguageTag();
LanguageType eLang = rLoadedLocale.getLanguageType( false); LanguageType eLang = aLoadedLocale.getLanguageType( false);
bool bL10n = (meKeywordLocalization != KeywordLocalization::EnglishOnly); bool bL10n = (meKeywordLocalization != KeywordLocalization::EnglishOnly);
if (bL10n) if (bL10n)
@ -326,7 +326,7 @@ void ImpSvNumberformatScan::SetDependentKeywords()
sKeyword = sEnglishKeyword; sKeyword = sEnglishKeyword;
// Set the uppercase localized General name, e.g. Standard -> STANDARD // 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 ); sNameStandardFormat = lcl_extractStandardGeneralName( aFormat.Code );
sKeyword[NF_KEY_GENERAL] = pCharClass->uppercase( sNameStandardFormat ); sKeyword[NF_KEY_GENERAL] = pCharClass->uppercase( sNameStandardFormat );