[Libreoffice-commits] core.git: svx/source

Dr. David Alan Gilbert (via logerrit) logerrit at kemper.freedesktop.org
Sun Jan 24 16:20:51 UTC 2021


 svx/source/dialog/langbox.cxx |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 22070dfc6b9645346de46d90858b6a6b17d8259f
Author:     Dr. David Alan Gilbert <dave at treblig.org>
AuthorDate: Sun Jan 24 03:01:42 2021 +0000
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Jan 24 17:20:07 2021 +0100

    SvxLanguageBox::SetLanguageList  Merge if's
    
    Cppcheck noticed a run of 3 if's with the same condition next to each
    other; they're fall out of e54d65dea830c which simplified the conditions
    to all be the same.
    Squash them.
    
    Change-Id: I5f0b928b9a629dc43cc62cc03ab6ced2a4b42b2d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109851
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 5b7526d94084..49f608629890 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -224,14 +224,10 @@ void SvxLanguageBox::SetLanguageList(SvxLanguageListFlags nLangList, bool bHasLa
         {
             aTmp = xAvail->getAvailableLocales( SN_SPELLCHECKER );
             aSpellAvailLang = lcl_LocaleSeqToLangSeq( aTmp );
-        }
-        if (bAddAvailable)
-        {
+
             aTmp = xAvail->getAvailableLocales( SN_HYPHENATOR );
             aHyphAvailLang = lcl_LocaleSeqToLangSeq( aTmp );
-        }
-        if (bAddAvailable)
-        {
+
             aTmp = xAvail->getAvailableLocales( SN_THESAURUS );
             aThesAvailLang = lcl_LocaleSeqToLangSeq( aTmp );
         }


More information about the Libreoffice-commits mailing list