diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-04 09:24:56 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-04 11:48:04 +0200 |
commit | 9cc8a26fcdd4dbf7d5d65869bf84b824339751ce (patch) | |
tree | b08de712db450099763ab9cd4e175354ad4c9837 /sw/source/uibase/uiview | |
parent | 9a1e6d916eff1236cc1be2056c91e56018a482bf (diff) |
loplugin:unuseddefaultparam in sw
Change-Id: I1a8a25c09ae0c8ba39fcedb032562df93fdd6ba4
Diffstat (limited to 'sw/source/uibase/uiview')
-rw-r--r-- | sw/source/uibase/uiview/viewsrch.cxx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index 0c16fc6ed3f4..23283de9d6b0 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -144,7 +144,7 @@ static void lcl_emitSearchResultCallbacks(SvxSearchItem* pSearchItem, SwWrtShell } } -void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) +void SwView::ExecSearch(SfxRequest& rReq) { const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = nullptr; @@ -152,12 +152,10 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_SEARCH_QUIET, false, &pItem)) bQuiet = static_cast<const SfxBoolItem*>( pItem)->GetValue(); - bool bApi = bQuiet || bNoMessage; - sal_uInt16 nSlot = rReq.GetSlot(); if (nSlot == FN_REPEAT_SEARCH && !m_pSrchItem) { - if(bApi) + if(bQuiet) { rReq.SetReturnValue(SfxBoolItem(nSlot, false)); nSlot = 0; @@ -248,7 +246,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) { case SvxSearchCmd::FIND: { - bool bRet = SearchAndWrap(bApi); + bool bRet = SearchAndWrap(bQuiet); if( bRet ) { Scroll(m_pWrtShell->GetCharRect().SVRect()); @@ -281,7 +279,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) if( !bRet ) { #if HAVE_FEATURE_DESKTOP - if( !bApi ) + if( !bQuiet ) { m_pWrtShell->libreOfficeKitCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, m_pSrchItem->GetSearchString().toUtf8().getStr()); @@ -345,7 +343,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) SvxSearchCmd nOldCmd = m_pSrchItem->GetCommand(); m_pSrchItem->SetCommand( nCmd ); - bool bRet = SearchAndWrap(bApi); + bool bRet = SearchAndWrap(bQuiet); if( bRet ) Scroll( m_pWrtShell->GetCharRect().SVRect()); m_pSrchItem->SetCommand( nOldCmd ); @@ -403,7 +401,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) if( !nFound ) { #if HAVE_FEATURE_DESKTOP - if( !bApi ) + if( !bQuiet ) { m_pWrtShell->libreOfficeKitCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, m_pSrchItem->GetSearchString().toUtf8().getStr()); @@ -414,7 +412,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) return; } - if( !bApi && ULONG_MAX != nFound) + if( !bQuiet && ULONG_MAX != nFound) { OUString aText( SW_RES( STR_NB_REPLACED ) ); aText = aText.replaceFirst("XX", OUString::number( nFound )); |