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