Resolves: rhbz#707317 avoid crash in getRowSpan

f41
Caolán McNamara 14 years ago
parent 4cf5d804db
commit 98e7acd11f

@ -0,0 +1,46 @@
From 5bc702e5487ba931b2707770a5e25a883bd89b76 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 27 May 2011 15:33:40 +0100
Subject: [PATCH] Resolves: rhbz#707317 avoid crash in getRowSpan (cherry
picked from commit
23c4f82e9084f8b15f149b074a8ad4ff6a7a4204)
---
sw/source/core/crsr/swcrsr.cxx | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 4f646d2..c27d8f7 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1665,8 +1665,7 @@ sal_Bool SwCursor::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
{
// Set cursor to start/end of covered cell:
SwTableBox* pTableBox = pOldTabBoxSttNode->GetTblBox();
- const long nRowSpan = pTableBox->getRowSpan();
- if ( nRowSpan > 1 )
+ if ( pTableBox && pTableBox->getRowSpan() > 1 )
{
pTableBox = & pTableBox->FindEndOfRowSpan( pOldTabSttNode->GetTable(), (sal_uInt16)(pTableBox->getRowSpan() + mnRowSpanOffset ) );
SwNodeIndex& rPtIdx = GetPoint()->nNode;
@@ -1953,7 +1952,7 @@ sal_Bool SwCursor::GoPrevNextCell( sal_Bool bNext, sal_uInt16 nCnt )
// proceeding:
if ( mnRowSpanOffset )
{
- if ( pTableBox->getRowSpan() > 1 )
+ if ( pTableBox && pTableBox->getRowSpan() > 1 )
{
pTableBox = & pTableBox->FindEndOfRowSpan( pTblNd->GetTable(), (sal_uInt16)(pTableBox->getRowSpan() + mnRowSpanOffset) );
SwNodeIndex aNewIdx( *pTableBox->GetSttNd() );
@@ -1976,7 +1975,7 @@ sal_Bool SwCursor::GoPrevNextCell( sal_Bool bNext, sal_uInt16 nCnt )
pTableBoxStartNode = rPtIdx.GetNode().FindTableBoxStartNode();
pTableBox = pTableBoxStartNode->GetTblBox();
- if ( pTableBox->getRowSpan() < 1 )
+ if ( pTableBox && pTableBox->getRowSpan() < 1 )
{
mnRowSpanOffset = pTableBox->getRowSpan();
// move cursor to non-covered cell:
--
1.7.5.1

@ -19,7 +19,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: 3.4.0.2
Release: 1%{?dist}
Release: 2%{?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
@ -92,6 +92,7 @@ Patch13: 0001-bubble-down-configure-test-findings-on-visibility.patch
Patch14: vbahelper.visibility.patch
Patch15: 0001-rhbz-702635-set-correct-page-number-when-exporting-s.patch
Patch16: 0001-handle-NULL-display-gracefully.patch
Patch17: 0001-Resolves-rhbz-707317-avoid-crash-in-getRowSpan.patch
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%define instdir %{_libdir}
@ -709,6 +710,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch14 -p0 -b .vbahelper.visibility.patch
%patch15 -p1 -b .rhbz702635-set-correct-page-number-when-exporting-s.patch
%patch16 -p1 -b .handle-NULL-display-gracefully.patch
%patch17 -p1 -b .rhbz707317-avoid-crash-in-getRowSpan.patch
# these are horribly incomplete--empty translations and copied english
# strings with spattering of translated strings
@ -1986,6 +1988,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%{basisinstdir}/program/kde-open-url
%changelog
* Mon May 30 2011 Caolán McNamara <caolanm@redhat.com> - 3.4.0.2-2
- Resolves: rhbz#707317 avoid crash in getRowSpan
* Fri May 27 2011 David Tardon <dtardon@redhat.com> - 3.4.0.2-1
- 3.4.0 RC2
- drop integrated 0001-fix-build-with-system-bsh.patch

Loading…
Cancel
Save