summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-09 09:49:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-10 06:05:09 +0000
commit7cf66202f233043fff2ece108e877e885bf99ace (patch)
tree1fea94539f7a31277398f43f0a47a79f713d07ec /unotools
parentb3b2f2b95070f1a385c51f432a52b9c84470913f (diff)
convert SearchParam::SearchType to scoped enum
and drop unused SRCH_LEVDIST enumerator Change-Id: Ic5118757060656562e04dd7da24a3f143abec3fb Reviewed-on: https://gerrit.libreoffice.org/34065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/i18n/textsearch.cxx16
1 files changed, 3 insertions, 13 deletions
diff --git a/unotools/source/i18n/textsearch.cxx b/unotools/source/i18n/textsearch.cxx
index 6cab875f268c..d147765ca507 100644
--- a/unotools/source/i18n/textsearch.cxx
+++ b/unotools/source/i18n/textsearch.cxx
@@ -199,7 +199,7 @@ void TextSearch::Init( const SearchParam & rParam,
switch( rParam.GetSrchType() )
{
- case SearchParam::SRCH_WILDCARD:
+ case SearchParam::SearchType::Wildcard:
aSOpt.AlgorithmType2 = SearchAlgorithms2::WILDCARD;
aSOpt.algorithmType = SearchAlgorithms_MAKE_FIXED_SIZE; // no old enum for that
aSOpt.WildcardEscapeCharacter = rParam.GetWildEscChar();
@@ -207,7 +207,7 @@ void TextSearch::Init( const SearchParam & rParam,
aSOpt.searchFlag |= SearchFlags::WILD_MATCH_SELECTION;
break;
- case SearchParam::SRCH_REGEXP:
+ case SearchParam::SearchType::Regexp:
aSOpt.AlgorithmType2 = SearchAlgorithms2::REGEXP;
aSOpt.algorithmType = SearchAlgorithms_REGEXP;
if( rParam.IsSrchInSelection() )
@@ -215,17 +215,7 @@ void TextSearch::Init( const SearchParam & rParam,
SearchFlags::REG_NOT_ENDOFLINE;
break;
- case SearchParam::SRCH_LEVDIST:
- aSOpt.AlgorithmType2 = SearchAlgorithms2::APPROXIMATE;
- aSOpt.algorithmType = SearchAlgorithms_APPROXIMATE;
- aSOpt.changedChars = rParam.GetLEVOther();
- aSOpt.deletedChars = rParam.GetLEVLonger();
- aSOpt.insertedChars = rParam.GetLEVShorter();
- if( rParam.IsSrchRelaxed() )
- aSOpt.searchFlag |= SearchFlags::LEV_RELAXED;
- break;
-
- case SearchParam::SRCH_NORMAL:
+ case SearchParam::SearchType::Normal:
aSOpt.AlgorithmType2 = SearchAlgorithms2::ABSOLUTE;
aSOpt.algorithmType = SearchAlgorithms_ABSOLUTE;
if( rParam.IsSrchWordOnly() )