Kaydet (Commit) 6c040ad1 authored tarafından Miklos Vajna's avatar Miklos Vajna

LOK: add CALLBACK_SEARCH_RESULT_COUNT and implement in sw

Change-Id: I616b3f6d2881aaa479f6498d3121540980256c15
üst 44838c66
......@@ -155,7 +155,9 @@ typedef enum
*
* Payload is a single 0-based integer.
*/
LOK_CALLBACK_SET_PART
LOK_CALLBACK_SET_PART,
/// Number of search results, in case something is found.
LOK_CALLBACK_SEARCH_RESULT_COUNT
}
LibreOfficeKitCallbackType;
......
......@@ -209,7 +209,8 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
break;
case SvxSearchCmd::FIND_ALL:
{
bool bRet = SearchAll();
sal_uInt16 nFound = 0;
bool bRet = SearchAll(&nFound);
if( !bRet )
{
#if HAVE_FEATURE_DESKTOP
......@@ -222,6 +223,11 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
#endif
m_bFound = false;
}
else
{
OString aPayload = OString::number(nFound);
m_pWrtShell->libreOfficeKitCallback(LOK_CALLBACK_SEARCH_RESULT_COUNT, aPayload.getStr());
}
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
#if HAVE_FEATURE_DESKTOP
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment