From 65ae6af9f460b1a28f3e07480347ff7f90adae38 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 18 Aug 2020 09:43:04 +0200 Subject: loplugin:unusedvarsglobal tackle some read-only vars. Mark some of them const to make it obvious they are not really used, and to make the constantparam plugin see more data. Change-Id: Ia25927745866746aa1aa9d5affd5857ad9f9ee24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100895 Tested-by: Jenkins Reviewed-by: Noel Grandin --- cui/source/dialogs/about.cxx | 4 ++-- cui/source/options/optdict.cxx | 6 ++---- cui/source/tabpages/autocdlg.cxx | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) (limited to 'cui') diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 3d9df9849fc3..84460e2984db 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -158,7 +158,7 @@ OUString AboutDialog::GetVersionString() { OUString AboutDialog::GetBuildString() { - OUString sDefault; + const OUString sDefault; OUString sBuildId(utl::Bootstrap::getBuildVersion(sDefault)); if (sBuildId.isEmpty()) sBuildId = utl::Bootstrap::getBuildIdData(sDefault); @@ -271,4 +271,4 @@ IMPL_LINK_NOARG(AboutDialog, HandleClick, weld::Button &, void) { vcl::unohelper::TextDataObject::CopyStringTo(sInfo, xClipboard); } -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index 58ccf42e3965..5832e8321c53 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -585,10 +585,8 @@ bool SvxEditDictionaryDialog::NewDelHdl(const weld::Widget* pBtn) { if (pBtn == m_xDeletePB.get()) { - OUString aStr; - - m_xWordED->set_text(aStr); - m_xReplaceED->set_text(aStr); + m_xWordED->set_text(""); + m_xReplaceED->set_text(""); m_xDeletePB->set_sensitive(false); int nEntry = m_pWordsLB->get_selected_index(); diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index c82875ece77d..a51ed1f32b6b 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -1404,9 +1404,8 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(bool bFromReset, } m_xDoubleCapsLB->clear(); m_xAbbrevLB->clear(); - OUString sTemp; - m_xAbbrevED->set_text(sTemp); - m_xDoubleCapsED->set_text(sTemp); + m_xAbbrevED->set_text(""); + m_xDoubleCapsED->set_text(""); if(aStringsTable.find(eLang) != aStringsTable.end()) { -- cgit