tdf#123990 sc condition: use GetTransliteration, not GetCollator
commit27c22bac5439908ecdd1aa05580d75998a5eb058
authorJustin Luth <justin.luth@collabora.com>
Mon, 26 Sep 2022 22:15:03 +0000 (26 18:15 -0400)
committerEike Rathke <erack@redhat.com>
Tue, 27 Sep 2022 19:55:02 +0000 (27 21:55 +0200)
tree37bff7f0216fe859bfb0c6fd8614e1201ca7ac57
parent70973680f05c587c866d2de2a16bff9ebf8007ca
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>
include/unotools/collatorwrapper.hxx
sc/source/core/data/conditio.cxx
unotools/source/i18n/collatorwrapper.cxx