cui/source/customize/CommandCategoryListBox.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
New commits: commit ebccc375248faebdfbca273b149483593c753387 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sat Nov 9 15:12:52 2019 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat Nov 9 17:02:36 2019 +0100 tdf#128010: Don't ask to enable JRE when populating available scripts It was user's intention to not use JRE, so omitting the JRE-dependent scripts in dialogs is just consistent with user's configuration. Change-Id: Ic551f5dd1d797fbaa2dc6d7e443e23d46b0ac5d3 Reviewed-on: https://gerrit.libreoffice.org/82353 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/cui/source/customize/CommandCategoryListBox.cxx b/cui/source/customize/CommandCategoryListBox.cxx index a5c572e6a935..10758d0af47a 100644 --- a/cui/source/customize/CommandCategoryListBox.cxx +++ b/cui/source/customize/CommandCategoryListBox.cxx @@ -42,6 +42,7 @@ #include <strings.hrc> #include <comphelper/processfactory.hxx> #include <comphelper/sequenceashashmap.hxx> +#include <comphelper/SetFlagContextHelper.hxx> #include <comphelper/string.hxx> #include <i18nlangtag/languagetag.hxx> #include <i18nutil/searchopt.hxx> @@ -381,8 +382,15 @@ void CommandCategoryListBox::categorySelected(CuiConfigFunctionListBox* pFunctio SfxCfgKind::GROUP_SCRIPTCONTAINER, 0 ) ); std::unique_ptr<weld::TreeIter> xMacroGroup(pFunctionListBox->tree_append(OUString::number(reinterpret_cast<sal_Int64>(m_aGroupInfo.back().get())), sUIName)); - //Add the children and the grand children - addChildren(xMacroGroup.get(), childGroup, pFunctionListBox, filterTerm, pCurrentSaveInData, aNodesToExpand); + { + // tdf#128010: Do not nag user asking to enable JRE: if it's disabled, + // simply don't show relevant entries (user chose to not use JRE) + css::uno::ContextLayer layer( + comphelper::NoEnableJavaInteractionContext()); + //Add the children and the grand children + addChildren(xMacroGroup.get(), childGroup, pFunctionListBox, filterTerm, + pCurrentSaveInData, aNodesToExpand); + } // Remove the main group if empty if (!pFunctionListBox->iter_has_child(*xMacroGroup)) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits