Kaydet (Commit) bf9c9623 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: prefix members of SwFindParaText

So that one can stop guessing if bSearchInNotes or bSearchNotes is the
member variable.

Change-Id: I8181c1943d6bc9c81383a0e5df6625db31b9e926
üst d56c1f7a
...@@ -621,14 +621,14 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSText, ...@@ -621,14 +621,14 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSText,
/// parameters for search and replace in text /// parameters for search and replace in text
struct SwFindParaText : public SwFindParas struct SwFindParaText : public SwFindParas
{ {
const SearchOptions& rSearchOpt; const SearchOptions& m_rSearchOpt;
SwCursor& rCursor; SwCursor& m_rCursor;
utl::TextSearch aSText; utl::TextSearch m_aSText;
bool bReplace; bool m_bReplace;
bool bSearchInNotes; bool m_bSearchInNotes;
SwFindParaText( const SearchOptions& rOpt, bool bSearchNotes, bool bRepl, SwCursor& rCrsr ) SwFindParaText( const SearchOptions& rOpt, bool bSearchInNotes, bool bRepl, SwCursor& rCrsr )
: rSearchOpt( rOpt ), rCursor( rCrsr ), aSText( rOpt ), bReplace( bRepl ), bSearchInNotes( bSearchNotes ) : m_rSearchOpt( rOpt ), m_rCursor( rCrsr ), m_aSText( rOpt ), m_bReplace( bRepl ), m_bSearchInNotes( bSearchInNotes )
{} {}
virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, bool bInReadOnly ) SAL_OVERRIDE; virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, bool bInReadOnly ) SAL_OVERRIDE;
virtual bool IsReplaceMode() const SAL_OVERRIDE; virtual bool IsReplaceMode() const SAL_OVERRIDE;
...@@ -642,15 +642,15 @@ SwFindParaText::~SwFindParaText() ...@@ -642,15 +642,15 @@ SwFindParaText::~SwFindParaText()
int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove, int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove,
const SwPaM* pRegion, bool bInReadOnly ) const SwPaM* pRegion, bool bInReadOnly )
{ {
if( bInReadOnly && bReplace ) if( bInReadOnly && m_bReplace )
bInReadOnly = false; bInReadOnly = false;
const bool bFnd = pCrsr->Find( rSearchOpt, bSearchInNotes, aSText, fnMove, pRegion, bInReadOnly ); const bool bFnd = pCrsr->Find( m_rSearchOpt, m_bSearchInNotes, m_aSText, fnMove, pRegion, bInReadOnly );
if( bFnd && bReplace ) // replace string if( bFnd && m_bReplace ) // replace string
{ {
// use replace method in SwDoc // use replace method in SwDoc
const bool bRegExp(SearchAlgorithms_REGEXP == rSearchOpt.algorithmType); const bool bRegExp(SearchAlgorithms_REGEXP == m_rSearchOpt.algorithmType);
SwIndex& rSttCntIdx = pCrsr->Start()->nContent; SwIndex& rSttCntIdx = pCrsr->Start()->nContent;
const sal_Int32 nSttCnt = rSttCntIdx.GetIndex(); const sal_Int32 nSttCnt = rSttCntIdx.GetIndex();
// add to shell-cursor-ring so that the regions will be moved eventually // add to shell-cursor-ring so that the regions will be moved eventually
...@@ -658,17 +658,17 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove, ...@@ -658,17 +658,17 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove,
if( bRegExp ) if( bRegExp )
{ {
pPrev = const_cast<SwPaM*>(pRegion)->GetPrev(); pPrev = const_cast<SwPaM*>(pRegion)->GetPrev();
const_cast<SwPaM*>(pRegion)->GetRingContainer().merge( rCursor.GetRingContainer() ); const_cast<SwPaM*>(pRegion)->GetRingContainer().merge( m_rCursor.GetRingContainer() );
} }
boost::scoped_ptr<OUString> pRepl( (bRegExp) boost::scoped_ptr<OUString> pRepl( (bRegExp)
? ReplaceBackReferences( rSearchOpt, pCrsr ) : 0 ); ? ReplaceBackReferences( m_rSearchOpt, pCrsr ) : 0 );
bool const bReplaced = bool const bReplaced =
rCursor.GetDoc()->getIDocumentContentOperations().ReplaceRange( m_rCursor.GetDoc()->getIDocumentContentOperations().ReplaceRange(
*pCrsr, *pCrsr,
(pRepl.get()) ? *pRepl : rSearchOpt.replaceString, (pRepl.get()) ? *pRepl : m_rSearchOpt.replaceString,
bRegExp ); bRegExp );
rCursor.SaveTableBoxContent( pCrsr->GetPoint() ); m_rCursor.SaveTableBoxContent( pCrsr->GetPoint() );
if( bRegExp ) if( bRegExp )
{ {
...@@ -697,7 +697,7 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove, ...@@ -697,7 +697,7 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove,
bool SwFindParaText::IsReplaceMode() const bool SwFindParaText::IsReplaceMode() const
{ {
return bReplace; return m_bReplace;
} }
sal_uLong SwCursor::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes, sal_uLong SwCursor::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment