From 224ecda045f49a0e96d3117233b667de6d5c6837 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 25 Feb 2016 17:04:54 +0100 Subject: compare on AlgorithmType2 Change-Id: I36c6d690662913f12acc2b5e26ea05c8279ced19 --- sw/source/core/crsr/findattr.cxx | 3 ++- sw/source/core/crsr/findtxt.cxx | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'sw') diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx index 43bec93de0e5..82c077f9e87c 100644 --- a/sw/source/core/crsr/findattr.cxx +++ b/sw/source/core/crsr/findattr.cxx @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -1141,7 +1142,7 @@ int SwFindParaAttr::Find( SwPaM* pCursor, SwMoveFn fnMove, const SwPaM* pRegion, if( bReplaceText ) { const bool bRegExp( - SearchAlgorithms_REGEXP == pSearchOpt->algorithmType); + SearchAlgorithms2::REGEXP == pSearchOpt->AlgorithmType2); SwIndex& rSttCntIdx = pCursor->Start()->nContent; const sal_Int32 nSttCnt = rSttCntIdx.GetIndex(); diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index f918bb620c45..1a8924c51ece 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -238,7 +238,7 @@ bool SwPaM::Find( const SearchOptions2& rSearchOpt, bool bSearchInNotes , utl::T bool bFirst = true; SwContentNode * pNode; - const bool bRegSearch = SearchAlgorithms_REGEXP == rSearchOpt.algorithmType; + const bool bRegSearch = SearchAlgorithms2::REGEXP == rSearchOpt.AlgorithmType2; const bool bChkEmptyPara = bRegSearch && 2 == rSearchOpt.searchString.getLength() && ( rSearchOpt.searchString == "^$" || rSearchOpt.searchString == "$^" ); @@ -510,7 +510,7 @@ bool SwPaM::DoSearch( const SearchOptions2& rSearchOpt, utl::TextSearch& rSText, sal_uInt16 nSearchScript = 0; sal_uInt16 nCurrScript = 0; - if ( SearchAlgorithms_APPROXIMATE == rSearchOpt.algorithmType && + if ( SearchAlgorithms2::APPROXIMATE == rSearchOpt.AlgorithmType2 && g_pBreakIt->GetBreakIter().is() ) { pScriptIter = new SwScriptIterator( sCleanStr, nStart, bSrchForward ); @@ -658,7 +658,7 @@ int SwFindParaText::Find( SwPaM* pCursor, SwMoveFn fnMove, if( bFnd && m_bReplace ) // replace string { // use replace method in SwDoc - const bool bRegExp(SearchAlgorithms_REGEXP == m_rSearchOpt.algorithmType); + const bool bRegExp(SearchAlgorithms2::REGEXP == m_rSearchOpt.AlgorithmType2); SwIndex& rSttCntIdx = pCursor->Start()->nContent; const sal_Int32 nSttCnt = rSttCntIdx.GetIndex(); // add to shell-cursor-ring so that the regions will be moved eventually @@ -745,7 +745,7 @@ OUString *ReplaceBackReferences( const SearchOptions2& rSearchOpt, SwPaM* pPam ) { OUString *pRet = nullptr; if( pPam && pPam->HasMark() && - SearchAlgorithms_REGEXP == rSearchOpt.algorithmType ) + SearchAlgorithms2::REGEXP == rSearchOpt.AlgorithmType2 ) { const SwContentNode* pTextNode = pPam->GetContentNode(); if( pTextNode && pTextNode->IsTextNode() && pTextNode == pPam->GetContentNode( false ) ) -- cgit