summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2022-09-26 18:15:03 -0400
committerEike Rathke <erack@redhat.com>2022-09-27 21:55:02 +0200
commit27c22bac5439908ecdd1aa05580d75998a5eb058 (patch)
tree37bff7f0216fe859bfb0c6fd8614e1201ca7ac57 /unotools
parent70973680f05c587c866d2de2a16bff9ebf8007ca (diff)
tdf#123990 sc condition: use GetTransliteration, not GetCollator
Thanks Eike Eike said "This should not use collation (which should only be used in sorting context) but ignore case transliteration instead." I had just copied ancient code from commit 952c2b02c73b30b011306faf2f0d6f2b4a935955 Author: Eike Rathke on Date: Wed Mar 14 14:57:39 2001 +0000 use CollatorWrapper instead of International Apparently that code should also be changed in a follow-up commit. Interestingly, a \x000 - \x008 etc must be isEqual(""), so an attempt to ScGlobal::getCharClass().lowercase all variables at the beginning and use regular OUString comparisons didn't work. Also, a "" startsWith and endsWith each string. In Excel, a "" is also contained in every string, but not (yet) in Calc. Change-Id: I44a07c482d2d67a76a939ba2d593a003398d52c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140633 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/i18n/collatorwrapper.cxx17
1 files changed, 0 insertions, 17 deletions
diff --git a/unotools/source/i18n/collatorwrapper.cxx b/unotools/source/i18n/collatorwrapper.cxx
index ce85de11df7e..4da1398e0636 100644
--- a/unotools/source/i18n/collatorwrapper.cxx
+++ b/unotools/source/i18n/collatorwrapper.cxx
@@ -46,23 +46,6 @@ CollatorWrapper::compareString (const OUString& s1, const OUString& s2) const
return 0;
}
-sal_Int32
-CollatorWrapper::compareSubstring (const OUString& s1, sal_Int32 off1, sal_Int32 len1,
- const OUString& s2, sal_Int32 off2, sal_Int32 len2) const
-{
- try
- {
- if (mxInternationalCollator.is())
- return mxInternationalCollator->compareSubstring (s1, off1, len1, s2, off2, len2);
- }
- catch (const uno::RuntimeException&)
- {
- SAL_WARN( "unotools.i18n","CollatorWrapper: compareSubstring failed");
- }
-
- return 0;
-}
-
uno::Sequence< OUString >
CollatorWrapper::listCollatorAlgorithms (const lang::Locale& rLocale) const
{