Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3675
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/75/3675/1
use LanguageTag fallback
Change-Id: I34c532dc7d1c71724a5c0e29c113f2d6510cc2d7
---
M vcl/source/gdi/impimagetree.cxx
1 file changed, 6 insertions(+), 17 deletions(-)
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index 29f3e7a..d7c50d9 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -235,23 +235,12 @@
if (localized) {
sal_Int32 pos = name.lastIndexOf('/');
if (pos != -1) {
- /* FIXME-BCP47: this needs to be changed for language tags! */
- css::lang::Locale const & loc =
- Application::GetSettings().GetUILanguageTag().getLocale();
- paths.push_back(createPath(name, pos, loc.Language));
- if (!loc.Country.isEmpty()) {
- OUStringBuffer b(loc.Language);
- b.append(sal_Unicode('-'));
- b.append(loc.Country);
- OUString p(createPath(name, pos, b.makeStringAndClear()));
- paths.push_back(p);
- if (!loc.Variant.isEmpty()) {
- b.append(p);
- b.append(sal_Unicode('-'));
- b.append(loc.Variant);
- paths.push_back(
- createPath(name, pos, b.makeStringAndClear()));
- }
+ // find() uses a reverse iterator, so push in reverse order.
+ std::vector< OUString > aFallbacks(
Application::GetSettings().GetUILanguageTag().getFallbackStrings());
+ for (std::vector< OUString >::const_reverse_iterator it( aFallbacks.rbegin());
+ it != aFallbacks.rend(); ++it)
+ {
+ paths.push_back(createPath(name, pos, *it));
}
}
}
--
To view, visit https://gerrit.libreoffice.org/3675
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I34c532dc7d1c71724a5c0e29c113f2d6510cc2d7
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Eike Rathke <erack@redhat.com>
Context
- [PATCH] use LanguageTag fallback · Eike Rathke (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.