summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-11-09 15:12:52 +0300
committerCaolán McNamara <caolanm@redhat.com>2019-11-11 22:32:43 +0100
commit3cb7c012dd47f6feed748c15ec94c310e2ceb181 (patch)
treef0741c7b36b0b23ddec22b06ab4526242971dc1f /cui
parentec0df4a5049709dede6a9c92ed57b29e398ff737 (diff)
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.kaganski@collabora.com> (cherry picked from commit ebccc375248faebdfbca273b149483593c753387) Reviewed-on: https://gerrit.libreoffice.org/82355 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/CommandCategoryListBox.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/cui/source/customize/CommandCategoryListBox.cxx b/cui/source/customize/CommandCategoryListBox.cxx
index 382852a56b9e..12fee84f4ec6 100644
--- a/cui/source/customize/CommandCategoryListBox.cxx
+++ b/cui/source/customize/CommandCategoryListBox.cxx
@@ -43,10 +43,12 @@
#include <bitmaps.hlst>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequenceashashmap.hxx>
+#include <comphelper/DisableInteractionHelper.hxx>
#include <comphelper/string.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <i18nutil/searchopt.hxx>
#include <sal/log.hxx>
+#include <uno/current_context.hxx>
#include <cfg.hxx> //for SaveInData
@@ -382,8 +384,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(
+ new comphelper::NoEnableJavaInteractionContext(css::uno::getCurrentContext()));
+ //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))