You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2019/06/18 09:09:30 UTC

svn commit: r1861563 - in /openoffice/trunk/main/i18npool: inc/i18npool/lang.h source/isolang/isolang.cxx

Author: mseidel
Date: Tue Jun 18 09:09:30 2019
New Revision: 1861563

URL: http://svn.apache.org/viewvc?rev=1861563&view=rev
Log:
Additions for new language Amharic (am)

Modified:
    openoffice/trunk/main/i18npool/inc/i18npool/lang.h
    openoffice/trunk/main/i18npool/source/isolang/isolang.cxx

Modified: openoffice/trunk/main/i18npool/inc/i18npool/lang.h
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/i18npool/inc/i18npool/lang.h?rev=1861563&r1=1861562&r2=1861563&view=diff
==============================================================================
--- openoffice/trunk/main/i18npool/inc/i18npool/lang.h (original)
+++ openoffice/trunk/main/i18npool/inc/i18npool/lang.h Tue Jun 18 09:09:30 2019
@@ -110,6 +110,7 @@ typedef unsigned short LanguageType;
 #define LANGUAGE_AFRIKAANS                  0x0436
 #define LANGUAGE_ALBANIAN                   0x041C
 #define LANGUAGE_ALSATIAN_FRANCE            0x0484
+#define LANGUAGE_AMHARIC                    0x005E
 #define LANGUAGE_AMHARIC_ETHIOPIA           0x045E
 #define LANGUAGE_ARABIC_ALGERIA             0x1401
 #define LANGUAGE_ARABIC_BAHRAIN             0x3C01

Modified: openoffice/trunk/main/i18npool/source/isolang/isolang.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/i18npool/source/isolang/isolang.cxx?rev=1861563&r1=1861562&r2=1861563&view=diff
==============================================================================
--- openoffice/trunk/main/i18npool/source/isolang/isolang.cxx (original)
+++ openoffice/trunk/main/i18npool/source/isolang/isolang.cxx Tue Jun 18 09:09:30 2019
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -34,21 +34,21 @@
 
 struct IsoLangEngEntry
 {
-    LanguageType        mnLang;
-    sal_Char            maCountry[3];
+	LanguageType        mnLang;
+	sal_Char            maCountry[3];
 };
 
 struct IsoLangNoneStdEntry
 {
-    LanguageType        mnLang;
-    sal_Char            maLangStr[4];
-    sal_Char            maCountry[9];
+	LanguageType        mnLang;
+	sal_Char            maLangStr[4];
+	sal_Char            maCountry[9];
 };
 
 struct IsoLangOtherEntry
 {
-    LanguageType        mnLang;
-    const sal_Char*     mpLangStr;
+	LanguageType        mnLang;
+	const sal_Char*     mpLangStr;
 };
 
 // -----------------------------------------------------------------------
@@ -86,10 +86,10 @@ struct IsoLangOtherEntry
 // language, see code. A call with "en-ZZ" (not in table) would still result in
 // LANGUAGE_ENGLISH.
 
-/* erAck: 2007-07-05T20:01+0200  TODO: The entire suite's "primary language
+/* erAck: 2007-07-05T20:01+0200 TODO: The entire suite's "primary language
  * only" usage and locale fall back should be cleaned up and made consistent. I
  * strongly doubt that most callers exactly expect the behavior described.
- * Currently these primary LangIDs are used literally in OOo code:
+ * Currently these primary LangIDs are used literally in AOO code:
  * LANGUAGE_ENGLISH LANGUAGE_CHINESE LANGUAGE_MALAY
  * LANGUAGE_AZERI LANGUAGE_URDU LANGUAGE_KASHMIRI
  */
@@ -335,6 +335,7 @@ static MsLangId::IsoLangEntry const aImp
     { LANGUAGE_UIGHUR_CHINA,                "ug", "CN" },
     { LANGUAGE_TIGRIGNA_ETHIOPIA,           "ti", "ET" },
     { LANGUAGE_TIGRIGNA_ERITREA,            "ti", "ER" },
+    { LANGUAGE_AMHARIC,                     "am", ""   },
     { LANGUAGE_AMHARIC_ETHIOPIA,            "am", "ET" },
     { LANGUAGE_GUARANI_PARAGUAY,           "gug", "PY" },
     { LANGUAGE_HAWAIIAN_UNITED_STATES,     "haw", "US" },
@@ -933,8 +934,8 @@ LanguageType MsLangId::convertIsoNamesTo
     if ( pFirstLang )
         return pFirstLang->mnLang;
 
-    //  if only the country is set, look for any entry matching the country
-    //  (to allow reading country and language in separate steps, in any order)
+    // if only the country is set, look for any entry matching the country
+    // (to allow reading country and language in separate steps, in any order)
     if ( rCountry.getLength() && !rLang.getLength() )
     {
         const IsoLangEntry* pEntry2 = aImplIsoLangEntries;