[Libreoffice-commits] .: Branch 'libreoffice-3-3' - 4 commits -

Jan Holesovsky kendy at kemper.freedesktop.org
Thu Nov 25 05:06:41 PST 2010


 0 files changed

New commits:
commit 5402dad2397bed9d87ff2e348e28a99b4f6e06c1
Merge: 124c46e... 74112b4...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Thu Nov 25 14:04:03 2010 +0100

    Merge commit 'ooo/OOO330_m16' into libreoffice-3-3

commit 74112b4eb8953e419446aece91e2a99c1774e147
Merge: 8742380... a17c5f4...
Author: obo <obo at openoffice.org>
Date:   Thu Nov 18 18:39:08 2010 +0100

    CWS-TOOLING: integrate CWS sb136

commit a17c5f4ba0c14b5774a956e8de41bfc5f041f636
Author: sb <sb at openoffice.org>
Date:   Wed Nov 17 15:16:52 2010 +0100

    sb136: #i115386# prefer en[-US] over empty xml:lang value, to accomodate existing extensions with bad .xcu content

diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx
index c20fa49..d387f35 100644
--- a/configmgr/source/childaccess.cxx
+++ b/configmgr/source/childaccess.cxx
@@ -282,8 +282,8 @@ css::uno::Any ChildAccess::asValue() {
             if (!Components::allLocales(locale)) {
                 // Find best match using an adaption of RFC 4647 lookup matching
                 // rules, removing "-" or "_" delimited segments from the end;
-                // defaults are the empty string locale, the "en-US" locale, the
-                // "en" locale, the first child (if any), or a nil value (even
+                // defaults are the "en-US" locale, the "en" locale, the empty
+                // string locale, the first child (if any), or a nil value (even
                 // though it may be illegal for the given property), in that
                 // order:
                 rtl::Reference< ChildAccess > child;
@@ -296,6 +296,9 @@ css::uno::Any ChildAccess::asValue() {
                     while (i > 0 && locale[i] != '-' && locale[i] != '_') {
                         --i;
                     }
+                    if (i == 0) {
+                        break;
+                    }
                     locale = locale.copy(0, i);
                 }
                 if (!child.is()) {
@@ -305,10 +308,13 @@ css::uno::Any ChildAccess::asValue() {
                         child = getChild(
                             rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")));
                         if (!child.is()) {
-                            std::vector< rtl::Reference< ChildAccess > > all(
-                                getAllChildren());
-                            if (!all.empty()) {
-                                child = all.front();
+                            child = getChild(rtl::OUString());
+                            if (!child.is()) {
+                                std::vector< rtl::Reference< ChildAccess > >
+                                    all(getAllChildren());
+                                if (!all.empty()) {
+                                    child = all.front();
+                                }
                             }
                         }
                     }
commit 99a6c38393f104753301f49d53df750e45d66f2e
Author: sb <sb at openoffice.org>
Date:   Thu Sep 23 16:17:38 2010 +0200

    sb132: #i114155# use "en" as additional fallback locale after "en-US"
    (transplanted from 630d6876c61cd1e0d42b8aa18bfc2ab22079a20f)

diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx
index ef2b213..c20fa49 100644
--- a/configmgr/source/childaccess.cxx
+++ b/configmgr/source/childaccess.cxx
@@ -283,8 +283,9 @@ css::uno::Any ChildAccess::asValue() {
                 // Find best match using an adaption of RFC 4647 lookup matching
                 // rules, removing "-" or "_" delimited segments from the end;
                 // defaults are the empty string locale, the "en-US" locale, the
-                // first child (if any), or a nil value (even though it may be
-                // illegal for the given property), in that order:
+                // "en" locale, the first child (if any), or a nil value (even
+                // though it may be illegal for the given property), in that
+                // order:
                 rtl::Reference< ChildAccess > child;
                 for (;;) {
                     child = getChild(locale);
@@ -301,10 +302,14 @@ css::uno::Any ChildAccess::asValue() {
                     child = getChild(
                         rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en-US")));
                     if (!child.is()) {
-                        std::vector< rtl::Reference< ChildAccess > > all(
-                            getAllChildren());
-                        if (!all.empty()) {
-                            child = all.front();
+                        child = getChild(
+                            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")));
+                        if (!child.is()) {
+                            std::vector< rtl::Reference< ChildAccess > > all(
+                                getAllChildren());
+                            if (!all.empty()) {
+                                child = all.front();
+                            }
                         }
                     }
                 }


More information about the Libreoffice-commits mailing list