summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview/viewsrch.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/uiview/viewsrch.cxx')
-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 f3f30ce7af7f..6fc549bc0871 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -113,7 +113,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->GetCrsr())
@@ -139,6 +139,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;
@@ -258,7 +259,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
@@ -298,7 +299,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
{