From 4f7fc2a20ac7dc6c120d17f2232a2c2707412ed5 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Tue, 21 Jun 2011 09:14:14 +0200 Subject: [PATCH] Resolves: rhbz#667082 do not crash importing section containing just an empty paragraph --- ...ot-crash-importing-section-containin.patch | 32 +++++++++++++++++++ libreoffice.spec | 6 +++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 0001-rhbz-667082-do-not-crash-importing-section-containin.patch diff --git a/0001-rhbz-667082-do-not-crash-importing-section-containin.patch b/0001-rhbz-667082-do-not-crash-importing-section-containin.patch new file mode 100644 index 0000000..9f2f750 --- /dev/null +++ b/0001-rhbz-667082-do-not-crash-importing-section-containin.patch @@ -0,0 +1,32 @@ +From fc23cec13e5e17fb6d0f2d650b8889041af2da68 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Sat, 18 Jun 2011 16:54:43 +0200 +Subject: [PATCH] rhbz#667082 do not crash importing section containing just + an empty paragraph + +--- + writerfilter/source/dmapper/DomainMapper_Impl.cxx | 8 +------- + 1 files changed, 1 insertions(+), 7 deletions(-) + +diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx +index 759f8e7..9944c8c 100644 +--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx ++++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx +@@ -937,13 +937,7 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) + uno::Reference< text::XTextRange > xParaEnd( xCur, uno::UNO_QUERY ); + CheckParaRedline( xParaEnd ); + +- // Remove the last empty section paragraph if needed +- if ( m_bIsLastParaInSection && !m_bParaChanged ) +- { +- RemoveLastParagraph( ); +- m_bIsLastParaInSection = false; +- } +- ++ m_bIsLastParaInSection = false; + m_bParaChanged = false; + } + if( !bKeepLastParagraphProperties ) +-- +1.7.5.2 + diff --git a/libreoffice.spec b/libreoffice.spec index 489eabb..792d00b 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -19,7 +19,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: 3.4.1.1 -Release: 4%{?dist} +Release: 5%{?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 @@ -105,6 +105,7 @@ Patch18: 0001-Resolves-rhbz-713154-pdf-export-dialog-too-tall-to-f.patch Patch19: 0001-Related-rhbz-702833-addEventListener-without-removeE.patch Patch20: 0001-Related-rhbz-711087-band-aid.patch Patch21: 0001-correctly-build-GTK-systray-icon.patch +Patch22: 0001-rhbz-667082-do-not-crash-importing-section-containin.patch %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %define instdir %{_libdir} @@ -728,6 +729,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc %patch19 -p1 -b .rhbz702833-addEventListener-without-removeE.patch %patch20 -p1 -b .rhbz711087-band-aid.patch %patch21 -p1 -b .correctly-build-GTK-systray-icon.patch +%patch22 -p1 -b .rhbz667082-do-not-crash-importing-section-containin.patch # these are horribly incomplete--empty translations and copied english # strings with spattering of translated strings @@ -2014,6 +2016,8 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %changelog * Tue Jun 21 2011 David Tardon - 3.4.1.1-5 - Resolves: rhbz#714781 add Persian langpack +- Resolves: rhbz#667082 do not crash importing section containing just + an empty paragraph * Mon Jun 20 2011 Caolán McNamara - 3.4.1.1-4 - Related: rhbz#711087 band aid for crash in sc undo