diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-06-03 09:20:49 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-06-04 10:34:24 +0200 |
commit | 354aefec42de856b4ab6201ada54a3a3c630b4bd (patch) | |
tree | ad01bdd049feb4c3b115b57836d3c535e8f749f2 /cui | |
parent | c9bc4f1eec5d66db36b6f9d845eb1a2d46e732bb (diff) |
Upcoming loplugin:elidestringvar: cui
Change-Id: I48c4f69a1fb2e4591eab81c2b0019d7d7d43947b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95395
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/SvxConfigPageHelper.cxx | 4 | ||||
-rw-r--r-- | cui/source/customize/SvxNotebookbarConfigPage.cxx | 3 | ||||
-rw-r--r-- | cui/source/customize/cfg.cxx | 6 | ||||
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 8 | ||||
-rw-r--r-- | cui/source/dialogs/hangulhanjadlg.cxx | 3 | ||||
-rw-r--r-- | cui/source/dialogs/scriptdlg.cxx | 3 |
6 files changed, 6 insertions, 21 deletions
diff --git a/cui/source/customize/SvxConfigPageHelper.cxx b/cui/source/customize/SvxConfigPageHelper.cxx index 3ac1ca9e479f..ffe288506508 100644 --- a/cui/source/customize/SvxConfigPageHelper.cxx +++ b/cui/source/customize/SvxConfigPageHelper.cxx @@ -50,9 +50,7 @@ void SvxConfigPageHelper::RemoveEntry( SvxEntries* pEntries, SvxConfigEntry cons OUString SvxConfigPageHelper::replaceSaveInName( const OUString& rMessage, const OUString& rSaveInName ) { - const OUString placeholder("%SAVE IN SELECTION%" ); - - OUString name = rMessage.replaceFirst(placeholder, rSaveInName); + OUString name = rMessage.replaceFirst("%SAVE IN SELECTION%", rSaveInName); return name; } diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx index 3903a3366eb6..b8c3a8d72a49 100644 --- a/cui/source/customize/SvxNotebookbarConfigPage.cxx +++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx @@ -249,8 +249,7 @@ void SvxConfigPage::InsertEntryIntoNotebookbarTabUI(const OUString& sClassId, if (sClassId == "GtkSeparatorMenuItem" || sClassId == "GtkSeparator") { - OUString sDataInTree = "--------------------------------------------"; - rTreeView.set_text(rIter, sDataInTree, nStartCol + 1); + rTreeView.set_text(rIter, "--------------------------------------------", nStartCol + 1); } else { diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 60b1e2efcddf..412ecf3fe5f6 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -382,8 +382,7 @@ MenuSaveInData::MenuSaveInData( { try { - OUString url( ITEM_MENUBAR_URL ); - m_xMenuSettings = GetConfigManager()->getSettings( url, false ); + m_xMenuSettings = GetConfigManager()->getSettings( ITEM_MENUBAR_URL, false ); } catch ( container::NoSuchElementException& ) { @@ -2152,8 +2151,7 @@ SvxEntries* ToolbarSaveInData::GetEntries() // insert into std::unordered_map to filter duplicates from the parent aToolbarInfo.emplace( systemname, true ); - OUString custom(CUSTOM_TOOLBAR_STR); - if ( systemname.startsWith( custom ) ) + if ( systemname.startsWith( CUSTOM_TOOLBAR_STR ) ) { pEntry->SetUserDefined(); } diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index e1de0c8e0e8f..5bf754957907 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1007,10 +1007,6 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck) nEndPosition += elem.sText.getLength(); if(elem.xAlternatives.is()) { - uno::Reference< container::XNamed > xNamed( elem.xAlternatives, uno::UNO_QUERY ); - OUString sServiceName; - if( xNamed.is() ) - sServiceName = xNamed->getName(); SpellErrorDescription aDesc( false, elem.xAlternatives->getWord(), elem.xAlternatives->getLocale(), elem.xAlternatives->getAlternatives(), nullptr); SfxGrabBagItem aSpellErrorDescription(EE_CHAR_GRABBAG); @@ -1779,15 +1775,11 @@ void SentenceEditWindow_Impl::SetAlternatives( const Reference< XSpellAlternativ OUString aWord; lang::Locale aLocale; uno::Sequence< OUString > aAlts; - OUString sServiceName; if (xAlt.is()) { aWord = xAlt->getWord(); aLocale = xAlt->getLocale(); aAlts = xAlt->getAlternatives(); - uno::Reference< container::XNamed > xNamed( xAlt, uno::UNO_QUERY ); - if (xNamed.is()) - sServiceName = xNamed->getName(); } SpellErrorDescription aDesc( false, aWord, aLocale, aAlts, nullptr); SfxGrabBagItem aSpellErrorDescription(EE_CHAR_GRABBAG); diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 5e273b3b1d91..34e93ed378dc 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -294,8 +294,7 @@ namespace svx m_xValueSet->SetLineCount( LINE_CNT ); m_xValueSet->SetStyle( m_xValueSet->GetStyle() | WB_ITEMBORDER | WB_VSCROLL ); - OUString const aOneCharacter("AU"); - auto nItemWidth = 2 * m_xListBox->get_pixel_size(aOneCharacter).Width(); + auto nItemWidth = 2 * m_xListBox->get_pixel_size("AU").Width(); m_xValueSet->SetItemWidth( nItemWidth ); Size aSize(m_xListBox->get_approximate_digit_width() * 42, m_xListBox->get_text_height() * 5); diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 5319ac68065e..2c1a9326a9fd 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -1144,7 +1144,6 @@ OUString GetErrorMessage( OUString language = unknown; OUString script = unknown; OUString line = unknown; - OUString type = ""; OUString message = eScriptError.Message; if ( !eScriptError.language.isEmpty() ) @@ -1172,7 +1171,7 @@ OUString GetErrorMessage( } return FormatErrorString( - unformatted, language, script, line, type, message ); + unformatted, language, script, line, "", message ); } OUString GetErrorMessage( |