summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-02-22 12:55:00 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-02-22 12:55:00 +0100
commitb9c71ed6de669f9d8091b4d56745a3f26f65812c (patch)
tree1467b61c413701a92beda512cdb255e9e920ac79
parent22629764d731d715125c82d9f12a31599264c63d (diff)
Avoid -fsanitize=enum when using ScDocOptions::eSearchTypeUnknown
Change-Id: I0ee0c2081b6babb8815d5ba00c5c551854c6a6e9
-rw-r--r--include/unotools/textsearch.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/unotools/textsearch.hxx b/include/unotools/textsearch.hxx
index 07d2527e242a..1847aab2baec 100644
--- a/include/unotools/textsearch.hxx
+++ b/include/unotools/textsearch.hxx
@@ -47,7 +47,9 @@ namespace utl
class UNOTOOLS_DLLPUBLIC SearchParam
{
public:
- enum SearchType{ SRCH_NORMAL, SRCH_REGEXP, SRCH_LEVDIST, SRCH_WILDCARD };
+ enum SearchType: int { SRCH_NORMAL, SRCH_REGEXP, SRCH_LEVDIST, SRCH_WILDCARD };
+ // fix underlying type (as int, arbitrarily), so that
+ // ScDocOptions::eSearchTypeUnknown = -1 does not cause -fsanitize=enum
/** Convert configuration and document boolean settings to SearchType.
If bWildcard is true it takes precedence over rbRegExp.