diff options
author | Aron Budea <baron@caesar.elte.hu> | 2016-10-14 15:37:48 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-10-24 18:04:16 +0000 |
commit | 2ed5057993fa8d0f57531303e6c9fafc37138737 (patch) | |
tree | 0785d0a4d8767851464190aa349df5d2f432a4a9 | |
parent | e3088f21d6227af67c955d91c536dc1ecfdea476 (diff) |
tdf#79892: Improve performance of transliteration
Pass resolved language to transliterate call, so it doesn't
have to be resolved each time inside.
Change-Id: Ibcad3b8517cb92c3462e14207c0a79ca2c76d73b
Reviewed-on: https://gerrit.libreoffice.org/29829
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | sc/source/core/data/table3.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 1784b1c1b4f9..2674f3ffb0fe 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -2500,11 +2500,12 @@ public: else { OUString aQueryStr = rItem.maString.getString(); + const LanguageType nLang = ScGlobal::pSysLocale->GetLanguageTag().getLanguageType(); OUString aCell( mpTransliteration->transliterate( - aCellStr.getString(), ScGlobal::eLnge, 0, aCellStr.getLength(), + aCellStr.getString(), nLang, 0, aCellStr.getLength(), nullptr ) ); OUString aQuer( mpTransliteration->transliterate( - aQueryStr, ScGlobal::eLnge, 0, aQueryStr.getLength(), + aQueryStr, nLang, 0, aQueryStr.getLength(), nullptr ) ); sal_Int32 nIndex = (rEntry.eOp == SC_ENDS_WITH || rEntry.eOp == SC_DOES_NOT_END_WITH) ? (aCell.getLength() - aQuer.getLength()) : 0; |