Resolves: rhbz#989686 Fix crash with stripping whitespace from toc entries

f41
Caolán McNamara 12 years ago
parent 319ddc49bd
commit 0068b30b88

@ -0,0 +1,33 @@
From e90e00cb76bc16a562b34a56d5e74e974ca4c270 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Fri, 31 May 2013 12:27:49 +0200
Subject: [PATCH] Resolves: rhbz#989686 Fix crash with ooo120774-1.doc
Do not try to remove line breaks from empty string
Reviewed-on: https://gerrit.libreoffice.org/4114
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
(cherry picked from commit 2cb9aaf44dc589af79d62d7b1136b5d65e9f47d4)
Change-Id: Ieb12c541d42944aac813cee10ce479207b1c674b
---
sw/source/core/doc/doctxm.cxx | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 2029d9f..6498585 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1536,6 +1536,8 @@ static String lcl_GetNumString( const SwTOXSortTabBase& rBase, bool bUsePrefix,
/// to a single space, and trailing space removed.
String lcl_RemoveLineBreaks( String sRet )
{
+ if (!sRet.Len())
+ return sRet;
xub_StrLen nOffset = 0;
sRet.SearchAndReplaceAll('\n', ' ');
for (xub_StrLen i = 1; i < sRet.Len(); i++)
--
1.8.3.1

@ -43,7 +43,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice Name: libreoffice
Epoch: 1 Epoch: 1
Version: %{libo_version}.4 Version: %{libo_version}.4
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 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 Group: Applications/Productivity
URL: http://www.libreoffice.org/default/ URL: http://www.libreoffice.org/default/
@ -259,6 +259,7 @@ Patch21: 0001-move-static-bitmap-into-a-svapp-member.patch
Patch22: 0001-resolved-fdo-67094-handle-text-s-in-text-p-and-text-.patch Patch22: 0001-resolved-fdo-67094-handle-text-s-in-text-p-and-text-.patch
Patch23: 0001-Use-inconditionally-the-libwpd-0.9.5-path.patch Patch23: 0001-Use-inconditionally-the-libwpd-0.9.5-path.patch
Patch24: 0001-sanitize-system-clucene-includes.patch Patch24: 0001-sanitize-system-clucene-includes.patch
Patch25: 0001-Resolves-rhbz-989686-Fix-crash-with-ooo120774-1.doc.patch
%define instdir %{_libdir} %define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice %define baseinstdir %{instdir}/libreoffice
@ -1015,6 +1016,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch22 -p1 -b .resolved-fdo-67094-handle-text-s-in-text-p-and-text-.patch %patch22 -p1 -b .resolved-fdo-67094-handle-text-s-in-text-p-and-text-.patch
%patch23 -p1 -b .Use-inconditionally-the-libwpd-0.9.5-path.patch %patch23 -p1 -b .Use-inconditionally-the-libwpd-0.9.5-path.patch
%patch24 -p1 -b .sanitize-system-clucene-includes.patch %patch24 -p1 -b .sanitize-system-clucene-includes.patch
%patch25 -p1 -b .rhbz-989686-Fix-crash-with-ooo120774-1.doc.patch
# TODO: check this # TODO: check this
# these are horribly incomplete--empty translations and copied english # these are horribly incomplete--empty translations and copied english
@ -2101,6 +2103,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif %endif
%changelog %changelog
* Tue Jul 30 2013 Caolán McNamara <caolanm@redhat.com> - 1:4.1.0.4-4
- Resolves: rhbz#989686 Fix crash with stripping whitespace from toc entries
* Mon Jul 29 2013 David Tardon <dtardon@redhat.com> - 1:4.1.0.4-3 * Mon Jul 29 2013 David Tardon <dtardon@redhat.com> - 1:4.1.0.4-3
- make libwpd-based filters work correctly with newest libwpd - make libwpd-based filters work correctly with newest libwpd

Loading…
Cancel
Save