diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-11-13 19:53:40 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-11-13 23:06:18 +0100 |
commit | c60a9db1f2a8e2a088c6b89bcdff4901b28f2864 (patch) | |
tree | 5189921ddf2afd8410e336ca791bb85e6c7a3e1c /include | |
parent | 9520c38b0b1197a49499afb3276f999a530cf778 (diff) |
tdf#158185: fix Excel's Range.Find and Range.Replace wildcard recognition
VBAToRegexp is wrong, using Basic wildcards. The functionality introduced
in tdf#72196 matches the required wildcard repertoire.
This introduces a new WildcardEscapeCharacter property to SearchDescriptor
service. Interestingly, the default value there was backslash.
TODO: also fix Range.AutoFilter, and drop VBAToRegexp. To do that, a new
property is needed in service SheetFilterDescriptor, to use wildcards,
in addition to "UseRegularExpressions" property.
Change-Id: Idebcf00d4b7376e5d7feaf8ae800fb19d05689d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159391
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/svl/srchitem.hxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/svl/srchitem.hxx b/include/svl/srchitem.hxx index 516677e6e75b..c51d2d752e02 100644 --- a/include/svl/srchitem.hxx +++ b/include/svl/srchitem.hxx @@ -138,6 +138,9 @@ public: inline bool GetWildcard() const; void SetWildcard( bool bVal ); + inline sal_Int32 GetWildcardEscapeCharacter() const; + inline void SetWildcardEscapeCharacter(sal_Int32 val); + bool GetPattern() const { return m_bPattern; } void SetPattern(bool bNewPattern) { m_bPattern = bNewPattern; } @@ -247,6 +250,16 @@ bool SvxSearchItem::GetWildcard() const return m_aSearchOpt.AlgorithmType2 == css::util::SearchAlgorithms2::WILDCARD ; } +sal_Int32 SvxSearchItem::GetWildcardEscapeCharacter() const +{ + return m_aSearchOpt.WildcardEscapeCharacter; +} + +void SvxSearchItem::SetWildcardEscapeCharacter(sal_Int32 val) +{ + m_aSearchOpt.WildcardEscapeCharacter = val; +} + bool SvxSearchItem::IsLEVRelaxed() const { return 0 != (m_aSearchOpt.searchFlag & css::util::SearchFlags::LEV_RELAXED); |