summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-11-12 17:09:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-11-12 19:59:33 +0100
commit56e0bd7f4280c52111ba211fee618a412b2b7e9c (patch)
tree17600e9b98071fcdff1a81976b1250cc53459a4d /sw/source/ui
parent285cd7e48ec3f3be2e50b2f3f658ef9aa2092d40 (diff)
loplugin:reftotemp in sw
Change-Id: I370d18643b0c83c60846a0b6f051440a043c647a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176486 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx6
-rw-r--r--sw/source/ui/config/optcomp.cxx8
-rw-r--r--sw/source/ui/config/optload.cxx10
-rw-r--r--sw/source/ui/config/optpage.cxx32
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx4
-rw-r--r--sw/source/ui/index/cnttab.cxx8
6 files changed, 34 insertions, 34 deletions
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index 1079bdc93c55..77d0850f9c03 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -152,7 +152,7 @@ OUString SwMailConfigPage::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() + " ";
}
@@ -160,7 +160,7 @@ OUString SwMailConfigPage::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() + " ";
}
@@ -168,7 +168,7 @@ OUString SwMailConfigPage::GetAllStrings()
for (const auto& btn : buttons)
{
- if (const auto& pString = m_xBuilder->weld_button(btn))
+ if (const auto pString = m_xBuilder->weld_button(btn))
sAllStrings += pString->get_label() + " ";
}
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index f296dbc9f6d4..30d698bf6ed6 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -144,8 +144,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
{
m_xMain->set_sensitive(false);
}
- const OUString& rText = m_xMain->get_label();
- m_xMain->set_label(rText.replaceAll("%DOCNAME", sDocTitle));
+ const OUString aText = m_xMain->get_label();
+ m_xMain->set_label(aText.replaceAll("%DOCNAME", sDocTitle));
}
IMPL_LINK_NOARG(SwCompatibilityOptPage, UseAsDefaultHdl, weld::Button&, void)
@@ -196,7 +196,7 @@ void SwCompatibilityOptPage::SetCurrentOptions()
const bool bReadOnly = defaultCompatOptions.getPropertyReadOnly(option);
if (bReadOnly)
hasReadOnly = true;
- const auto& [docSettingId, shouldNegate] = DocumentSettingForOption(option);
+ const auto [docSettingId, shouldNegate] = DocumentSettingForOption(option);
bool bChecked = rIDocumentSettingAccess.get(docSettingId);
if (shouldNegate)
bChecked = !bChecked;
@@ -228,7 +228,7 @@ OUString SwCompatibilityOptPage::GetAllStrings()
{
OUString sAllStrings;
- if (const auto& pString = m_xBuilder->weld_label(u"label11"_ustr))
+ if (const auto pString = m_xBuilder->weld_label(u"label11"_ustr))
sAllStrings += pString->get_label() + " ";
sAllStrings += m_xDefaultPB->get_label() + " ";
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 6262ad9cfbd8..f3419cb1e968 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -596,7 +596,7 @@ OUString SwLoadOptPage::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() + " ";
}
@@ -605,7 +605,7 @@ OUString SwLoadOptPage::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() + " ";
}
@@ -613,7 +613,7 @@ OUString SwLoadOptPage::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() + " ";
}
@@ -1068,11 +1068,11 @@ OUString SwCaptionOptPage::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() + " ";
}
- if (const auto& pString = m_xBuilder->weld_check_button(u"applyborder"_ustr))
+ if (const auto pString = m_xBuilder->weld_check_button(u"applyborder"_ustr))
sAllStrings += pString->get_label() + " ";
return sAllStrings.replaceAll("_", "");
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index c202a1d0270a..5cb915d69785 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -369,7 +369,7 @@ OUString SwContentOptPage::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() + " ";
}
@@ -391,7 +391,7 @@ OUString SwContentOptPage::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() + " ";
}
@@ -607,7 +607,7 @@ OUString SwAddPrinterTabPage::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() + " ";
}
@@ -617,7 +617,7 @@ OUString SwAddPrinterTabPage::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() + " ";
}
@@ -625,7 +625,7 @@ OUString SwAddPrinterTabPage::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() + " ";
}
@@ -942,7 +942,7 @@ OUString SwStdFontTabPage::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() + " ";
}
@@ -1448,7 +1448,7 @@ OUString SwTableOptionsTabPage::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() + " ";
}
@@ -1457,7 +1457,7 @@ OUString SwTableOptionsTabPage::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() + " ";
}
@@ -1465,7 +1465,7 @@ OUString SwTableOptionsTabPage::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() + " ";
}
@@ -1810,7 +1810,7 @@ OUString SwShdwCursorOptionsTabPage::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() + " ";
}
@@ -1821,7 +1821,7 @@ OUString SwShdwCursorOptionsTabPage::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() + " ";
}
@@ -2292,7 +2292,7 @@ OUString SwRedlineOptionsTabPage::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() + " ";
}
@@ -2707,7 +2707,7 @@ OUString SwCompareOptionsTabPage::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() + " ";
}
@@ -2715,7 +2715,7 @@ OUString SwCompareOptionsTabPage::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() + " ";
}
@@ -2851,11 +2851,11 @@ OUString SwTestTabPage::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() + " ";
}
- if (const auto& pString = m_xBuilder->weld_label(u"label1"_ustr))
+ if (const auto pString = m_xBuilder->weld_label(u"label1"_ustr))
sAllStrings += pString->get_label() + " ";
return sAllStrings.replaceAll("_", "");
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index e6bb4eb1097b..4b530ab8ce05 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2261,7 +2261,7 @@ void SwFramePage::Init(const SfxItemSet& rSet)
if ( m_sDlgType == "ObjectDialog" && ! m_bNew )
{
// disable width and height for math objects
- const SvGlobalName& rFactNm( pSh->GetOLEObject()->getClassID() );
+ const SvGlobalName aFactNm( pSh->GetOLEObject()->getClassID() );
static struct GlobalNameId {
sal_uInt32 n1;
@@ -2275,7 +2275,7 @@ void SwFramePage::Init(const SfxItemSet& rSet)
rId.b8, rId.b9, rId.b10, rId.b11,
rId.b12, rId.b13, rId.b14, rId.b15 );
- if( rFactNm == aGlbNm )
+ if( aFactNm == aGlbNm )
{
// disable size controls for math OLE objects
m_xWidthFT->set_sensitive(false);
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 905b4aeaa984..e2773bd6d363 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1097,8 +1097,8 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
LanguageHdl(nullptr);
for (int nCnt = 0, nEntryCount = m_xSortAlgorithmLB->get_count(); nCnt < nEntryCount; ++nCnt)
{
- const OUString& rEntryData = m_xSortAlgorithmLB->get_id(nCnt);
- if (rEntryData == rDesc.GetSortAlgorithm())
+ const OUString aEntryData = m_xSortAlgorithmLB->get_id(nCnt);
+ if (aEntryData == rDesc.GetSortAlgorithm())
{
m_xSortAlgorithmLB->set_active(nCnt);
break;
@@ -1240,8 +1240,8 @@ void SwTOXSelectTabPage::FillTOXDescription()
rDesc.SetStyleNames(m_aStyleArr[i], i);
rDesc.SetLanguage(m_xLanguageLB->get_active_id());
- const OUString& rEntryData = m_xSortAlgorithmLB->get_active_id();
- rDesc.SetSortAlgorithm(rEntryData);
+ const OUString aEntryData = m_xSortAlgorithmLB->get_active_id();
+ rDesc.SetSortAlgorithm(aEntryData);
}
void SwTOXSelectTabPage::Reset( const SfxItemSet* )