summaryrefslogtreecommitdiff
path: root/sw/source/core/crsr/findtxt.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-03-17 08:33:51 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-03-17 08:34:21 +0100
commit8e0b08c3053ed5472409b1ea7e02653aad38f7d6 (patch)
tree7f9160cfd5b97efafc3fe00dea9e0f8a10e120d8 /sw/source/core/crsr/findtxt.cxx
parent5b3fee11f4019820cc1212a0441020609418dbf1 (diff)
tdf#98458 sw: make search in shape text optional
Instead of forcing it silently on everyone, add a new search option and enable it only in case it's requested, as shape search is expensive for large documents. (Regression from commit bdc1824ea7acfa2fe9d71cdbe57882acce155577.) Change-Id: Ibb6e76ad5c870dfd63b36429e16ef6d572f5f1fd
Diffstat (limited to 'sw/source/core/crsr/findtxt.cxx')
-rw-r--r--sw/source/core/crsr/findtxt.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 1a8924c51ece..62f4e8c351d9 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -301,6 +301,10 @@ 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* pSearchItem = SwView::GetSearchItem();
+ if (pSearchItem && pSearchItem->IsSearchInShapes())
+ {
+ // Search in shapes only if explicitly requested.
SvxSearchItem aSearchItem(SID_SEARCH_ITEM);
aSearchItem.SetSearchOptions(rSearchOpt);
aSearchItem.SetBackward(!bSrchForward);
@@ -344,7 +348,6 @@ bool SwPaM::Find( const SearchOptions2& rSearchOpt, bool bSearchInNotes , utl::T
}
// Writer and editeng selections are not supported in parallel.
- SvxSearchItem* pSearchItem = SwView::GetSearchItem();
// If we just finished search in shape text, don't attempt to do that again.
if (!bEndedTextEdit && !(pSearchItem && pSearchItem->GetCommand() == SvxSearchCmd::FIND_ALL))
{
@@ -375,6 +378,7 @@ bool SwPaM::Find( const SearchOptions2& rSearchOpt, bool bSearchInNotes , utl::T
}
}
}
+ }
sal_Int32 aStart = 0;
// do we need to finish a note?