[libreoffice/f15] Resolves: fdo#40303 missing filter detect services cause trouble

Caolan McNamara caolanm at fedoraproject.org
Wed Aug 24 15:51:42 UTC 2011


commit 027109822b3a98c5120bb6824a0eaf041413070b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Aug 24 16:51:29 2011 +0100

    Resolves: fdo#40303 missing filter detect services cause trouble

 ...tions-from-missing-components-here-as-wel.patch |   46 ++++++++++++++++++++
 libreoffice.spec                                   |    7 +++-
 2 files changed, 52 insertions(+), 1 deletions(-)
---
diff --git a/0001-catch-exceptions-from-missing-components-here-as-wel.patch b/0001-catch-exceptions-from-missing-components-here-as-wel.patch
new file mode 100644
index 0000000..73b3b6d
--- /dev/null
+++ b/0001-catch-exceptions-from-missing-components-here-as-wel.patch
@@ -0,0 +1,46 @@
+From 292fe1da59cb8a30dc7a7004aa067750a358923e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Fri, 14 Jan 2011 09:55:47 +0000
+Subject: [PATCH] catch exceptions from missing components here as well more
+ cleanly
+
+---
+ filter/source/config/cache/typedetection.cxx |   22 +++++++++++++++-------
+ 1 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
+index 0c47552..87ea95c 100644
+--- a/filter/source/config/cache/typedetection.cxx
++++ b/filter/source/config/cache/typedetection.cxx
+@@ -1007,13 +1007,21 @@ void TypeDetection::impl_seekStreamToZero(comphelper::MediaDescriptor& rDescript
+     aLock.clear();
+     // <- SAFE
+ 
+-    // Attention! If e.g. an office module was not installed sometimes we find a
+-    // registered detect service, which is referred inside the configuration ... but not realy
+-    // installed. On the other side we use third party components here, which can make trouble anyway.
+-    // So we should handle errors during creation of such services more gracefully .-)
+-    xDetector = css::uno::Reference< css::document::XExtendedFilterDetection >(
+-            xSMGR->createInstance(sDetectService),
+-            css::uno::UNO_QUERY);
++    try
++    {
++        // Attention! If e.g. an office module was not installed sometimes we
++        // find a registered detect service, which is referred inside the
++        // configuration ... but not realy installed. On the other side we use
++        // third party components here, which can make trouble anyway.  So we
++        // should handle errors during creation of such services more
++        // gracefully .-)
++        xDetector = css::uno::Reference< css::document::XExtendedFilterDetection >(
++                xSMGR->createInstance(sDetectService),
++                css::uno::UNO_QUERY_THROW);
++    }
++    catch (...)
++    {
++    }
+ 
+     if ( ! xDetector.is())
+         return ::rtl::OUString();
+-- 
+1.7.6
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 1df7b46..e6248e6 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -29,7 +29,7 @@ Summary:        Free Software Productivity Suite
 Name:           libreoffice
 Epoch:          1
 Version:        3.3.3.1
-Release:        5%{?dist}
+Release:        6%{?dist}
 License:        LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and (CDDL or GPLv2) and Public Domain
 Group:          Applications/Productivity
 URL:            http://www.documentfoundation.org/develop
@@ -157,6 +157,7 @@ Patch68: 0001-Resolves-rhbz-725144-wrong-csh-syntax.patch
 Patch69: 0001-This-makefile-is-for-a-standard-Make-so-use-TABs.patch
 Patch70: 0001-Resolves-rhbz-693265-fix-crash-from-unhandled-except.patch
 Patch71: 0001-Resolves-fdo-39159-don-t-restore-original-view-setti.patch
+Patch72: 0001-catch-exceptions-from-missing-components-here-as-wel.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -829,6 +830,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
 %patch69 -p1 -b .0001-This-makefile-is-for-a-standard-Make-so-use-TABs.patch
 %patch70 -p1 -b .rhbz#693265-fix-crash-from-unhandled-except.patch
 %patch71 -p1 -b .fdo39159-don-t-restore-original-view-setti.patch
+%patch72 -p1 -b .catch-exceptions-from-missing-components-here-as-wel.patch
 
 touch scripting/source/pyprov/delzip
 touch scripting/util/provider/beanshell/delzip
@@ -2173,6 +2175,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %{basisinstdir}/program/kde-open-url
 
 %changelog
+* Wed Aug 24 2011 Caolán McNamara <caolanm at redhat.com> 1:3.3.3.1-6-UNBUILT
+- Resolves: fdo#40303 missing filter detect services cause trouble
+
 * Tue Aug 23 2011 Caolán McNamara <caolanm at redhat.com> 1:3.3.3.1-5
 - Resolves: rhbz#657783 dead ViewShell, possibly on selection
 


More information about the scm-commits mailing list