diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-05-25 10:42:34 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-06-14 16:19:00 +0200 |
commit | c72751b1633f7523f12cdb3aa35153e1d60ebb45 (patch) | |
tree | d1f6f2f3de41c1c759a7b7fc62b107ba80881cb4 /sw/inc | |
parent | 497dcbf57dab9365be6f7cd9888a690c62e0d634 (diff) |
sw_redlinehide: make SwScanner independent of SwTextNode
Abstract out the GetLang function into a parameter.
SwScanner also uses a ModelToViewHelper but at this place it's used in
"pass-through" mode which does an identity mapping.
Change-Id: I45557c4e4446d1b4d95a206c414bbb6477593f8a
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/swscanner.hxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sw/inc/swscanner.hxx b/sw/inc/swscanner.hxx index 86f48bb18807..70793def9257 100644 --- a/sw/inc/swscanner.hxx +++ b/sw/inc/swscanner.hxx @@ -23,14 +23,16 @@ #include <i18nlangtag/lang.h> #include "modeltoviewhelper.hxx" +#include <functional> + class SwTextNode; // Helper class that provides consecutively the words of a selected area // during spell check class SwScanner { + std::function<LanguageType (sal_Int32, sal_Int32, bool)> m_pGetLangOfChar; OUString m_aWord; - const SwTextNode& m_rNode; const OUString m_aPreDashReplacementText; OUString m_aText; const LanguageType* m_pLanguage; @@ -45,6 +47,12 @@ class SwScanner bool m_bClip; public: + SwScanner( std::function<LanguageType (sal_Int32, sal_Int32, bool)> pGetLangOfChar, + const OUString& rText, + const LanguageType* pLang, + const ModelToViewHelper& rConvMap, + sal_uInt16 nWordType, + sal_Int32 nStart, sal_Int32 nEnde, bool bClip = false ); SwScanner( const SwTextNode& rNd, const OUString& rText, const LanguageType* pLang, const ModelToViewHelper& rConvMap, |