summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-06-28 05:47:16 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-06-28 11:06:54 +0200
commit67c807ada5d7930f262ace9798629c06f0175a86 (patch)
tree3e6c7d7c0e35f4893cedb91e83601e7514506f38 /unotools
parentb1ce8bb078904db1df542f7a1c2ed527dde1a2d3 (diff)
Drop i18nutil::SearchOptions
It was mostly unused by now, only remained in a couple of function arguments, where callers actually passed SearchOptions2, and where internally it was converted back to SearchOptions2. Change-Id: Ib188ec3bf0de6d1f70a04eb90fb3a577df8b3d98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153687 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/i18n/textsearch.cxx39
1 files changed, 0 insertions, 39 deletions
diff --git a/unotools/source/i18n/textsearch.cxx b/unotools/source/i18n/textsearch.cxx
index b7f104895f8c..f61aeaf1a2a7 100644
--- a/unotools/source/i18n/textsearch.cxx
+++ b/unotools/source/i18n/textsearch.cxx
@@ -75,7 +75,6 @@ static bool lcl_Equals( const i18nutil::SearchOptions2& rSO1, const i18nutil::Se
return
rSO1.AlgorithmType2 == rSO2.AlgorithmType2 &&
rSO1.WildcardEscapeCharacter == rSO2.WildcardEscapeCharacter &&
- rSO1.algorithmType == rSO2.algorithmType &&
rSO1.searchFlag == rSO2.searchFlag &&
rSO1.searchString == rSO2.searchString &&
rSO1.replaceString == rSO2.replaceString &&
@@ -134,41 +133,6 @@ TextSearch::TextSearch( const i18nutil::SearchOptions2& rPara )
xTextSearch = getXTextSearch( rPara );
}
-i18nutil::SearchOptions2 TextSearch::UpgradeToSearchOptions2( const i18nutil::SearchOptions& rOptions )
-{
- sal_Int16 nAlgorithmType2;
- switch (rOptions.algorithmType)
- {
- case SearchAlgorithms_REGEXP:
- nAlgorithmType2 = SearchAlgorithms2::REGEXP;
- break;
- case SearchAlgorithms_APPROXIMATE:
- nAlgorithmType2 = SearchAlgorithms2::APPROXIMATE;
- break;
- case SearchAlgorithms_ABSOLUTE:
- nAlgorithmType2 = SearchAlgorithms2::ABSOLUTE;
- break;
- default:
- for (;;) std::abort();
- }
- // It would be nice if an inherited struct had a ctor that takes an
- // instance of the object the struct derived from...
- i18nutil::SearchOptions2 aOptions2(
- rOptions.algorithmType,
- rOptions.searchFlag,
- rOptions.searchString,
- rOptions.replaceString,
- rOptions.Locale,
- rOptions.changedChars,
- rOptions.deletedChars,
- rOptions.insertedChars,
- rOptions.transliterateFlags,
- nAlgorithmType2,
- 0 // no wildcard search, no escape character...
- );
- return aOptions2;
-}
-
void TextSearch::Init( const SearchParam & rParam,
const css::lang::Locale& rLocale )
{
@@ -179,7 +143,6 @@ void TextSearch::Init( const SearchParam & rParam,
{
case SearchParam::SearchType::Wildcard:
aSOpt.AlgorithmType2 = SearchAlgorithms2::WILDCARD;
- aSOpt.algorithmType = SearchAlgorithms::SearchAlgorithms_MAKE_FIXED_SIZE; // no old enum for that
aSOpt.WildcardEscapeCharacter = rParam.GetWildEscChar();
if (rParam.IsWildMatchSel())
aSOpt.searchFlag |= SearchFlags::WILD_MATCH_SELECTION;
@@ -187,12 +150,10 @@ void TextSearch::Init( const SearchParam & rParam,
case SearchParam::SearchType::Regexp:
aSOpt.AlgorithmType2 = SearchAlgorithms2::REGEXP;
- aSOpt.algorithmType = SearchAlgorithms_REGEXP;
break;
case SearchParam::SearchType::Normal:
aSOpt.AlgorithmType2 = SearchAlgorithms2::ABSOLUTE;
- aSOpt.algorithmType = SearchAlgorithms_ABSOLUTE;
break;
default: