From 1e6cd0d277d8d9bccf93cb3ea7c47f4ab10db197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 5 Dec 2010 16:50:01 +0000 Subject: [PATCH] drop integrated patches --- 0001-destroydesktop.in.timeout.patch | 51 --------- exit.quickstarter.when.deleted.patch | 101 ------------------ libreoffice.spec | 16 ++- ...org-3.3.0.rhbz657541.join-paragraphs.patch | 21 ---- ...ont-forceenabled-on-post-reg-restart.patch | 71 ------------ 5 files changed, 6 insertions(+), 254 deletions(-) delete mode 100644 0001-destroydesktop.in.timeout.patch delete mode 100644 exit.quickstarter.when.deleted.patch delete mode 100644 openoffice.org-3.3.0.rhbz657541.join-paragraphs.patch delete mode 100644 qstart.dont-forceenabled-on-post-reg-restart.patch diff --git a/0001-destroydesktop.in.timeout.patch b/0001-destroydesktop.in.timeout.patch deleted file mode 100644 index 7ae1a77..0000000 --- a/0001-destroydesktop.in.timeout.patch +++ /dev/null @@ -1,51 +0,0 @@ -@@ -, +, @@ - fix crash in exiting via disabling lone quick-starter, terminate at idle ---- a/sfx2/source/appl/shutdownicon.cxx -+++ a/sfx2/source/appl/shutdownicon.cxx -@@ -182,6 +182,9 @@ bool ShutdownIcon::LoadModule( osl::Module **pModule, - return true; - } - -+// These two timeouts are necessary to avoid there being -+// plugin frames still on the stack, after unloading that -+// code, causing a crash during disabling / termination. - class IdleUnloader : Timer - { - ::osl::Module *m_pModule; -@@ -199,6 +202,22 @@ public: - } - }; - -+class IdleTerminate : Timer -+{ -+ Reference< XDesktop > m_xDesktop; -+public: -+ IdleTerminate (Reference< XDesktop > xDesktop) -+ { -+ m_xDesktop = xDesktop; -+ Start(); -+ } -+ virtual void Timeout() -+ { -+ m_xDesktop->terminate(); -+ delete this; -+ } -+}; -+ - void ShutdownIcon::initSystray() - { - if (m_bInitialized) -@@ -576,11 +595,8 @@ void ShutdownIcon::terminateDesktop() - if ( xSupplier.is() ) - { - Reference< XIndexAccess > xTasks ( xSupplier->getFrames(), UNO_QUERY ); -- if( xTasks.is() ) -- { -- if( xTasks->getCount() < 1 ) -- xDesktop->terminate(); -- } -+ if( xTasks.is() && xTasks->getCount() < 1 ) -+ new IdleTerminate( xDesktop ); - } - - // remove the instance pointer diff --git a/exit.quickstarter.when.deleted.patch b/exit.quickstarter.when.deleted.patch deleted file mode 100644 index 6766eee..0000000 --- a/exit.quickstarter.when.deleted.patch +++ /dev/null @@ -1,101 +0,0 @@ -diff --git a/sfx2/source/appl/makefile.mk b/sfx2/source/appl/makefile.mk -index 72ac94a..a583102 100644 ---- a/sfx2/source/appl/makefile.mk -+++ b/sfx2/source/appl/makefile.mk -@@ -53,6 +53,10 @@ CFLAGS+=-DENABLE_QUICKSTART_APPLET - CDEFS+=-DDLL_NAME=libsfx$(DLLPOSTFIX)$(DLLPOST) - .IF "$(ENABLE_SYSTRAY_GTK)"=="TRUE" - PKGCONFIG_MODULES=gtk+-2.0 -+.IF "$(ENABLE_GIO)"!="" -+ PKGCONFIG_MODULES+=gio-2.0 -+ CDEFS+=-DENABLE_GIO -+.ENDIF - .INCLUDE: pkg_config.mk - CFLAGS+=$(PKGCONFIG_CFLAGS) - CFLAGS+=-DENABLE_QUICKSTART_APPLET -diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx -index e31c32f..1b78f9b 100644 ---- a/sfx2/source/appl/shutdowniconunx.cxx -+++ b/sfx2/source/appl/shutdowniconunx.cxx -@@ -19,6 +19,10 @@ - #include "shutdownicon.hxx" - #endif - -+#ifdef ENABLE_GIO -+#include -+#endif -+ - // Cut/paste from vcl/inc/svids.hrc - #define SV_ICON_SMALL_START 25000 - -@@ -39,6 +43,9 @@ - static GtkWidget *pExitMenuItem = NULL; - static GtkWidget *pOpenMenuItem = NULL; - static GtkWidget *pDisableMenuItem = NULL; -+#ifdef ENABLE_GIO -+GFileMonitor* pMonitor = NULL; -+#endif - - static void open_url_cb( GtkWidget *, gpointer data ) - { -@@ -354,6 +361,22 @@ - } - } - -+#ifdef ENABLE_GIO -+/* -+ * See rhbz#610103. If the quickstarter is running, then LibreOffice is -+ * upgraded, then the old quickstarter is still running, but is now unreliable -+ * as the old install has been deleted. A fairly intractable problem but we -+ * can avoid much of the pain if we turn off the quickstarter if we detect -+ * that it has been physically deleted. -+*/ -+static void notify_file_changed(GFileMonitor * /*gfilemonitor*/, GFile * /*arg1*/, -+ GFile * /*arg2*/, GFileMonitorEvent event_type, gpointer /*user_data*/) -+{ -+ if (event_type == G_FILE_MONITOR_EVENT_DELETED) -+ exit_quickstarter_cb(GTK_WIDGET(pTrayIcon)); -+} -+#endif -+ - void SAL_DLLPUBLIC_EXPORT plugin_init_sys_tray() - { - ::SolarMutexGuard aGuard; -@@ -396,6 +419,20 @@ - // disable shutdown - pShutdownIcon->SetVeto( true ); - pShutdownIcon->addTerminateListener(); -+ -+#ifdef ENABLE_GIO -+ GFile* pFile = NULL; -+ rtl::OUString sLibraryFileUrl; -+ if (osl::Module::getUrlFromAddress(plugin_init_sys_tray, sLibraryFileUrl)) -+ pFile = g_file_new_for_uri(rtl::OUStringToOString(sLibraryFileUrl, RTL_TEXTENCODING_UTF8).getStr()); -+ -+ if (pFile) -+ { -+ if ((pMonitor = g_file_monitor_file(pFile, G_FILE_MONITOR_NONE, NULL, NULL))) -+ g_signal_connect(pMonitor, "changed", (GCallback)notify_file_changed, NULL); -+ g_object_unref(pFile); -+ } -+#endif - } - - void SAL_DLLPUBLIC_EXPORT plugin_shutdown_sys_tray() -@@ -403,6 +440,16 @@ - ::SolarMutexGuard aGuard; - if( !pTrayIcon ) - return; -+#ifdef ENABLE_GIO -+ if (pMonitor) -+ { -+ g_signal_handlers_disconnect_by_func(pMonitor, -+ (void*)notify_file_changed, pMonitor); -+ g_file_monitor_cancel(pMonitor); -+ g_object_unref(pMonitor); -+ pMonitor = NULL; -+ } -+#endif - gtk_widget_destroy( GTK_WIDGET( pTrayIcon ) ); - pTrayIcon = NULL; - pExitMenuItem = NULL; diff --git a/libreoffice.spec b/libreoffice.spec index 409590e..b3228f5 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -92,11 +92,7 @@ Patch9: openoffice.org-3.1.1.ooo105784.vcl.sniffscriptforsubs.patch Patch10: openoffice.org-3.3.0.ooo108637.sfx2.uisavedir.patch Patch11: openoffice.org-3.3.0.ooo113273.desktop.resolvelinks.patch Patch12: turn-script-providers-into-extensions.patch -Patch13: qstart.dont-forceenabled-on-post-reg-restart.patch -Patch14: libreoffice-installfix.patch -Patch15: exit.quickstarter.when.deleted.patch -Patch16: 0001-destroydesktop.in.timeout.patch -Patch17: openoffice.org-3.3.0.rhbz657541.join-paragraphs.patch +Patch13: libreoffice-installfix.patch %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %define instdir %{_libdir} @@ -704,11 +700,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc %patch10 -p1 -b .ooo108637.sfx2.uisavedir.patch %patch11 -p0 -b .ooo113273.desktop.resolvelinks.patch %patch12 -p1 -b .turn-script-providers-into-extensions.patch -%patch13 -p1 -b .qstart.dont-forceenabled-on-post-reg-restart.patch -%patch14 -p1 -b .libreoffice-installfix.patch -%patch15 -p1 -b .exit.quickstarter.when.deleted.patch -%patch16 -p1 -b .0001-destroydesktop.in.timeout.patch -%patch17 -p1 -b .rhbz657541.join-paragraphs.patch +%patch13 -p1 -b .libreoffice-installfix.patch touch scripting/source/pyprov/delzip touch scripting/util/provider/beanshell/delzip touch scripting/util/provider/javascript/delzip @@ -2017,6 +2009,10 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %changelog * Sun Dec 05 2010 Caolán McNamara 3.3.0.1-1 - release candidate 1 +- drop integrated qstart.dont-forceenabled-on-post-reg-restart.patch +- drop integrated exit.quickstarter.when.deleted.patch +- drop integrated 0001-destroydesktop.in.timeout.patch +- drop integrated openoffice.org-3.3.0.rhbz657541.join-paragraphs.patch * Sat Nov 27 2010 Caolán McNamara 3.2.99.3-2 - Resolves: rhbz#610103 exit quickstarter when libs deleted diff --git a/openoffice.org-3.3.0.rhbz657541.join-paragraphs.patch b/openoffice.org-3.3.0.rhbz657541.join-paragraphs.patch deleted file mode 100644 index 5cb4b2e..0000000 --- a/openoffice.org-3.3.0.rhbz657541.join-paragraphs.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -r 98d427d68ce0 sw/source/core/txtnode/thints.cxx ---- a/sw/source/core/txtnode/thints.cxx Thu Nov 04 14:44:14 2010 +0000 -+++ b/sw/source/core/txtnode/thints.cxx Sat Nov 27 16:03:40 2010 +0100 -@@ -2102,7 +2102,7 @@ - const SwTxtAttr* const pAutoStyle(i_rAttrSpan.second); - SfxItemIter aIter(m_rAttrSet); - const SfxPoolItem* pItem(aIter.GetCurItem()); -- while (true) -+ while (pItem) - { - const USHORT nWhich(pItem->Which()); - if (CharFmt::IsItemIncluded(nWhich, pAutoStyle)) -@@ -2170,7 +2170,7 @@ - o_rClearIds.reserve(i_rAttrSet.Count()); - SfxItemIter aIter(i_rAttrSet); - const SfxPoolItem* pItem(aIter.GetCurItem()); -- while (true) -+ while (pItem) - { - o_rClearIds.push_back(pItem->Which()); - diff --git a/qstart.dont-forceenabled-on-post-reg-restart.patch b/qstart.dont-forceenabled-on-post-reg-restart.patch deleted file mode 100644 index 8236e53..0000000 --- a/qstart.dont-forceenabled-on-post-reg-restart.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx -index b657374..1f32f9b 100644 ---- a/desktop/inc/app.hxx -+++ b/desktop/inc/app.hxx -@@ -133,7 +133,6 @@ class Desktop : public Application - static sal_Bool IsFirstStartWizardNeeded(); - static sal_Bool CheckExtensionDependencies(); - -- static void DoRestartActionsIfNecessary( sal_Bool bQuickStart ); - static void SetRestartState(); - - void SynchronizeExtensionRepositories(); -diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx -index 9ec6e87..67834c3 100644 ---- a/desktop/source/app/app.cxx -+++ b/desktop/source/app/app.cxx -@@ -1919,9 +1921,8 @@ void Desktop::Main() - - if ( !bRestartRequested ) - { -- // if this run of the office is triggered by restart, some additional actions should be done -- DoRestartActionsIfNecessary( !pCmdLineArgs->IsInvisible() && !pCmdLineArgs->IsNoQuickstart() ); -- -+ // if this run of the office is triggered by restart, some -+ // additional actions should be done - Execute(); - } - } -diff --git a/desktop/source/app/appfirststart.cxx b/desktop/source/app/appfirststart.cxx -index 9ef0a8a..673dfa8 100644 ---- a/desktop/source/app/appfirststart.cxx -+++ b/desktop/source/app/appfirststart.cxx -@@ -269,38 +269,6 @@ sal_Bool Desktop::IsFirstStartWizardNeeded() - return impl_isFirstStart() || !impl_isLicenseAccepted(); - } - --void Desktop::DoRestartActionsIfNecessary( sal_Bool bQuickStart ) --{ -- if ( bQuickStart ) -- { -- try -- { -- Reference< XPropertySet > xPSet = impl_getConfigurationAccess( OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Setup/Office" ) ) ); -- -- OUString sPropName( RTL_CONSTASCII_USTRINGPARAM( "OfficeRestartInProgress" ) ); -- Any aRestart = xPSet->getPropertyValue( sPropName ); -- sal_Bool bRestart = sal_False; -- if ( ( aRestart >>= bRestart ) && bRestart ) -- { -- xPSet->setPropertyValue( sPropName, makeAny( sal_False ) ); -- Reference< util::XChangesBatch >( xPSet, UNO_QUERY_THROW )->commitChanges(); -- -- Sequence< Any > aSeq( 2 ); -- aSeq[0] <<= sal_True; -- aSeq[1] <<= sal_True; -- -- Reference < XInitialization > xQuickstart( ::comphelper::getProcessServiceFactory()->createInstance( -- OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.office.Quickstart" ) ) ),UNO_QUERY_THROW ); -- xQuickstart->initialize( aSeq ); -- } -- } -- catch( uno::Exception& ) -- { -- // this is no critical operation so it should not prevent office from starting -- } -- } --} -- - void Desktop::SetRestartState() - { - try