summaryrefslogtreecommitdiffstats
path: root/editeng/source/misc/acorrcfg.cxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:27:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:27:54 +0000
commitadb203bc05e3e36173cbd46b9951f79821a81799 (patch)
tree6e6739df9b3f0a567330a0dd7ee0e03ae70876a3 /editeng/source/misc/acorrcfg.cxx
parentAdding debian version 4:24.2.0-3. (diff)
downloadlibreoffice-adb203bc05e3e36173cbd46b9951f79821a81799.tar.xz
libreoffice-adb203bc05e3e36173cbd46b9951f79821a81799.zip
Merging upstream version 4:24.2.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'editeng/source/misc/acorrcfg.cxx')
-rw-r--r--editeng/source/misc/acorrcfg.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx
index 616d75c696..49e48bb48b 100644
--- a/editeng/source/misc/acorrcfg.cxx
+++ b/editeng/source/misc/acorrcfg.cxx
@@ -65,13 +65,12 @@ static void scanAutoCorrectDirForLanguageTags( const OUString& rURL )
continue;
const OUString aBcp47( aTitle.copy( 5, aTitle.getLength() - 9));
- OUString aCanonicalized;
// Ignore invalid langtags and canonicalize for good,
// allow private-use tags.
- if (!LanguageTag::isValidBcp47( aBcp47, &aCanonicalized))
+ const LanguageTag aLanguageTag (aBcp47, true);
+ if (!aLanguageTag.isValidBcp47())
continue;
- const LanguageTag aLanguageTag( aCanonicalized);
if (SvtLanguageTable::HasLanguageType( aLanguageTag.getLanguageType()))
continue;
@@ -83,7 +82,7 @@ static void scanAutoCorrectDirForLanguageTags( const OUString& rURL )
// other private-use tag (which should not fallback,
// but avoid).
if (aLanguageTag.getCountry().isEmpty()
- && LanguageTag::isValidBcp47( aCanonicalized, nullptr,
+ && LanguageTag::isValidBcp47( aLanguageTag.getBcp47(), nullptr,
LanguageTag::PrivateUse::DISALLOW))
{
LanguageTag aFallback( aLanguageTag);