diff options
author | Eike Rathke <erack@redhat.com> | 2016-02-25 16:44:56 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-02-25 17:33:38 +0100 |
commit | cda1318aefed103917b40ac751826f0579cd557c (patch) | |
tree | dcf0c3427e8e9d5b6e6b950376e563792f2693f0 /sw/source | |
parent | f75b30c2e82e3e148a3d3acea163d4bb11ea5576 (diff) |
use SearchOptions2
Change-Id: Ibae6b5d3cacc84980d460432829be31782f941bc
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/unocore/unosrch.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx index b192e5541b81..70526383b602 100644 --- a/sw/source/core/unocore/unosrch.cxx +++ b/sw/source/core/unocore/unosrch.cxx @@ -27,7 +27,8 @@ #include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <editeng/unolingu.hxx> -#include <com/sun/star/util/SearchOptions.hpp> +#include <com/sun/star/util/SearchOptions2.hpp> +#include <com/sun/star/util/SearchAlgorithms2.hpp> #include <com/sun/star/util/SearchFlags.hpp> #include <com/sun/star/i18n/TransliterationModules.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> @@ -715,11 +716,12 @@ uno::Sequence< OUString > SwXTextSearch::getSupportedServiceNames() throw( uno:: return aRet; } -void SwXTextSearch::FillSearchOptions( util::SearchOptions& rSearchOpt ) const +void SwXTextSearch::FillSearchOptions( util::SearchOptions2& rSearchOpt ) const { if( bSimilarity ) { rSearchOpt.algorithmType = util::SearchAlgorithms_APPROXIMATE; + rSearchOpt.AlgorithmType2 = util::SearchAlgorithms2::APPROXIMATE; rSearchOpt.changedChars = nLevExchange; rSearchOpt.deletedChars = nLevRemove; rSearchOpt.insertedChars = nLevAdd; @@ -727,9 +729,15 @@ void SwXTextSearch::FillSearchOptions( util::SearchOptions& rSearchOpt ) const rSearchOpt.searchFlag |= util::SearchFlags::LEV_RELAXED; } else if( bExpr ) + { rSearchOpt.algorithmType = util::SearchAlgorithms_REGEXP; + rSearchOpt.AlgorithmType2 = util::SearchAlgorithms2::REGEXP; + } else + { rSearchOpt.algorithmType = util::SearchAlgorithms_ABSOLUTE; + rSearchOpt.AlgorithmType2 = util::SearchAlgorithms2::ABSOLUTE; + } rSearchOpt.Locale = GetAppLanguageTag().getLocale(); rSearchOpt.searchString = sSearchText; |