summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-09 08:36:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-10 13:13:15 +0200
commitf71606c920a3f78294da745cd9ef1eacde010224 (patch)
treeb808351112a9b13fb775f7794d18b0cb8b6e1645 /cui/source
parentb28de9d32016a904e4ba457a9a6c62098416c729 (diff)
new loplugin:moveit
look for local variables that can be std::move'd to parameters off by default, since it doesn't do proper data flow analysis Change-Id: I3403a0fcffd165bdea6a772528bc53995c5fdb40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/dialogs/SpellDialog.cxx2
-rw-r--r--cui/source/options/optasian.cxx2
-rw-r--r--cui/source/options/optgdlg.cxx3
-rw-r--r--cui/source/tabpages/autocdlg.cxx4
4 files changed, 5 insertions, 6 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 69cd05462fdf..a537e4060c99 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1808,7 +1808,7 @@ void SentenceEditWindow_Impl::SetAlternatives( const Reference< XSpellAlternativ
aLocale = xAlt->getLocale();
aAlts = xAlt->getAlternatives();
}
- SpellErrorDescription aDesc( false, aWord, aLocale, aAlts, nullptr);
+ SpellErrorDescription aDesc( false, aWord, std::move(aLocale), aAlts, nullptr);
SfxGrabBagItem aSpellErrorDescription(EE_CHAR_GRABBAG);
aSpellErrorDescription.GetGrabBag()["SpellErrorDescription"] <<= aDesc.toSequence();
SetAttrib(aSpellErrorDescription, m_nErrorStart, m_nErrorEnd);
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index 50dce2c1cb8e..84d23b42e906 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -320,7 +320,7 @@ IMPL_LINK_NOARG(SvxAsianLayoutPage, LanguageHdl, weld::ComboBox&, void)
}
if(!bAvail)
{
- LocaleDataWrapper aWrap( aLanguageTag );
+ LocaleDataWrapper aWrap( std::move(aLanguageTag) );
ForbiddenCharacters aForbidden = aWrap.getForbiddenCharacters();
sStart = aForbidden.beginLine;
sEnd = aForbidden.endLine;
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 4a7778973471..f1e3fcf4bf45 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1680,8 +1680,7 @@ IMPL_LINK_NOARG(OfaLanguagesTabPage, LocaleSettingHdl, weld::ComboBox&, void)
m_xCurrencyLB->set_active_text(aDefaultCurr);
// obtain corresponding locale data
- LanguageTag aLanguageTag( eLang);
- LocaleDataWrapper aLocaleWrapper( aLanguageTag );
+ LocaleDataWrapper aLocaleWrapper(( LanguageTag(eLang) ));
// update the decimal separator key of the related CheckBox
OUString sTempLabel(m_sDecimalSeparatorLabel);
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 3892fba34e2f..2947c16e3730 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -699,7 +699,7 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage(weld::Container* pPage, weld::Dia
LanguageTag aLanguageTag( eLastDialogLanguage );
pCompareClass.reset( new CollatorWrapper( comphelper::getProcessComponentContext() ) );
pCompareClass->loadDefaultCollator( aLanguageTag.getLocale(), 0 );
- pCharClass.reset( new CharClass( aLanguageTag ) );
+ pCharClass.reset( new CharClass( std::move(aLanguageTag) ) );
auto nColWidth = m_xReplaceTLB->get_approximate_digit_width() * 32;
m_aReplaceFixedWidths.push_back(nColWidth);
@@ -904,7 +904,7 @@ void OfaAutocorrReplacePage::SetLanguage(LanguageType eSet)
LanguageTag aLanguageTag( eLastDialogLanguage );
pCompareClass.reset( new CollatorWrapper( comphelper::getProcessComponentContext() ) );
pCompareClass->loadDefaultCollator( aLanguageTag.getLocale(), 0 );
- pCharClass.reset( new CharClass( aLanguageTag ) );
+ pCharClass.reset( new CharClass( std::move(aLanguageTag) ) );
ModifyHdl(*m_xShortED);
}
}