i18nlangtag/source/isolang/isolang.cxx |    1 +
 include/i18nlangtag/lang.h             |    1 +
 2 files changed, 2 insertions(+)

New commits:
commit 4e0a7df2dfa10bc52d5dbda34f43e0bc0df22ae7
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Mon Jul 12 18:53:46 2021 +0200
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Mon Jul 12 22:00:10 2021 +0200

    Resolves: tdf#123466 Add Microsoft ill-used {x-none} to known language tags
    
    'x-none' is a private-use tag and letting it escape into the wild
    isn't such a private use..
    
    This just prevents the lt_string_value assertion that doesn't harm
    anyway but seems to confuse people and makes the tag known to
    LibreOffice with a reproducible assigned LCID instead of an
    on-the-fly generated one.
    
    Whatever it may take to actually support something tagged with
    'x-none'.
    
    Change-Id: I3f32c9ba18a2528584a112157509c1dfda75e29c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118788
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Jenkins

diff --git a/i18nlangtag/source/isolang/isolang.cxx 
b/i18nlangtag/source/isolang/isolang.cxx
index 1ca95bb35244..941a73b25766 100644
--- a/i18nlangtag/source/isolang/isolang.cxx
+++ b/i18nlangtag/source/isolang/isolang.cxx
@@ -955,6 +955,7 @@ IsoLangOtherEntry const aImplPrivateUseEntries[] =
     { LANGUAGE_USER_PRIV_NOTRANSLATE,       "x-no-translate" }, //! not BCP47 
but legacy in .xcu configmgr
     { LANGUAGE_USER_PRIV_DEFAULT,           "x-default"      },
     { LANGUAGE_USER_PRIV_COMMENT,           "x-comment"      },
+    { LANGUAGE_USER_PRIV_NONE,              "x-none"         },
     { LANGUAGE_USER_PRIV_JOKER,             "*"              }, //! not BCP47 
but transferable in configmgr
     { LANGUAGE_DONTKNOW,                    nullptr             }  // marks 
end of table
 };
diff --git a/include/i18nlangtag/lang.h b/include/i18nlangtag/lang.h
index b4b6aa69fa6d..c319b068b215 100644
--- a/include/i18nlangtag/lang.h
+++ b/include/i18nlangtag/lang.h
@@ -781,6 +781,7 @@ namespace o3tl
 #define LANGUAGE_ON_THE_FLY_SUB_END         LanguageType(0x3E)
 
 /* 0xFFE0 to 0xFFFF reserved for privateuse and specials. */
+#define LANGUAGE_USER_PRIV_NONE             LanguageType(0xFFEA)  /* 
privateuse "x-none", MS ill-escaped into the wild, primary 0x3ea, sub 0x3f */
 #define LANGUAGE_USER_PRIV_JOKER            LanguageType(0xFFEB)  /* 
privateuse "*" (sic! bad! nasty!), primary 0x3eb, sub 0x3f */
 #define LANGUAGE_USER_PRIV_COMMENT          LanguageType(0xFFEC)  /* 
privateuse "x-comment", primary 0x3ec, sub 0x3f */
 #define LANGUAGE_USER_PRIV_DEFAULT          LanguageType(0xFFED)  /* 
privateuse "x-default", primary 0x3ed, sub 0x3f */
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to