cui/source/dialogs/cuifmsearch.cxx | 9 +++++++-- vcl/jsdialog/enabled.cxx | 1 + 2 files changed, 8 insertions(+), 2 deletions(-)
New commits: commit d6e52da9123a2bb2f08752919596690fa49b72dc Author: Hannah Meeks <hmeeks4...@gmail.com> AuthorDate: Wed Jan 25 11:07:28 2023 +0000 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Tue Jan 31 10:03:55 2023 +0000 cui: Make SimilaritySearch dialog async and enable use for jsdialog Change-Id: I89c6665138c94aa355efbbc4aa0947226c68af5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146325 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index 18f9cae66536..571ecc80695e 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -311,15 +311,20 @@ IMPL_LINK(FmSearchDialog, OnClickedSpecialSettings, weld::Button&, rButton, void if (m_ppbApproxSettings.get() == &rButton) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractSvxSearchSimilarityDialog> pDlg(pFact->CreateSvxSearchSimilarityDialog(m_xDialog.get(), m_pSearchEngine->GetLevRelaxed(), m_pSearchEngine->GetLevOther(), + + VclPtr<AbstractSvxSearchSimilarityDialog> pDlg(pFact->CreateSvxSearchSimilarityDialog(m_xDialog.get(), m_pSearchEngine->GetLevRelaxed(), m_pSearchEngine->GetLevOther(), m_pSearchEngine->GetLevShorter(), m_pSearchEngine->GetLevLonger() )); - if (pDlg->Execute() == RET_OK) + pDlg->StartExecuteAsync([pDlg, this](sal_Int32 nResult){ + + if (nResult == RET_OK) { m_pSearchEngine->SetLevRelaxed( pDlg->IsRelaxed() ); m_pSearchEngine->SetLevOther( pDlg->GetOther() ); m_pSearchEngine->SetLevShorter(pDlg->GetShorter() ); m_pSearchEngine->SetLevLonger( pDlg->GetLonger() ); } + pDlg->disposeOnce(); + }); } else if (m_pSoundsLikeCJKSettings.get() == &rButton) { diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index bc53c8c3a45c..6969dace6f58 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -39,6 +39,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) || rUIFile == u"cui/ui/numberingformatpage.ui" || rUIFile == u"cui/ui/password.ui" || rUIFile == u"cui/ui/splitcellsdialog.ui" + || rUIFile == u"cui/ui/similaritysearchdialog.ui" || rUIFile == u"cui/ui/widgettestdialog.ui" // scalc || rUIFile == u"modules/scalc/ui/analysisofvariancedialog.ui"