rpms/openoffice.org-voikko/F-12 ooovoikko-svn-r3103-damaged-configuration-handling-fix.patch, NONE, 1.1 openoffice.org-voikko.spec, 1.23, 1.24

Ville-Pekka Vainio vpv at fedoraproject.org
Fri Jan 22 22:37:25 UTC 2010


Author: vpv

Update of /cvs/pkgs/rpms/openoffice.org-voikko/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25207

Modified Files:
	openoffice.org-voikko.spec 
Added Files:
	ooovoikko-svn-r3103-damaged-configuration-handling-fix.patch 
Log Message:
* Fri Jan 22 2010 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 3.1-2
- Add patch from SVN to partly fix broken configuration handling, which
  may lead to an OO.o crash (rhbz#549289)


ooovoikko-svn-r3103-damaged-configuration-handling-fix.patch:
 PropertyManager.cxx |    8 ++++++--
 common.cxx          |    5 ++---
 2 files changed, 8 insertions(+), 5 deletions(-)

--- NEW FILE ooovoikko-svn-r3103-damaged-configuration-handling-fix.patch ---
Index: src/PropertyManager.cxx
===================================================================
--- src/PropertyManager.cxx	(revision 3102)
+++ src/PropertyManager.cxx	(revision 3103)
@@ -1,5 +1,5 @@
 /* Openoffice.org-voikko: Finnish linguistic extension for OpenOffice.org
- * Copyright (C) 2007 - 2009 Harri Pitkänen <hatapitk at iki.fi>
+ * Copyright (C) 2007 - 2010 Harri Pitkänen <hatapitk at iki.fi>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -221,10 +221,14 @@
 	throw (beans::UnknownPropertyException) {
 	uno::Reference<uno::XInterface> rootView =
 		getRegistryProperties(group, compContext);
+	if (!rootView.is()) {
+		VOIKKO_DEBUG("ERROR: failed to obtain rootView");
+		throw beans::UnknownPropertyException();
+	}
 	uno::Reference<beans::XHierarchicalPropertySet> propSet(rootView, uno::UNO_QUERY);
 	if (!propSet.is()) {
 		VOIKKO_DEBUG("ERROR: failed to obtain propSet");
-		throw new beans::UnknownPropertyException();
+		throw beans::UnknownPropertyException();
 	}
 	uno::Any value = propSet->getHierarchicalPropertyValue(key);
 	return value;
Index: src/common.cxx
===================================================================
--- src/common.cxx	(revision 3102)
+++ src/common.cxx	(revision 3103)
@@ -1,5 +1,5 @@
 /* Openoffice.org-voikko: Finnish linguistic extension for OpenOffice.org
- * Copyright (C) 2007 - 2008 Harri Pitkänen <hatapitk at iki.fi>
+ * Copyright (C) 2007 - 2010 Harri Pitkänen <hatapitk at iki.fi>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -75,6 +75,7 @@
 	uno::Sequence<uno::Any> aArguments(1);
 	aArguments.getArray()[0] = (uno::Any) pathArgument;
 	try {
+		// FIXME: this may crash if configuration is damaged
 		rootView = provider->createInstanceWithArguments(
 			A2OU("com.sun.star.configuration.ConfigurationUpdateAccess"), aArguments);
 	}
@@ -86,8 +87,6 @@
 		VOIKKO_DEBUG("ERROR: failed to obtain rootView");
 	}
 	return rootView;
-	uno::Reference<beans::XHierarchicalPropertySet> propSet(rootView, uno::UNO_QUERY);
-	return propSet;
 }
 
 sal_Bool voikko_initialized = sal_False;


Index: openoffice.org-voikko.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org-voikko/F-12/openoffice.org-voikko.spec,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -p -r1.23 -r1.24
--- openoffice.org-voikko.spec	10 Aug 2009 20:02:50 -0000	1.23
+++ openoffice.org-voikko.spec	22 Jan 2010 22:37:24 -0000	1.24
@@ -1,6 +1,6 @@
 Name:           openoffice.org-voikko
 Version:        3.1 
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Finnish spellchecker and hyphenator extension for OpenOffice.org
 
 Group:          Applications/Productivity
@@ -10,6 +10,8 @@ URL:            http://voikko.sourceforg
 Source0:        http://downloads.sourceforge.net/voikko/%{name}-%{version}.tar.gz
 # The usual format of test release URLs
 #Source0:        http://www.puimula.org/htp/testing/%{name}-%{version}rc2.tar.gz
+# SVN r3103, partially fix rhbz#549289
+Patch0:         ooovoikko-svn-r3103-damaged-configuration-handling-fix.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:    openoffice.org-sdk >= 1:3.1.0
@@ -36,6 +38,7 @@ provided by the Voikko library.
 
 %prep
 %setup -q
+%patch0 -p0
 
 
 # Make install-unpacked also builds before installing, leave the build section
@@ -84,6 +87,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Fri Jan 22 2010 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 3.1-2
+- Add patch from SVN to partly fix broken configuration handling, which
+  may lead to an OO.o crash (rhbz#549289)
+
 * Mon Aug 10 2009 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 3.1-1
 - Update source URL to "official" upstream and bump version accordingly.
 - The tarball is the same as in RC2.



More information about the scm-commits mailing list