summaryrefslogtreecommitdiff
path: root/include/unotools/textsearch.hxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-02-23 23:18:47 +0100
committerEike Rathke <erack@redhat.com>2016-02-23 23:25:15 +0100
commit1f3357013ba1f319a3bcddf4c9a658c46e8c0390 (patch)
treef170f7bbe5759119e80ae09eafb0f9e8409dd58e /include/unotools/textsearch.hxx
parent8af13dd19d589c9996848fab7f4967f9018751d6 (diff)
SearchFlags::WILD_MATCH_SELECTION, SearchOptions2::WildcardEscapeCharacter
At least '\' (search in Word) and '~' (search in Excel) should be supported as escape character. Being able to restrict a match to entire selection instead of substring speeds up the Calc match whole cell scenario. Change-Id: Ice242b9cd59009f172b724e03c2cc08feda4cd3c
Diffstat (limited to 'include/unotools/textsearch.hxx')
-rw-r--r--include/unotools/textsearch.hxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/unotools/textsearch.hxx b/include/unotools/textsearch.hxx
index 1847aab2baec..3a24aac648df 100644
--- a/include/unotools/textsearch.hxx
+++ b/include/unotools/textsearch.hxx
@@ -96,9 +96,12 @@ private:
SearchType m_eSrchType; // search normal/regular/LevDist
+ sal_uInt32 m_cWildEscChar; // wildcard escape character
+
bool m_bWordOnly : 1; // used by normal search
bool m_bSrchInSel : 1; // search only in the selection
bool m_bCaseSense : 1;
+ bool m_bWildMatchSel : 1; // wildcard pattern must match entire selection
// values for the "weight Levenshtein-Distance"
bool bLEV_Relaxed : 1;
@@ -114,7 +117,9 @@ public:
SearchType eSrchType = SearchParam::SRCH_NORMAL,
bool bCaseSensitive = true,
bool bWordOnly = false,
- bool bSearchInSelection = false );
+ bool bSearchInSelection = false,
+ sal_uInt32 cWildEscChar = '\\',
+ bool bWildMatchSel = false );
SearchParam( const SearchParam& );
@@ -127,6 +132,10 @@ public:
bool IsCaseSensitive() const { return m_bCaseSense; }
bool IsSrchInSelection() const { return m_bSrchInSel; }
bool IsSrchWordOnly() const { return m_bWordOnly; }
+ bool IsWildMatchSel() const { return m_bWildMatchSel; }
+
+ // signed return for API use
+ sal_Int32 GetWildEscChar() const { return static_cast<sal_Int32>(m_cWildEscChar); }
bool IsSrchRelaxed() const { return bLEV_Relaxed; }
int GetLEVOther() const { return nLEV_OtherX; }