diff options
author | Jan Holesovsky <kendy@suse.cz> | 2010-11-25 14:27:00 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2010-11-25 14:27:00 +0100 |
commit | 84d46790710b966625de9c42845828d7f45ba08e (patch) | |
tree | 79384bfb4b18d8c3e5ecb94b59ea596ee11e79d4 | |
parent | c4601fa9649d9756bc8f8cda34ba6129b70a0e4e (diff) | |
parent | 1c7962aa9e9e7e6148cd31001d237546b173140d (diff) |
Merge remote branch 'origin/libreoffice-3-3'
-rw-r--r-- | configmgr/source/childaccess.cxx | 25 | ||||
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Common.xcs | 2 |
2 files changed, 19 insertions, 8 deletions
diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx index 81e0febe1123..3ec23b73f12f 100644 --- a/configmgr/source/childaccess.cxx +++ b/configmgr/source/childaccess.cxx @@ -283,9 +283,10 @@ 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 - // first child (if any), or a nil value (even though it may be - // illegal for the given property), in that order: + // 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; for (;;) { child = getChild(locale); @@ -296,16 +297,26 @@ 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()) { 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()) { + child = getChild(rtl::OUString()); + if (!child.is()) { + std::vector< rtl::Reference< ChildAccess > > + all(getAllChildren()); + if (!all.empty()) { + child = all.front(); + } + } } } } diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index b5fa24ac2502..a85b598f0375 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -5823,7 +5823,7 @@ </info> </enumeration> </constraints> - <value>1</value> + <value>2</value> </prop> <prop oor:name="SymbolStyle" oor:type="xs:string"> <!-- UIHints: Tools Options General View --> |