From 7cf66202f233043fff2ece108e877e885bf99ace Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 9 Feb 2017 09:49:36 +0200 Subject: 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 Reviewed-by: Noel Grandin --- unotools/source/i18n/textsearch.cxx | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'unotools/source/i18n/textsearch.cxx') 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() ) -- cgit