Avoid -fsanitize=enum when using ScDocOptions::eSearchTypeUnknown

Change-Id: I0ee0c2081b6babb8815d5ba00c5c551854c6a6e9
This commit is contained in:
Stephan Bergmann 2016-02-22 12:55:00 +01:00
parent 22629764d7
commit b9c71ed6de

View File

@ -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.