17f16b
From a94b58277c7aeaa83ce14347cd0b8f7137969d03 Mon Sep 17 00:00:00 2001
17f16b
From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lunak@collabora.com>
17f16b
Date: Fri, 29 Oct 2021 14:20:57 +0200
17f16b
Subject: [PATCH] fix comparison when searching cache
17f16b
MIME-Version: 1.0
17f16b
Content-Type: text/plain; charset=UTF-8
17f16b
Content-Transfer-Encoding: 8bit
17f16b
17f16b
This made the cache always fail and re-cache, making CJK text layout
17f16b
slower over time. A mistake from ef513fd4b049b214a03fbe6e that
17f16b
converted !strcmp() to != instead of ==.
17f16b
17f16b
Change-Id: Ib70579cd36d7b1df062e4d067e03f5c65e34b142
17f16b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124432
17f16b
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
17f16b
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
17f16b
Tested-by: Luboš Luňák <l.lunak@collabora.com>
17f16b
(cherry picked from commit 5b38b5744af1e896892df708c16b83e1b551d2c7)
17f16b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124206
17f16b
Tested-by: Jenkins
17f16b
---
17f16b
 i18npool/source/breakiterator/xdictionary.cxx | 2 +-
17f16b
 1 file changed, 1 insertion(+), 1 deletion(-)
17f16b
17f16b
diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx
17f16b
index 947a23c5073b..6b57433370c7 100644
17f16b
--- a/i18npool/source/breakiterator/xdictionary.cxx
17f16b
+++ b/i18npool/source/breakiterator/xdictionary.cxx
17f16b
@@ -152,7 +152,7 @@ void xdictionary::initDictionaryData(const char *pLang)
17f16b
     osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() );
17f16b
     for(const datacache & i : aLoadedCache)
17f16b
     {
17f16b
-        if( i.maLang != pLang )
17f16b
+        if( i.maLang == pLang )
17f16b
         {
17f16b
             data = i.maData;
17f16b
             return;
17f16b
-- 
17f16b
2.33.1
17f16b