[libreoffice] fix regression in SvGlobalName operator

Caolan McNamara caolanm at fedoraproject.org
Tue Jul 12 10:51:33 UTC 2011


commit 60cff80657eb46633024454a1ff007dd7caa2c53
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 12 11:51:18 2011 +0100

    fix regression in SvGlobalName operator

 0001-fix-regression-in-SvGlobalName-operator.patch |   39 ++++++++++++++++++++
 libreoffice.spec                                   |    7 +++-
 2 files changed, 45 insertions(+), 1 deletions(-)
---
diff --git a/0001-fix-regression-in-SvGlobalName-operator.patch b/0001-fix-regression-in-SvGlobalName-operator.patch
new file mode 100644
index 0000000..19c4aeb
--- /dev/null
+++ b/0001-fix-regression-in-SvGlobalName-operator.patch
@@ -0,0 +1,39 @@
+From a935029385159ee137418730363257599f67e5d6 Mon Sep 17 00:00:00 2001
+From: Radek Doulik <rodo at novell.com>
+Date: Mon, 11 Jul 2011 20:36:47 +0200
+Subject: [PATCH] fix regression in SvGlobalName::operator <
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+ - it was comparing wrong parts and ommiting part of ID's, resulting
+   in wrong results and thus ::std::map didn't work well with default
+   less compare function of it's keys
+ - fixes fdo#32709
+(cherry picked from commit 345dc7961bc142f167a1b8e5f43f4439e8234f06)
+
+Signed-off-by: Caolán McNamara <caolanm at redhat.com>
+---
+ tools/source/ref/globname.cxx |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx
+index 7a7f5c5..c78aeb5 100644
+--- a/tools/source/ref/globname.cxx
++++ b/tools/source/ref/globname.cxx
+@@ -208,10 +208,10 @@ BOOL SvGlobalName::operator < ( const SvGlobalName & rObj ) const
+     else if( Data2_a == Data2_b )
+     {
+         sal_uInt32 Data1_a;
+-        memcpy(&Data1_a, pImp->szData+4, sizeof(sal_uInt32));
++        memcpy(&Data1_a, pImp->szData, sizeof(sal_uInt32));
+ 
+         sal_uInt32 Data1_b;
+-        memcpy(&Data1_b, rObj.pImp->szData+4, sizeof(sal_uInt32));
++        memcpy(&Data1_b, rObj.pImp->szData, sizeof(sal_uInt32));
+ 
+         return Data1_a  < Data1_b;
+     }
+-- 
+1.7.6
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 08b1f41..9ae044c 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -27,7 +27,7 @@ Summary:        Free Software Productivity Suite
 Name:           libreoffice
 Epoch:          1
 Version:        3.4.1.3
-Release:        2%{?dist}
+Release:        3%{?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
@@ -115,6 +115,7 @@ Patch20: 0001-Related-rhbz-711087-band-aid.patch
 Patch21: 0001-rhbz-667082-do-not-crash-importing-section-containin.patch
 Patch22: 0001-bad-merge-fix-to-enable-extensions-to-build-again.patch
 Patch23: 0001-Related-rhbz-718976-crash-in-SwTxtSizeInfo-GetMultiC.patch
+Patch24: 0001-fix-regression-in-SvGlobalName-operator.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -740,6 +741,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
 %patch21 -p1 -b .rhbz667082-do-not-crash-importing-section-containin.patch
 %patch22 -p1 -b .bad-merge-fix-to-enable-extensions-to-build-again.patch
 %patch23 -p1 -b .rhbz718976-crash-in-SwTxtSizeInfo-GetMultiC.patch
+%patch24 -p1 -b .fix-regression-in-SvGlobalName-operator.patch
 
 # these are horribly incomplete--empty translations and copied english
 # strings with spattering of translated strings
@@ -2024,6 +2026,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %{basisinstdir}/program/kde-open-url
 
 %changelog
+* Tue Jul 12 2011 Caolán McNamara <caolanm at redhat.com> - 3.4.1.3-3
+- fix regression in SvGlobalName operator
+
 * Tue Jul 05 2011 Caolán McNamara <caolanm at redhat.com> - 3.4.1.3-2
 - Related: rhbz#718976 crash in SwTxtSizeInfo::GetMultiCreator
 


More information about the scm-commits mailing list