diff options
author | Mihai Varga <mihai.varga@collabora.com> | 2015-10-05 17:07:06 +0300 |
---|---|---|
committer | Mihai Varga <mihai.mv13@gmail.com> | 2015-10-05 17:50:20 +0300 |
commit | c30defcf8e34daec6ea0455d772fe296cc26ecc9 (patch) | |
tree | 59653c8c7ad6efa6fadc8bea63e4cc94bb2da483 /sw | |
parent | 7949ca85c526f2f22367900b5213e8df806ce873 (diff) |
LOK: add the search phrase to the search result count callback
We need this to notify the user for which search phrase no results were
found
Change-Id: I8cc7ab235b9129dfdcb022145456180ff7e4ca92
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/tiledrendering/tiledrendering.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewsrch.cxx | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index c836f4bc5eab..bcc328e366a3 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -23,6 +23,7 @@ #include <drawdoc.hxx> #include <ndtxt.hxx> #include <wrtsh.hxx> +#include <string> static const char* DATA_DIRECTORY = "/sw/qa/extras/tiledrendering/data/"; @@ -132,7 +133,8 @@ void SwTiledRenderingTest::callbackImpl(int nType, const char* pPayload) break; case LOK_CALLBACK_SEARCH_RESULT_COUNT: { - m_nSearchResultCount = OString(pPayload).toInt32(); + std::string aStrPayload(pPayload); + m_nSearchResultCount = std::stoi(aStrPayload.substr(0, aStrPayload.find_first_of(";"))); } break; } diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index dcb445256df9..20ffed6c2c8f 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -225,7 +225,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) } else { - OString aPayload = OString::number(nFound); + OString aPayload = OString::number(nFound) + ";" + m_pSrchItem->GetSearchString().toUtf8(); m_pWrtShell->libreOfficeKitCallback(LOK_CALLBACK_SEARCH_RESULT_COUNT, aPayload.getStr()); } rReq.SetReturnValue(SfxBoolItem(nSlot, bRet)); |