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

Jochen Nitschke j.nitschke+logerrit at ok.de
Sun Apr 29 12:17:00 UTC 2018


 svx/source/dialog/txencbox.cxx |   23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

New commits:
commit e0317c8d12c9753ab8655a1f45ef8dd50047c414
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Sun Apr 29 12:22:16 2018 +0200

    cppcheck: knownConditionTrueFalse
    
    Change-Id: I1b524568b0c014be381c971cd4152ac3f00db13c
    Reviewed-on: https://gerrit.libreoffice.org/53622
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>

diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx
index e4ba0b09a9d3..b4e446aeee3f 100644
--- a/svx/source/dialog/txencbox.cxx
+++ b/svx/source/dialog/txencbox.cxx
@@ -240,23 +240,20 @@ void TextEncodingBox::FillFromTextEncodingTable(
     {
         bool bInsert = true;
         rtl_TextEncoding nEnc = RID_SVXSTR_TEXTENCODING_TABLE[j].second;
-        if ( bInsert )
+        if ( bExcludeImportSubsets )
         {
-            if ( bExcludeImportSubsets )
+            switch ( nEnc )
             {
-                switch ( nEnc )
-                {
-                    // subsets of RTL_TEXTENCODING_GB_18030
-                    case RTL_TEXTENCODING_GB_2312 :
-                    case RTL_TEXTENCODING_GBK :
-                    case RTL_TEXTENCODING_MS_936 :
-                        bInsert = false;
-                    break;
-                }
+                // subsets of RTL_TEXTENCODING_GB_18030
+                case RTL_TEXTENCODING_GB_2312 :
+                case RTL_TEXTENCODING_GBK :
+                case RTL_TEXTENCODING_MS_936 :
+                    bInsert = false;
+                break;
             }
-            if ( bInsert )
-                InsertTextEncoding(nEnc, SvxResId(RID_SVXSTR_TEXTENCODING_TABLE[j].first));
         }
+        if ( bInsert )
+            InsertTextEncoding(nEnc, SvxResId(RID_SVXSTR_TEXTENCODING_TABLE[j].first));
     }
 }
 


More information about the Libreoffice-commits mailing list