[Libreoffice-commits] core.git: 2 commits - extras/CustomTarget_autocorr.mk extras/Package_autocorr.mk extras/source i18nlangtag/source

Eike Rathke erack at redhat.com
Wed Sep 11 16:42:33 PDT 2013


 extras/CustomTarget_autocorr.mk                                    |   48 ++---
 extras/Package_autocorr.mk                                         |    8 
 extras/source/autotext/lang/sh-ME/acor/DocumentList.xml            |   17 --
 extras/source/autotext/lang/sh-ME/acor/META-INF/manifest.xml       |    8 
 extras/source/autotext/lang/sh-ME/acor/SentenceExceptList.xml      |   82 ----------
 extras/source/autotext/lang/sh-ME/acor/WordExceptList.xml          |    9 -
 extras/source/autotext/lang/sh-RS/acor/DocumentList.xml            |   17 --
 extras/source/autotext/lang/sh-RS/acor/META-INF/manifest.xml       |    8 
 extras/source/autotext/lang/sh-RS/acor/SentenceExceptList.xml      |   82 ----------
 extras/source/autotext/lang/sh-RS/acor/WordExceptList.xml          |    9 -
 extras/source/autotext/lang/sh-YU/acor/DocumentList.xml            |   17 --
 extras/source/autotext/lang/sh-YU/acor/META-INF/manifest.xml       |    8 
 extras/source/autotext/lang/sh-YU/acor/SentenceExceptList.xml      |   82 ----------
 extras/source/autotext/lang/sh-YU/acor/WordExceptList.xml          |    9 -
 extras/source/autotext/lang/sr-CS/acor/DocumentList.xml            |   14 +
 extras/source/autotext/lang/sr-CS/acor/META-INF/manifest.xml       |    8 
 extras/source/autotext/lang/sr-CS/acor/SentenceExceptList.xml      |   82 ++++++++++
 extras/source/autotext/lang/sr-CS/acor/WordExceptList.xml          |    6 
 extras/source/autotext/lang/sr-Latn-CS/acor/DocumentList.xml       |   17 ++
 extras/source/autotext/lang/sr-Latn-CS/acor/META-INF/manifest.xml  |    8 
 extras/source/autotext/lang/sr-Latn-CS/acor/SentenceExceptList.xml |   82 ++++++++++
 extras/source/autotext/lang/sr-Latn-CS/acor/WordExceptList.xml     |    9 +
 extras/source/autotext/lang/sr-Latn-ME/acor/DocumentList.xml       |   17 ++
 extras/source/autotext/lang/sr-Latn-ME/acor/META-INF/manifest.xml  |    8 
 extras/source/autotext/lang/sr-Latn-ME/acor/SentenceExceptList.xml |   82 ++++++++++
 extras/source/autotext/lang/sr-Latn-ME/acor/WordExceptList.xml     |    9 +
 extras/source/autotext/lang/sr-Latn-RS/acor/DocumentList.xml       |   17 ++
 extras/source/autotext/lang/sr-Latn-RS/acor/META-INF/manifest.xml  |    8 
 extras/source/autotext/lang/sr-Latn-RS/acor/SentenceExceptList.xml |   82 ++++++++++
 extras/source/autotext/lang/sr-Latn-RS/acor/WordExceptList.xml     |    9 +
 extras/source/autotext/lang/sr-YU/acor/DocumentList.xml            |   14 -
 extras/source/autotext/lang/sr-YU/acor/META-INF/manifest.xml       |    8 
 extras/source/autotext/lang/sr-YU/acor/SentenceExceptList.xml      |   82 ----------
 extras/source/autotext/lang/sr-YU/acor/WordExceptList.xml          |    6 
 i18nlangtag/source/languagetag/languagetag.cxx                     |   20 +-
 35 files changed, 496 insertions(+), 496 deletions(-)

New commits:
commit 41b37fb139c397f15a1d66adb21636d6693f963d
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Sep 12 01:41:26 2013 +0200

    aVec may be empty, do not unconditionally access aVec[0]
    
    Change-Id: I6f35fee1e4883cfb15517f56387cd85e2e2f7370

diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 7e3a7d7..89f74f2 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -1280,27 +1280,27 @@ LanguageTag & LanguageTag::makeFallback()
             if (!aVariants.isEmpty())
             {
                 aTmp = aLanguage + "-" + aScript + "-" + aCountry + "-" + aVariants;
-                if (aTmp != aVec[0])
+                if (aVec.empty() || aTmp != aVec[0])
                     aVec.push_back( aTmp);
                 // Language with variant but without country before language
                 // without variant but with country.
                 aTmp = aLanguage + "-" + aScript + "-" + aVariants;
-                if (aTmp != aVec[0])
+                if (aVec.empty() || aTmp != aVec[0])
                     aVec.push_back( aTmp);
                 bHaveLanguageScriptVariant = true;
             }
             aTmp = aLanguage + "-" + aScript + "-" + aCountry;
-            if (aTmp != aVec[0])
+            if (aVec.empty() || aTmp != aVec[0])
                 aVec.push_back( aTmp);
         }
         if (!aVariants.isEmpty() && !bHaveLanguageScriptVariant)
         {
             aTmp = aLanguage + "-" + aScript + "-" + aVariants;
-            if (aTmp != aVec[0])
+            if (aVec.empty() || aTmp != aVec[0])
                 aVec.push_back( aTmp);
         }
         aTmp = aLanguage + "-" + aScript;
-        if (aTmp != aVec[0])
+        if (aVec.empty() || aTmp != aVec[0])
             aVec.push_back( aTmp);
     }
     bool bHaveLanguageVariant = false;
@@ -1309,27 +1309,27 @@ LanguageTag & LanguageTag::makeFallback()
         if (!aVariants.isEmpty())
         {
             aTmp = aLanguage + "-" + aCountry + "-" + aVariants;
-            if (aTmp != aVec[0])
+            if (aVec.empty() || aTmp != aVec[0])
                 aVec.push_back( aTmp);
             // Language with variant but without country before language
             // without variant but with country.
             aTmp = aLanguage + "-" + aVariants;
-            if (aTmp != aVec[0])
+            if (aVec.empty() || aTmp != aVec[0])
                 aVec.push_back( aTmp);
             bHaveLanguageVariant = true;
         }
         aTmp = aLanguage + "-" + aCountry;
-        if (aTmp != aVec[0])
+        if (aVec.empty() || aTmp != aVec[0])
             aVec.push_back( aTmp);
     }
     if (!aVariants.isEmpty() && !bHaveLanguageVariant)
     {
         aTmp = aLanguage + "-" + aVariants;
-        if (aTmp != aVec[0])
+        if (aVec.empty() || aTmp != aVec[0])
             aVec.push_back( aTmp);
     }
     aTmp = aLanguage;
-    if (aTmp != aVec[0])
+    if (aVec.empty() || aTmp != aVec[0])
         aVec.push_back( aTmp);
     return aVec;
 }
commit 565ca0aa0adde34493033818ee52664da41cb931
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Sep 12 01:38:09 2013 +0200

    renamed sh-* to sr-Latn-* and *-YU to *-CS
    
    Change-Id: I442c4d1b8f1a03c19bd119144413c9ac316b4a4c

diff --git a/extras/CustomTarget_autocorr.mk b/extras/CustomTarget_autocorr.mk
index 98542be..15280b1 100644
--- a/extras/CustomTarget_autocorr.mk
+++ b/extras/CustomTarget_autocorr.mk
@@ -41,14 +41,14 @@ extras_AUTOCORR_LANGS := \
 	pt-BR:pt-BR \
 	ro:ro-RO \
 	ru:ru-RU \
-	sh-ME:sh-ME \
-	sh-RS:sh-RS \
-	sh-YU:sh-YU \
 	sk:sk-SK \
 	sl:sl-SI \
+	sr-CS:sr-CS \
+	sr-Latn-CS:sr-Latn-CS \
+	sr-Latn-ME:sr-Latn-ME \
+	sr-Latn-RS:sr-Latn-RS \
 	sr-ME:sr-ME \
 	sr-RS:sr-RS \
-	sr-YU:sr-YU \
 	sv:sv-SE \
 	tr:tr-TR \
 	vi:vi-VN \
@@ -188,18 +188,18 @@ extras_AUTOCORR_XMLFILES := \
 	ru/acor/META-INF/manifest.xml \
 	ru/acor/SentenceExceptList.xml \
 	ru/acor/WordExceptList.xml \
-	sh-ME/acor/DocumentList.xml \
-	sh-ME/acor/META-INF/manifest.xml \
-	sh-ME/acor/SentenceExceptList.xml \
-	sh-ME/acor/WordExceptList.xml \
-	sh-RS/acor/DocumentList.xml \
-	sh-RS/acor/META-INF/manifest.xml \
-	sh-RS/acor/SentenceExceptList.xml \
-	sh-RS/acor/WordExceptList.xml \
-	sh-YU/acor/DocumentList.xml \
-	sh-YU/acor/META-INF/manifest.xml \
-	sh-YU/acor/SentenceExceptList.xml \
-	sh-YU/acor/WordExceptList.xml \
+	sr-Latn-ME/acor/DocumentList.xml \
+	sr-Latn-ME/acor/META-INF/manifest.xml \
+	sr-Latn-ME/acor/SentenceExceptList.xml \
+	sr-Latn-ME/acor/WordExceptList.xml \
+	sr-Latn-RS/acor/DocumentList.xml \
+	sr-Latn-RS/acor/META-INF/manifest.xml \
+	sr-Latn-RS/acor/SentenceExceptList.xml \
+	sr-Latn-RS/acor/WordExceptList.xml \
+	sr-Latn-CS/acor/DocumentList.xml \
+	sr-Latn-CS/acor/META-INF/manifest.xml \
+	sr-Latn-CS/acor/SentenceExceptList.xml \
+	sr-Latn-CS/acor/WordExceptList.xml \
 	sk/acor/DocumentList.xml \
 	sk/acor/META-INF/manifest.xml \
 	sk/acor/SentenceExceptList.xml \
@@ -216,10 +216,10 @@ extras_AUTOCORR_XMLFILES := \
 	sr-RS/acor/META-INF/manifest.xml \
 	sr-RS/acor/SentenceExceptList.xml \
 	sr-RS/acor/WordExceptList.xml \
-	sr-YU/acor/DocumentList.xml \
-	sr-YU/acor/META-INF/manifest.xml \
-	sr-YU/acor/SentenceExceptList.xml \
-	sr-YU/acor/WordExceptList.xml \
+	sr-CS/acor/DocumentList.xml \
+	sr-CS/acor/META-INF/manifest.xml \
+	sr-CS/acor/SentenceExceptList.xml \
+	sr-CS/acor/WordExceptList.xml \
 	sv/acor/BlockList.xml \
 	sv/acor/DocumentList.xml \
 	sv/acor/META-INF/manifest.xml \
@@ -269,14 +269,14 @@ extras_AUTOCORR_MIMETYPEFILES := \
 	pt/acor/mimetype \
 	ro/acor/mimetype \
 	ru/acor/mimetype \
-	sh-ME/acor/mimetype \
-	sh-RS/acor/mimetype \
-	sh-YU/acor/mimetype \
 	sk/acor/mimetype \
 	sl/acor/mimetype \
+	sr-CS/acor/mimetype \
+	sr-Latn-CS/acor/mimetype \
+	sr-Latn-ME/acor/mimetype \
+	sr-Latn-RS/acor/mimetype \
 	sr-ME/acor/mimetype \
 	sr-RS/acor/mimetype \
-	sr-YU/acor/mimetype \
 	sv/acor/mimetype \
 	tr/acor/mimetype \
 	vi/acor/mimetype \
diff --git a/extras/Package_autocorr.mk b/extras/Package_autocorr.mk
index 9ecd63c..4e4a1ea 100644
--- a/extras/Package_autocorr.mk
+++ b/extras/Package_autocorr.mk
@@ -43,14 +43,14 @@ $(eval $(call gb_Package_add_files,extras_autocorr,$(LIBO_SHARE_FOLDER)/autocorr
 	acor_pt-PT.dat \
 	acor_ro-RO.dat \
 	acor_ru-RU.dat \
-	acor_sh-ME.dat \
-	acor_sh-RS.dat \
-	acor_sh-YU.dat \
 	acor_sk-SK.dat \
 	acor_sl-SI.dat \
+	acor_sr-CS.dat \
+	acor_sr-Latn-CS.dat \
+	acor_sr-Latn-ME.dat \
+	acor_sr-Latn-RS.dat \
 	acor_sr-ME.dat \
 	acor_sr-RS.dat \
-	acor_sr-YU.dat \
 	acor_sv-SE.dat \
 	acor_tr-TR.dat \
 	acor_vi-VN.dat \
diff --git a/extras/source/autotext/lang/sr-YU/acor/DocumentList.xml b/extras/source/autotext/lang/sr-CS/acor/DocumentList.xml
similarity index 100%
rename from extras/source/autotext/lang/sr-YU/acor/DocumentList.xml
rename to extras/source/autotext/lang/sr-CS/acor/DocumentList.xml
diff --git a/extras/source/autotext/lang/sh-ME/acor/META-INF/manifest.xml b/extras/source/autotext/lang/sr-CS/acor/META-INF/manifest.xml
similarity index 100%
rename from extras/source/autotext/lang/sh-ME/acor/META-INF/manifest.xml
rename to extras/source/autotext/lang/sr-CS/acor/META-INF/manifest.xml
diff --git a/extras/source/autotext/lang/sr-YU/acor/SentenceExceptList.xml b/extras/source/autotext/lang/sr-CS/acor/SentenceExceptList.xml
similarity index 100%
rename from extras/source/autotext/lang/sr-YU/acor/SentenceExceptList.xml
rename to extras/source/autotext/lang/sr-CS/acor/SentenceExceptList.xml
diff --git a/extras/source/autotext/lang/sr-YU/acor/WordExceptList.xml b/extras/source/autotext/lang/sr-CS/acor/WordExceptList.xml
similarity index 100%
rename from extras/source/autotext/lang/sr-YU/acor/WordExceptList.xml
rename to extras/source/autotext/lang/sr-CS/acor/WordExceptList.xml
diff --git a/extras/source/autotext/lang/sh-ME/acor/mimetype b/extras/source/autotext/lang/sr-CS/acor/mimetype
similarity index 100%
rename from extras/source/autotext/lang/sh-ME/acor/mimetype
rename to extras/source/autotext/lang/sr-CS/acor/mimetype
diff --git a/extras/source/autotext/lang/sh-ME/acor/DocumentList.xml b/extras/source/autotext/lang/sr-Latn-CS/acor/DocumentList.xml
similarity index 100%
rename from extras/source/autotext/lang/sh-ME/acor/DocumentList.xml
rename to extras/source/autotext/lang/sr-Latn-CS/acor/DocumentList.xml
diff --git a/extras/source/autotext/lang/sh-RS/acor/META-INF/manifest.xml b/extras/source/autotext/lang/sr-Latn-CS/acor/META-INF/manifest.xml
similarity index 100%
rename from extras/source/autotext/lang/sh-RS/acor/META-INF/manifest.xml
rename to extras/source/autotext/lang/sr-Latn-CS/acor/META-INF/manifest.xml
diff --git a/extras/source/autotext/lang/sh-ME/acor/SentenceExceptList.xml b/extras/source/autotext/lang/sr-Latn-CS/acor/SentenceExceptList.xml
similarity index 100%
rename from extras/source/autotext/lang/sh-ME/acor/SentenceExceptList.xml
rename to extras/source/autotext/lang/sr-Latn-CS/acor/SentenceExceptList.xml
diff --git a/extras/source/autotext/lang/sh-ME/acor/WordExceptList.xml b/extras/source/autotext/lang/sr-Latn-CS/acor/WordExceptList.xml
similarity index 100%
rename from extras/source/autotext/lang/sh-ME/acor/WordExceptList.xml
rename to extras/source/autotext/lang/sr-Latn-CS/acor/WordExceptList.xml
diff --git a/extras/source/autotext/lang/sh-RS/acor/mimetype b/extras/source/autotext/lang/sr-Latn-CS/acor/mimetype
similarity index 100%
rename from extras/source/autotext/lang/sh-RS/acor/mimetype
rename to extras/source/autotext/lang/sr-Latn-CS/acor/mimetype
diff --git a/extras/source/autotext/lang/sh-RS/acor/DocumentList.xml b/extras/source/autotext/lang/sr-Latn-ME/acor/DocumentList.xml
similarity index 100%
rename from extras/source/autotext/lang/sh-RS/acor/DocumentList.xml
rename to extras/source/autotext/lang/sr-Latn-ME/acor/DocumentList.xml
diff --git a/extras/source/autotext/lang/sh-YU/acor/META-INF/manifest.xml b/extras/source/autotext/lang/sr-Latn-ME/acor/META-INF/manifest.xml
similarity index 100%
rename from extras/source/autotext/lang/sh-YU/acor/META-INF/manifest.xml
rename to extras/source/autotext/lang/sr-Latn-ME/acor/META-INF/manifest.xml
diff --git a/extras/source/autotext/lang/sh-RS/acor/SentenceExceptList.xml b/extras/source/autotext/lang/sr-Latn-ME/acor/SentenceExceptList.xml
similarity index 100%
rename from extras/source/autotext/lang/sh-RS/acor/SentenceExceptList.xml
rename to extras/source/autotext/lang/sr-Latn-ME/acor/SentenceExceptList.xml
diff --git a/extras/source/autotext/lang/sh-RS/acor/WordExceptList.xml b/extras/source/autotext/lang/sr-Latn-ME/acor/WordExceptList.xml
similarity index 100%
rename from extras/source/autotext/lang/sh-RS/acor/WordExceptList.xml
rename to extras/source/autotext/lang/sr-Latn-ME/acor/WordExceptList.xml
diff --git a/extras/source/autotext/lang/sh-YU/acor/mimetype b/extras/source/autotext/lang/sr-Latn-ME/acor/mimetype
similarity index 100%
rename from extras/source/autotext/lang/sh-YU/acor/mimetype
rename to extras/source/autotext/lang/sr-Latn-ME/acor/mimetype
diff --git a/extras/source/autotext/lang/sh-YU/acor/DocumentList.xml b/extras/source/autotext/lang/sr-Latn-RS/acor/DocumentList.xml
similarity index 100%
rename from extras/source/autotext/lang/sh-YU/acor/DocumentList.xml
rename to extras/source/autotext/lang/sr-Latn-RS/acor/DocumentList.xml
diff --git a/extras/source/autotext/lang/sr-YU/acor/META-INF/manifest.xml b/extras/source/autotext/lang/sr-Latn-RS/acor/META-INF/manifest.xml
similarity index 100%
rename from extras/source/autotext/lang/sr-YU/acor/META-INF/manifest.xml
rename to extras/source/autotext/lang/sr-Latn-RS/acor/META-INF/manifest.xml
diff --git a/extras/source/autotext/lang/sh-YU/acor/SentenceExceptList.xml b/extras/source/autotext/lang/sr-Latn-RS/acor/SentenceExceptList.xml
similarity index 100%
rename from extras/source/autotext/lang/sh-YU/acor/SentenceExceptList.xml
rename to extras/source/autotext/lang/sr-Latn-RS/acor/SentenceExceptList.xml
diff --git a/extras/source/autotext/lang/sh-YU/acor/WordExceptList.xml b/extras/source/autotext/lang/sr-Latn-RS/acor/WordExceptList.xml
similarity index 100%
rename from extras/source/autotext/lang/sh-YU/acor/WordExceptList.xml
rename to extras/source/autotext/lang/sr-Latn-RS/acor/WordExceptList.xml
diff --git a/extras/source/autotext/lang/sr-YU/acor/mimetype b/extras/source/autotext/lang/sr-Latn-RS/acor/mimetype
similarity index 100%
rename from extras/source/autotext/lang/sr-YU/acor/mimetype
rename to extras/source/autotext/lang/sr-Latn-RS/acor/mimetype


More information about the Libreoffice-commits mailing list