diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-10-06 15:28:37 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-10-08 13:13:52 +0200 |
commit | b2d156b6ef3845a2f1f390b1c9b7c202187e6b85 (patch) | |
tree | 711baaa5322900bd9978e2a44f5431f0dc7b2dbb /stoc/source | |
parent | e056e30f82ae00c5cb3249f943b0d7ec46c65aad (diff) |
tdf#120362: Don't ask user to enable JVM when enumerating scripts
Since it wasn't an explicit user's intention to run something that requires
JVM, asking to enable it in case it's disabled is nonsense, and it happened
every first time in a LO session when user wanted to start e.g. Basic macro
using Tools->Macros->Run Macro... tool.
Change-Id: I5afae804e183c185472d41a2d419ec80b7955110
Reviewed-on: https://gerrit.libreoffice.org/61465
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'stoc/source')
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index 968e776be2a0..2bf1fbf55229 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -778,6 +778,13 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) } case JFW_E_JAVA_DISABLED: { + bool bDontEnableJava = false; + auto xContext(css::uno::getCurrentContext()); + if (xContext.is()) + xContext->getValueByName("DontEnableJava") >>= bDontEnableJava; + if (bDontEnableJava) + return css::uno::Any(); + //QueryBox: //%PRODUCTNAME requires a Java runtime environment (JRE) to perform //this task. However, use of a JRE has been disabled. Do you want to |