desktop/source/deployment/registry/help/dp_help.cxx | 5 +++++ stoc/source/javavm/javavm.cxx | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-)
New commits: commit 3675980cc1804e842b955b656fc03133ffbecea8 Author: Michael Meeks <michael.me...@suse.com> Date: Thu Feb 16 12:44:56 2012 +0000 disable JRE warnings during help compilation on first start diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index d121833..adc2875 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -38,6 +38,7 @@ #include "comphelper/servicedecl.hxx" #include "svl/inettype.hxx" #include "unotools/pathoptions.hxx" +#include "uno/current_context.hxx" #if !defined(ANDROID) && !defined(IOS) #include <l10ntools/compilehelp.hxx> @@ -420,6 +421,10 @@ void BackendImpl::implProcessHelp( Reference< script::XInvocation > xInvocation; if( xContext.is() ) { + // Ignore the missing JRE scenario on upgrade/first-start without + // horrible end-user warnings that are ignorable,and cause grief. + Reference< XCurrentContext > xNoContext; + com::sun::star::uno::ContextLayer dummyLayer( xNoContext ); try { xInvocation = Reference< script::XInvocation >( commit 3823c4fbbaa5e9f73c37a5e66f63640d59eb20cf Author: Michael Meeks <michael.me...@suse.com> Date: Thu Feb 16 12:38:24 2012 +0000 java: add STOC_FORCE_NO_JRE env. var to enable easy testing of no-JRE case. diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index 14437ee..2c900d2 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -782,8 +782,12 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) JNIEnv * pMainThreadEnv = 0; javaFrameworkError errcode = JFW_E_NONE; - errcode = jfw_startVM(arOptions, index, & m_pJavaVm, - & pMainThreadEnv); + + if (getenv("STOC_FORCE_NO_JRE")) + errcode = JFW_E_NO_SELECT; + else + errcode = jfw_startVM(arOptions, index, & m_pJavaVm, + & pMainThreadEnv); bool bStarted = false; switch (errcode) @@ -794,6 +798,8 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) // No Java configured. We silenty run the java configuration // Java. javaFrameworkError errFind = jfw_findAndSelectJRE( NULL ); + if (getenv("STOC_FORCE_NO_JRE")) + errFind = JFW_E_NO_JAVA_FOUND; if (errFind == JFW_E_NONE) { continue; _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits