Hi there,

        This is not really my sphere of expertise, so review appreciated.
Rather than clobber the DesktopContext with some out-of band magic
(which creates the JavaInteractionHandler that in the end complains). I
thought I'd just give this guy a nil context - which seems to work
reasonably.

        On master you can also export STOC_FORCE_NO_JRE=1 # to debug this stuff
on Linux (it's harder to provoke a non-working JRE otherwise).

        I'd like to get this into 3.5.1 - thoughts appreciated :-) IMHO it is
rather better not to show this warning, than provide two scary looking,
and ultimately bogus dialogs there.

        All the best,

                Michael.

>From 3675980cc1804e842b955b656fc03133ffbecea8 Mon Sep 17 00:00:00 2001
From: Michael Meeks <michael.me...@suse.com>
Date: Thu, 16 Feb 2012 12:44:56 +0000
Subject: [PATCH] disable JRE warnings during help compilation on first start

---
 .../source/deployment/registry/help/dp_help.cxx    |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

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 >(
-- 
1.7.3.4

-- 
michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to