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