diff options
author | Mihai Varga <mihai.varga@collabora.com> | 2015-05-19 10:55:18 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-05-19 09:59:35 +0000 |
commit | 158614a2abc35d122e467d2006830f2c5375aa84 (patch) | |
tree | 50849bd3ce94e5fbfc6a9b0d28123d187428b090 /sw | |
parent | d6c80f239ee7487e38ce17afdb02c160fca7d313 (diff) |
LOKit callback for search not found
Needed for signaling the user when no match was found for
the searched input
Change-Id: I171ee956d94d6fd83036ae34102c2f1bdd5661de
Reviewed-on: https://gerrit.libreoffice.org/15798
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/uiview/viewsrch.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index e1deaba8a0c4..a7c7c88d1bfb 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -57,6 +57,7 @@ #include <docsh.hxx> #include <doc.hxx> #include <unocrsr.hxx> +#include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <view.hrc> #include <SwRewriter.hxx> @@ -213,7 +214,11 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) { #if HAVE_FEATURE_DESKTOP if( !bApi ) + { + m_pWrtShell->libreOfficeKitCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, + m_pSrchItem->GetSearchString().toUtf8().getStr()); SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound); + } #endif m_bFound = false; } @@ -335,7 +340,11 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) { #if HAVE_FEATURE_DESKTOP if( !bApi ) + { + m_pWrtShell->libreOfficeKitCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, + m_pSrchItem->GetSearchString().toUtf8().getStr()); SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound); + } #endif m_bFound = false; return; @@ -511,6 +520,8 @@ bool SwView::SearchAndWrap(bool bApi) if( !bApi ) { #if HAVE_FEATURE_DESKTOP + m_pWrtShell->libreOfficeKitCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, + m_pSrchItem->GetSearchString().toUtf8().getStr()); SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound); #endif } @@ -551,7 +562,11 @@ bool SwView::SearchAndWrap(bool bApi) SvxSearchDialogWrapper::SetSearchLabel(SL_Start); } else if(!bApi) + { + m_pWrtShell->libreOfficeKitCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, + m_pSrchItem->GetSearchString().toUtf8().getStr()); SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound); + } #endif return m_bFound; } |