diff options
| author | Jan Holesovsky <kendy@collabora.com> | 2016-03-17 15:51:42 +0100 |
|---|---|---|
| committer | Jan Holesovsky <kendy@collabora.com> | 2016-03-17 18:10:11 +0100 |
| commit | 8d754e8609f918c2c08a6c6b91a8e12b99efba52 (patch) | |
| tree | 99d6dafadf0a92010465dfc82e09a65956320f8f | |
| parent | 43c64fa24d3d9922b080b5cb7bb5df249a759c1a (diff) | |
tdf#98458 sw: Fix performance problem when searching in large documents.
Change-Id: I0056a411d7a3bb018401d87bdd4a0112fed31df6
| -rw-r--r-- | sw/source/core/crsr/findtxt.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index 1a8924c51ece..0011605a8e04 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -244,6 +244,10 @@ bool SwPaM::Find( const SearchOptions2& rSearchOpt, bool bSearchInNotes , utl::T rSearchOpt.searchString == "$^" ); const bool bChkParaEnd = bRegSearch && rSearchOpt.searchString == "$"; + SvxSearchItem aSearchItem(SID_SEARCH_ITEM); // this is a very expensive operation (calling configmgr etc.) + aSearchItem.SetSearchOptions(rSearchOpt); + aSearchItem.SetBackward(!bSrchForward); + // LanguageType eLastLang = 0; while( nullptr != ( pNode = ::GetNode( *pPam, bFirst, fnMove, bInReadOnly ) )) { @@ -301,10 +305,6 @@ bool SwPaM::Find( const SearchOptions2& rSearchOpt, bool bSearchInNotes , utl::T SwWrtShell *const pWrtShell = (pDocShell) ? pDocShell->GetWrtShell() : nullptr; SwPostItMgr *const pPostItMgr = (pWrtShell) ? pWrtShell->GetPostItMgr() : nullptr; - SvxSearchItem aSearchItem(SID_SEARCH_ITEM); - aSearchItem.SetSearchOptions(rSearchOpt); - aSearchItem.SetBackward(!bSrchForward); - // If there is an active text edit, then search there. bool bEndedTextEdit = false; SdrView* pSdrView = pWrtShell->GetDrawView(); |
