diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-08 15:38:59 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-08-11 06:05:32 +0000 |
commit | 3716b144265dda695d7dd447dbe692a3f84c588e (patch) | |
tree | 6b8d8751e306841102f6808fbb5403dac193c35c /cui/source/dialogs/cuifmsearch.cxx | |
parent | b796b24793827583550279d40bfe565c66ad284d (diff) |
loplugin:constantparam
Change-Id: Ia06b9b189033b9409d7a59a211866f66a0614886
Reviewed-on: https://gerrit.libreoffice.org/28016
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'cui/source/dialogs/cuifmsearch.cxx')
-rw-r--r-- | cui/source/dialogs/cuifmsearch.cxx | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index 7fcc94334679..9c8e72b3f477 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -146,7 +146,7 @@ FmSearchDialog::FmSearchDialog(vcl::Window* pParent, const OUString& sInitialTex } m_pSearchEngine = new FmSearchEngine( - ::comphelper::getProcessComponentContext(), fmscInitial.xCursor, fmscInitial.strUsedFields, fmscInitial.arrFields, SM_ALLOWSCHEDULE ); + ::comphelper::getProcessComponentContext(), fmscInitial.xCursor, fmscInitial.strUsedFields, fmscInitial.arrFields ); initCommon( fmscInitial.xCursor ); if ( !fmscInitial.sFieldDisplayNames.isEmpty() ) @@ -346,7 +346,6 @@ IMPL_LINK_NOARG_TYPED(FmSearchDialog, OnClickedSearchAgain, Button*, void) } else { // the button has the function 'cancel' - DBG_ASSERT(m_pSearchEngine->GetSearchMode() != SM_BRUTE, "FmSearchDialog, OnClickedSearchAgain : falscher Modus !"); // the CancelButton is usually only disabled, when working in a thread or with reschedule m_pSearchEngine->CancelSearch(); // the ProgressHandler is called when it's really finished, here it's only a demand @@ -587,26 +586,23 @@ void FmSearchDialog::EnableSearchUI(bool bEnable) OUString sButtonText( bEnable ? m_sSearch : m_sCancel ); m_pbSearchAgain->SetText( sButtonText ); - if (m_pSearchEngine->GetSearchMode() != SM_BRUTE) - { - m_prbSearchForText->Enable (bEnable); - m_prbSearchForNull->Enable (bEnable); - m_prbSearchForNotNull->Enable (bEnable); - m_plbForm->Enable (bEnable); - m_prbAllFields->Enable (bEnable); - m_prbSingleField->Enable (bEnable); - m_plbField->Enable (bEnable && m_prbSingleField->IsChecked()); - m_pcbBackwards->Enable (bEnable); - m_pcbStartOver->Enable (bEnable); - m_pbClose->Enable (bEnable); - EnableSearchForDependees (bEnable); - - if ( !bEnable ) - { // this means we're preparing for starting a search - // In this case, EnableSearchForDependees disabled the search button - // But as we're about to use it for cancelling the search, we really need to enable it, again - m_pbSearchAgain->Enable(); - } + m_prbSearchForText->Enable (bEnable); + m_prbSearchForNull->Enable (bEnable); + m_prbSearchForNotNull->Enable (bEnable); + m_plbForm->Enable (bEnable); + m_prbAllFields->Enable (bEnable); + m_prbSingleField->Enable (bEnable); + m_plbField->Enable (bEnable && m_prbSingleField->IsChecked()); + m_pcbBackwards->Enable (bEnable); + m_pcbStartOver->Enable (bEnable); + m_pbClose->Enable (bEnable); + EnableSearchForDependees (bEnable); + + if ( !bEnable ) + { // this means we're preparing for starting a search + // In this case, EnableSearchForDependees disabled the search button + // But as we're about to use it for cancelling the search, we really need to enable it, again + m_pbSearchAgain->Enable(); } if (!bEnable) |