summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-02-25 17:04:54 +0100
committerEike Rathke <erack@redhat.com>2016-02-25 17:33:38 +0100
commit224ecda045f49a0e96d3117233b667de6d5c6837 (patch)
treebd5aeaaa3b251454b7c6e7d8d8999e4f3823328d /sw
parentf6b249d18fd2eff469985ff5da6777fddafacffe (diff)
compare on AlgorithmType2
Change-Id: I36c6d690662913f12acc2b5e26ea05c8279ced19
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/findattr.cxx3
-rw-r--r--sw/source/core/crsr/findtxt.cxx8
2 files changed, 6 insertions, 5 deletions
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 <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/util/SearchOptions2.hpp>
+#include <com/sun/star/util/SearchAlgorithms2.hpp>
#include <com/sun/star/util/SearchFlags.hpp>
#include <i18nlangtag/languagetag.hxx>
#include <hintids.hxx>
@@ -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 ) )