diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-06-04 21:23:01 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-06-05 07:34:21 +0200 |
commit | 4b85108773f9851f358a4daa8869eeadc638d103 (patch) | |
tree | 748991efb0f97fe39abf4c9ec8d24ae0aeec22c3 /sc/source/ui/docshell/docsh4.cxx | |
parent | e2bb284381b3355448f44ea13931aca1aea12e25 (diff) |
Upcoming loplugin:elidestringvar: sc
Change-Id: I0a045ffde0228c316795dbdfce4e0d883bb3b55e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95537
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc/source/ui/docshell/docsh4.cxx')
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 226fad060971..54c011903a02 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1171,8 +1171,6 @@ void ScDocShell::Execute( SfxRequest& rReq ) const OUString aSelectionLangPrefix("Current_"); const OUString aParagraphLangPrefix("Paragraph_"); const OUString aDocLangPrefix("Default_"); - const OUString aNoLang("LANGUAGE_NONE"); - const OUString aResetLang("RESET_LANGUAGES"); bool bSelection = false; bool bParagraph = false; @@ -1193,12 +1191,12 @@ void ScDocShell::Execute( SfxRequest& rReq ) { aLangText = aLangText.replaceAt(nPos, aDocLangPrefix.getLength(), ""); - if ( aLangText == aNoLang ) + if ( aLangText == "LANGUAGE_NONE" ) { eLang = LANGUAGE_NONE; rDoc.SetLanguage( eLang, eCjk, eCtl ); } - else if ( aLangText == aResetLang ) + else if ( aLangText == "RESET_LANGUAGES" ) { bool bAutoSpell; @@ -1296,8 +1294,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) if (pItem2) sIgnoreText = pItem2->GetValue(); - const OUString sSpellingType("Spelling"); - if(sIgnoreText == sSpellingType) + if(sIgnoreText == "Spelling") { ESelection aOldSel = pEditView->GetSelection(); pEditView->SpellIgnoreWord(); |