sw/source/core/crsr/findtxt.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit dc54f1b0f6ec4353b02da3a711dacc350ebc9db2 Author: Jan Holesovsky <ke...@collabora.com> Date: Thu Mar 17 15:51:42 2016 +0100 tdf#98458 sw: Fix performance problem when searching in large documents. Change-Id: I0056a411d7a3bb018401d87bdd4a0112fed31df6 Reviewed-on: https://gerrit.libreoffice.org/23341 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index abd3763..3248f11 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -244,6 +244,10 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te 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 SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te 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();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits