summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-11-12 15:12:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-11-12 16:06:24 +0100
commit65caa58206bb64c6fa6e482dbd847af1b3c2c1b0 (patch)
tree66a2cd63fb9f2419f34becabf20b4fcf78033fdb
parent7a7ba9cbee91485a9254949d1594352b3629c070 (diff)
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>
-rw-r--r--sot/source/sdstor/stgcache.cxx2
-rw-r--r--starmath/source/dialog.cxx6
-rw-r--r--starmath/source/mathml/mathmlimport.cxx6
-rw-r--r--starmath/source/view.cxx4
-rw-r--r--stoc/source/corereflection/crcomp.cxx8
-rw-r--r--stoc/source/corereflection/criface.cxx4
-rw-r--r--svl/source/numbers/zforlist.cxx4
-rw-r--r--svl/source/numbers/zforscan.cxx6
8 files changed, 20 insertions, 20 deletions
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<OString> 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<XIdlClass>& 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 );