diff options
author | Eike Rathke <erack@redhat.com> | 2016-02-05 16:56:54 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-02-05 17:02:47 +0100 |
commit | 599f0cbe1ddc1d54828489b389b78fdffa4ce39f (patch) | |
tree | 25173fd65460b33ef43910514559c203987a6c42 /i18npool/source/search/textsearch.hxx | |
parent | 4c4976f717b3ddce68a872dffc2079ae49c41616 (diff) |
interface to new XTextSearch2 with SearchOptions2, tdf#72196
Places that had utl::TextSearch::UpgradeToSearchOptions2() introduced
are worth an inspection if the new SearchAlgorithms2::WILDCARD search
should be supported or at least use SearchOptions2 instead of
SearchOptions to eliminate the small performance penalty that conversion
involves.
Change-Id: I565f73af2b551ae9ad0f488e672823dc6c5c1109
Diffstat (limited to 'i18npool/source/search/textsearch.hxx')
-rw-r--r-- | i18npool/source/search/textsearch.hxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/i18npool/source/search/textsearch.hxx b/i18npool/source/search/textsearch.hxx index 5c2ef0312290..ae189c29df63 100644 --- a/i18npool/source/search/textsearch.hxx +++ b/i18npool/source/search/textsearch.hxx @@ -21,7 +21,7 @@ #define INCLUDED_I18NPOOL_SOURCE_SEARCH_TEXTSEARCH_HXX #include <cppuhelper/implbase.hxx> -#include <com/sun/star/util/XTextSearch.hpp> +#include <com/sun/star/util/XTextSearch2.hpp> #include <com/sun/star/i18n/XBreakIterator.hpp> #include <com/sun/star/i18n/XExtendedTransliteration.hpp> #include <com/sun/star/i18n/XCharacterClassification.hpp> @@ -39,13 +39,13 @@ typedef ::std::map< sal_Unicode, sal_Int32 > TextSearchJumpTable; class TextSearch: public cppu::WeakImplHelper < - css::util::XTextSearch, + css::util::XTextSearch2, css::lang::XServiceInfo > { css::uno::Reference < css::uno::XComponentContext > m_xContext; - css::util::SearchOptions aSrchPara; + css::util::SearchOptions2 aSrchPara; OUString sSrchStr; OUString sSrchStr2; @@ -91,7 +91,7 @@ class TextSearch: public cppu::WeakImplHelper RESrchBkwrd( const OUString& searchStr, sal_Int32 startPos, sal_Int32 endPos ) throw(css::uno::RuntimeException); - void RESrchPrepare( const css::util::SearchOptions&); + void RESrchPrepare( const css::util::SearchOptions2&); // Members and methods for the "Weight Levenshtein-Distance" search int nLimit; @@ -118,7 +118,7 @@ public: virtual ~TextSearch(); - // Methods + // XTextSearch virtual void SAL_CALL setOptions( const css::util::SearchOptions& options ) throw(css::uno::RuntimeException, std::exception) override; @@ -131,6 +131,11 @@ public: sal_Int32 startPos, sal_Int32 endPos ) throw(css::uno::RuntimeException, std::exception) override; + // XTextSearch2 + virtual void SAL_CALL + setOptions2( const css::util::SearchOptions2& options ) + throw(css::uno::RuntimeException, std::exception) override; + //XServiceInfo virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) override; |