summaryrefslogtreecommitdiff
path: root/sw/source/core/crsr/findtxt.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-02-05 16:56:54 +0100
committerEike Rathke <erack@redhat.com>2016-02-05 17:02:47 +0100
commit599f0cbe1ddc1d54828489b389b78fdffa4ce39f (patch)
tree25173fd65460b33ef43910514559c203987a6c42 /sw/source/core/crsr/findtxt.cxx
parent4c4976f717b3ddce68a872dffc2079ae49c41616 (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 'sw/source/core/crsr/findtxt.cxx')
-rw-r--r--sw/source/core/crsr/findtxt.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index caa436bc2702..61943acb0937 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -540,7 +540,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSText,
{
const lang::Locale aLocale(
g_pBreakIt->GetLocale( eCurrLang ) );
- rSText.SetLocale( rSearchOpt, aLocale );
+ rSText.SetLocale( utl::TextSearch::UpgradeToSearchOptions2( rSearchOpt), aLocale );
eLastLang = eCurrLang;
}
}
@@ -635,7 +635,8 @@ struct SwFindParaText : public SwFindParas
bool m_bSearchInNotes;
SwFindParaText( const SearchOptions& rOpt, bool bSearchInNotes, bool bRepl, SwCursor& rCursor )
- : m_rSearchOpt( rOpt ), m_rCursor( rCursor ), m_aSText( rOpt ), m_bReplace( bRepl ), m_bSearchInNotes( bSearchInNotes )
+ : m_rSearchOpt( rOpt ), m_rCursor( rCursor ), m_aSText( utl::TextSearch::UpgradeToSearchOptions2( rOpt) ),
+ m_bReplace( bRepl ), m_bSearchInNotes( bSearchInNotes )
{}
virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, bool bInReadOnly ) override;
virtual bool IsReplaceMode() const override;
@@ -749,7 +750,7 @@ OUString *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam )
const SwContentNode* pTextNode = pPam->GetContentNode();
if( pTextNode && pTextNode->IsTextNode() && pTextNode == pPam->GetContentNode( false ) )
{
- utl::TextSearch aSText( rSearchOpt );
+ utl::TextSearch aSText( utl::TextSearch::UpgradeToSearchOptions2( rSearchOpt) );
const OUString& rStr = pTextNode->GetTextNode()->GetText();
sal_Int32 nStart = pPam->Start()->nContent.GetIndex();
sal_Int32 nEnd = pPam->End()->nContent.GetIndex();