[libreoffice] Resolves: fdo#75540 spadmin does not start
sbergmann
sbergmann at fedoraproject.org
Thu Feb 27 14:21:04 UTC 2014
commit 54fdddb51480fac2ce1d4cce3786899e55b93535
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Feb 27 15:21:40 2014 +0100
Resolves: fdo#75540 spadmin does not start
...etProcessServiceFactory-must-be-called-be.patch | 139 ++++++++++++++++++++
libreoffice.spec | 6 +-
2 files changed, 144 insertions(+), 1 deletions(-)
---
diff --git a/0001-fdo-75540-setProcessServiceFactory-must-be-called-be.patch b/0001-fdo-75540-setProcessServiceFactory-must-be-called-be.patch
new file mode 100644
index 0000000..b4eb34a
--- /dev/null
+++ b/0001-fdo-75540-setProcessServiceFactory-must-be-called-be.patch
@@ -0,0 +1,139 @@
+From 34c72f10939d473eb1a098fac1f05647c0232727 Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman at redhat.com>
+Date: Thu, 27 Feb 2014 13:18:36 +0100
+Subject: [PATCH] fdo#75540 setProcessServiceFactory must be called before
+ InitVCL
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+...because InitVCL now calls:
+
+> comphelper::getProcessServiceFactory
+> comphelper::getProcessComponentContext
+> utl::DefaultFontConfiguration::DefaultFontConfiguration
+> rtl::Static<utl::DefaultFontConfiguration, (anonymous namespace)::theDefaultFontConfiguration>::get
+> utl::DefaultFontConfiguration::get
+> ImplStyleData::SetStandardStyles
+> ImplStyleData::ImplStyleData
+> boost::make_shared<ImplStyleData>
+> StyleSettings::StyleSettings
+> ImplAllSettingsData::ImplAllSettingsData
+> boost::make_shared<ImplAllSettingsData>
+> AllSettings::AllSettings
+> Application::InitSettings
+> Application::GetSettings
+> GtkInstance::AfterAppInit
+> InitVCL
+> ImplSVMain
+> SVMain
+> sal_main
+> main
+
+and Application::Main is only called after InitVCL.
+
+(cherry picked from commit c828e3cc409077a1916911b8abf1d7b8dbb2078a)
+Conflicts:
+ padmin/source/pamain.cxx
+
+Change-Id: I1126e33f454a4ea35ef295cbd3f48429c473efb4
+Reviewed-on: https://gerrit.libreoffice.org/8380
+Reviewed-by: Caolán McNamara <caolanm at redhat.com>
+Tested-by: Caolán McNamara <caolanm at redhat.com>
+---
+ padmin/source/pamain.cxx | 54 +++++++++++++++++++++++++++---------------------
+ 1 file changed, 30 insertions(+), 24 deletions(-)
+
+diff --git a/padmin/source/pamain.cxx b/padmin/source/pamain.cxx
+index bbccadf..b510f99 100644
+--- a/padmin/source/pamain.cxx
++++ b/padmin/source/pamain.cxx
+@@ -51,6 +51,11 @@ public:
+ virtual sal_uInt16 Exception( sal_uInt16 nError );
+
+ static OUString ReadStringHook( const OUString& );
++
++private:
++ virtual void Init() SAL_OVERRIDE;
++
++ Reference< XComponentContext > xCtx_;
+ };
+
+ void vclmain::createApplication()
+@@ -84,35 +89,13 @@ int MyApp::Main()
+
+ EnableAutoHelpId();
+
+- //-------------------------------------------------
+- // create the global service-manager
+- //-------------------------------------------------
+- Reference< XComponentContext > xCtx;
+- Reference< XMultiServiceFactory > xFactory;
+- try
+- {
+- xCtx = defaultBootstrap_InitialComponentContext();
+- xFactory = Reference< XMultiServiceFactory >( xCtx->getServiceManager(), UNO_QUERY );
+- if( xFactory.is() )
+- setProcessServiceFactory( xFactory );
+- }
+- catch( const com::sun::star::uno::Exception& )
+- {
+- }
+-
+- if( ! xFactory.is() )
+- {
+- fprintf( stderr, "Could not bootstrap UNO, installation must be in disorder. Exiting.\n" );
+- exit( 1 );
+- }
+-
+ // Detect desktop environment - need to do this as early as possible
+ com::sun::star::uno::setCurrentContext(
+ new DesktopContext( com::sun::star::uno::getCurrentContext() ) );
+
+ // Create UCB (for backwards compatibility, in case some code still uses
+ // plain createInstance w/o args directly to obtain an instance):
+- com::sun::star::ucb::UniversalContentBroker::create(xCtx);
++ com::sun::star::ucb::UniversalContentBroker::create(xCtx_);
+
+ /*
+ * Initialize the Java UNO AccessBridge if accessibility is turned on
+@@ -139,7 +122,7 @@ int MyApp::Main()
+ */
+ try
+ {
+- Reference<XComponent> xComp(xCtx, UNO_QUERY_THROW);
++ Reference<XComponent> xComp(xCtx_, UNO_QUERY_THROW);
+ xComp->dispose();
+ }
+ catch(...)
+@@ -149,4 +132,27 @@ int MyApp::Main()
+ return EXIT_SUCCESS;
+ }
+
++void MyApp::Init()
++{
++ // create the global service-manager
++
++ Reference< XMultiServiceFactory > xFactory;
++ try
++ {
++ xCtx_ = defaultBootstrap_InitialComponentContext();
++ xFactory = Reference< XMultiServiceFactory >( xCtx_->getServiceManager(), UNO_QUERY );
++ if( xFactory.is() )
++ setProcessServiceFactory( xFactory );
++ }
++ catch( const com::sun::star::uno::Exception& )
++ {
++ }
++
++ if( ! xFactory.is() )
++ {
++ fprintf( stderr, "Could not bootstrap UNO, installation must be in disorder. Exiting.\n" );
++ exit( 1 );
++ }
++}
++
+ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+--
+1.8.5.3
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 873a163..afbeb55 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -43,7 +43,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: %{libo_version}.1
-Release: 3%{?libo_prerelease}%{?dist}
+Release: 4%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0
Group: Applications/Productivity
URL: http://www.libreoffice.org/default/
@@ -280,6 +280,7 @@ Patch17: 0001-Related-rhbz-1065807-rework-i66157-for-multiple-writ.patch
Patch18: 0001-Resolves-rhbz-1065807-use-xdg-Templates-for-default-.patch
Patch19: 0001-explictly-list-common-lang-independant-template-dir.patch
Patch20: 0001-rhbz-1057977-avoid-use-of-invalidated-pointers.patch
+Patch21: 0001-fdo-75540-setProcessServiceFactory-must-be-called-be.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
@@ -2175,6 +2176,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%changelog
+* Thu Feb 27 2014 Stephan Bergmann <sbergman at redhat.com> - 1:4.2.1.1-4
+- Resolves: fdo#75540 spadmin does not start
+
* Thu Feb 27 2014 David Tardon <dtardon at redhat.com> - 1:4.2.1.1-3
- Resolves: rhbz#1057977 do not crash when fonts are updated
More information about the scm-commits
mailing list