summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2022-09-23 07:41:23 -0400
committerJustin Luth <jluth@mail.com>2022-09-23 17:38:15 +0200
commit3bfed17b047422a8c4e98ab80001f3158afb227e (patch)
tree127346903168225dc801c8834e6d4238861bc638 /unotools
parent23cbe9b969db11f9fb25d8dffe8d801e002b5e94 (diff)
tdf#123990 sc condformat: case insensitive begins/ends/contains
This is how Excel handles these. At first I was afraid that this would upset LibreOffice users, but then I realized that equals already is case insensitive, so this change ought to be more consistent, and thus there should be fewer outcrys. Change-Id: Ia3de78d5888672ba8b774866d41ecd65293397c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140484 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/i18n/collatorwrapper.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/unotools/source/i18n/collatorwrapper.cxx b/unotools/source/i18n/collatorwrapper.cxx
index 4da1398e0636..ce85de11df7e 100644
--- a/unotools/source/i18n/collatorwrapper.cxx
+++ b/unotools/source/i18n/collatorwrapper.cxx
@@ -46,6 +46,23 @@ 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
{