summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2016-02-05 16:54:31 +0100
committerMarco Cecchetti <marco.cecchetti@collabora.com>2016-02-06 12:34:34 +0100
commit0d65937eefd8fbd8f8d08571266f1dcd5c10c6c4 (patch)
tree09507d55b88342eb753766f3ec76415af1311016 /sw
parent88730cdae3520b18fc073dc59bd0ed660e15d6b4 (diff)
lok: Search result should contain info if it is a 'search all' result.
Change-Id: Ia3ee81ced4f74c0d029a478bd59eff44d72ef327
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/uiview/viewsrch.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index 8918ff12ff57..f3f216f7e307 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -107,7 +107,7 @@ static void lcl_addContainerToJson(boost::property_tree::ptree& rTree, const OSt
}
/// Emits LOK callbacks (count, selection) for search results.
-static void lcl_emitSearchResultCallbacks(SvxSearchItem* pSearchItem, SwWrtShell* pWrtShell)
+static void lcl_emitSearchResultCallbacks(SvxSearchItem* pSearchItem, SwWrtShell* pWrtShell, bool bHighlightAll)
{
// Emit a callback also about the selection rectangles, grouped by matches.
if (SwPaM* pPaM = pWrtShell->GetCursor())
@@ -133,6 +133,7 @@ static void lcl_emitSearchResultCallbacks(SvxSearchItem* pSearchItem, SwWrtShell
}
boost::property_tree::ptree aTree;
aTree.put("searchString", pSearchItem->GetSearchString().toUtf8().getStr());
+ aTree.put("highlightAll", bHighlightAll);
lcl_addContainerToJson(aTree, "searchResultSelection", aMatches);
std::stringstream aStream;
@@ -252,7 +253,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
{
Scroll(m_pWrtShell->GetCharRect().SVRect());
if (comphelper::LibreOfficeKit::isActive())
- lcl_emitSearchResultCallbacks(m_pSrchItem, m_pWrtShell);
+ lcl_emitSearchResultCallbacks(m_pSrchItem, m_pWrtShell, /* bHighlightAll = */ false);
}
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
#if HAVE_FEATURE_DESKTOP
@@ -290,7 +291,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
m_bFound = false;
}
else if (comphelper::LibreOfficeKit::isActive())
- lcl_emitSearchResultCallbacks(m_pSrchItem, m_pWrtShell);
+ lcl_emitSearchResultCallbacks(m_pSrchItem, m_pWrtShell, /* bHighlightAll = */ true);
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
#if HAVE_FEATURE_DESKTOP
{