[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] LibreOffice packaging repository branch, ubuntu-raring-4.0, updated. libreoffice_4.0.1_rc1-2-169-g6214058



The following commit has been merged in the ubuntu-raring-4.0 branch:
commit e75bdf8ee7438ba48b6c01d8738e06ea510799da
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Fri Feb 22 15:44:57 2013 +0100

    lp#780399: sessioninstaller for remaining java wizards
    
    - rather hacky solution, but in the light of the hope for the last Java wizards
      being gone in LibreOffice 4.1.x, no need to bother for more

diff --git a/changelog b/changelog
index bc9b1d3..5d72c00 100644
--- a/changelog
+++ b/changelog
@@ -1,7 +1,8 @@
-libreoffice (1:4.0.0-2ubuntu2) raring; urgency=low
+libreoffice (1:4.0.0-2ubuntu1~ppa1) raring; urgency=low
 
   * bump ubuntu version
   * add transitionals for -presenter-console and -binfilter
+  * add sessioninstaller for remaining wizards (LP: #780399)
 
  -- Bjoern Michaelsen <bjoern.michaelsen@canonical.com>  Wed, 13 Feb 2013 14:42:23 +0100
 
diff --git a/patches/lp-780399-sessioninstaller-for-remaining-java-wizards.diff b/patches/lp-780399-sessioninstaller-for-remaining-java-wizards.diff
new file mode 100644
index 0000000..d29a21e
--- /dev/null
+++ b/patches/lp-780399-sessioninstaller-for-remaining-java-wizards.diff
@@ -0,0 +1,127 @@
+From 472ba892d9a12c17d47c3a0b9df0c092731455da Mon Sep 17 00:00:00 2001
+From: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
+Date: Fri, 22 Feb 2013 15:08:26 +0100
+Subject: [PATCH] lp#780399: sessioninstaller for remaining java wizards
+
+Change-Id: Idbf4e24440f42f5b254cd1f4305f1cba729f33a6
+---
+ framework/source/dispatch/servicehandler.cxx | 27 +++++++++++++++++++++++++++
+ svtools/inc/svtools/restartdialog.hxx        |  5 ++++-
+ svtools/source/dialogs/restartdialog.cxx     |  3 +++
+ svtools/uiconfig/ui/restartdialog.ui         | 14 ++++++++++++++
+ 4 files changed, 48 insertions(+), 1 deletion(-)
+
+diff --git a/framework/source/dispatch/servicehandler.cxx b/framework/source/dispatch/servicehandler.cxx
+index 5bba096..ce59a27 100644
+--- a/framework/source/dispatch/servicehandler.cxx
++++ b/framework/source/dispatch/servicehandler.cxx
+@@ -25,8 +25,11 @@
+ #include <com/sun/star/frame/DispatchResultState.hpp>
+ #include <com/sun/star/task/XJobExecutor.hpp>
+ 
++#include <org/freedesktop/PackageKit/SyncDbusSessionHelper.hpp>
++#include <svtools/restartdialog.hxx>
+ #include <vcl/svapp.hxx>
+ 
++
+ namespace framework{
+ 
+ #define PROTOCOL_VALUE      "service:"
+@@ -215,6 +218,7 @@ void SAL_CALL ServiceHandler::dispatchWithNotification( const css::util::URL&
+ css::uno::Reference< css::uno::XInterface > ServiceHandler::implts_dispatch( const css::util::URL&                                  aURL       ,
+                                                                              const css::uno::Sequence< css::beans::PropertyValue >& /*lArguments*/ ) throw( css::uno::RuntimeException )
+ {
++
+     /* SAFE */
+     ReadGuard aReadLock( m_aLock );
+     css::uno::Reference< css::lang::XMultiServiceFactory > xFactory = m_xFactory;
+@@ -258,6 +262,29 @@ css::uno::Reference< css::uno::XInterface > ServiceHandler::implts_dispatch( con
+         css::uno::Reference< css::task::XJobExecutor > xExecuteable(xService, css::uno::UNO_QUERY);
+         if (xExecuteable.is())
+             xExecuteable->trigger(sArguments);
++        else if(sServiceName.startsWith("com.sun.star.wizards."))
++        {
++            try
++            {
++                using namespace org::freedesktop::PackageKit;
++                using namespace com::sun::star::uno;
++                using namespace com::sun::star::lang;
++                using namespace svtools;
++                Reference< XSyncDbusSessionHelper > xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext()));
++                Sequence< ::rtl::OUString > vPackages(1);
++                vPackages[0] = "libreoffice-java-common";
++                ::rtl::OUString sInteraction;
++                xSyncDbusSessionHelper->InstallPackageNames(0, vPackages, sInteraction);
++                executeRestartDialog(comphelper::getProcessComponentContext(), NULL, RESTART_REASON_JAVAWIZARDS_INSTALL);
++            }
++            catch (const css::uno::Exception & e)
++            {
++                SAL_INFO(
++                    "framework.dispatch",
++                    "trying to install LibreOffice Java, caught " << e.Message);
++            }
++            return css::uno::Reference< css::uno::XInterface >();
++        }
+     }
+     // ignore all errors - inclusive runtime errors!
+     // E.g. a script based service (written in phyton) could not be executed
+diff --git a/svtools/inc/svtools/restartdialog.hxx b/svtools/inc/svtools/restartdialog.hxx
+index 993b099..d1a7e97 100644
+--- a/svtools/inc/svtools/restartdialog.hxx
++++ b/svtools/inc/svtools/restartdialog.hxx
+@@ -29,9 +29,12 @@ enum RestartReason {
+     RESTART_REASON_PDF_AS_STANDARD_JOB_FORMAT,
+         // For the modified default print job format to take effect,
+         // %PRODUCTNAME must be restarted.
+-    RESTART_REASON_BIBLIOGRAPHY_INSTALL
++    RESTART_REASON_BIBLIOGRAPHY_INSTALL,
+         // "For the bibliography to work properly,
+         // %PRODUCTNAME must be restarted."
++    RESTART_REASON_JAVAWIZARDS_INSTALL,
++        // "For the wizards to work properly,
++        // %PRODUCTNAME must be restarted."
+ };
+ 
+ // Must be called with the solar mutex locked:
+diff --git a/svtools/source/dialogs/restartdialog.cxx b/svtools/source/dialogs/restartdialog.cxx
+index e5d64de..a2c485c 100644
+--- a/svtools/source/dialogs/restartdialog.cxx
++++ b/svtools/source/dialogs/restartdialog.cxx
+@@ -40,6 +40,9 @@ public:
+         case svtools::RESTART_REASON_BIBLIOGRAPHY_INSTALL:
+             get(reason_, "reason_bibliography_install");
+             break;
++        case svtools::RESTART_REASON_JAVAWIZARDS_INSTALL:
++            get(reason_, "reason_javawizards_install");
++            break;
+         default:
+             assert(false); // this cannot happen
+         }
+diff --git a/svtools/uiconfig/ui/restartdialog.ui b/svtools/uiconfig/ui/restartdialog.ui
+index 624053e..febba5a 100644
+--- a/svtools/uiconfig/ui/restartdialog.ui
++++ b/svtools/uiconfig/ui/restartdialog.ui
+@@ -117,6 +117,20 @@
+                 <property name="position">3</property>
+               </packing>
+             </child>
++            <child>
++              <object class="GtkLabel" id="reason_javawizards_install">
++                <property name="can_focus">False</property>
++                <property name="no_show_all">True</property>
++                <property name="label" translatable="yes">For the wizards to work properly, %PRODUCTNAME must be restarted.</property>
++                <property name="wrap">True</property>
++                <property name="max_width_chars">50</property>
++              </object>
++              <packing>
++                <property name="expand">False</property>
++                <property name="fill">True</property>
++                <property name="position">4</property>
++              </packing>
++            </child>
+           </object>
+           <packing>
+             <property name="expand">False</property>
+-- 
+1.7.12.4
+
diff --git a/patches/series b/patches/series
index d79fa04..f41387e 100644
--- a/patches/series
+++ b/patches/series
@@ -29,3 +29,4 @@ dont-touch-urd.diff
 sdremote-close-on-non-bluetooth.diff
 gendocu-no-notimestamp-with-gjdoc.diff
 lp-753627-readd-updated-Ubuntu-brand-palette-colors.diff
+lp-780399-sessioninstaller-for-remaining-java-wizards.diff

-- 
LibreOffice packaging repository


Reply to: