[SCM] LibreOffice packaging repository branch, ubuntu-precise-3.5, updated. libreoffice_3.5.2_rc2-1-164-g10e447e
The following commit has been merged in the ubuntu-precise-3.5 branch:
commit f357657b02e52688fc70715b3651dbca49e2b545
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date: Wed Jan 9 21:38:11 2013 +0100
lp#1097829: fix crash following delete at last table cell
diff --git a/changelog b/changelog
index 11631c4..ad58450 100644
--- a/changelog
+++ b/changelog
@@ -18,6 +18,7 @@ libreoffice (1:3.5.7-0ubuntu3) UNRELEASED; urgency=low
* backport sw: better fix for DOCX table import crash (LP: #1097760)
* backport crash in SwXTextDocument::getRendererCount (LP: #1097782)
* backport STG_FREE sector locations rejected (LP: #1097811)
+ * backport fix crash following delete at last table cell (LP: #1097829)
-- Bjoern Michaelsen <bjoern.michaelsen@canonical.com> Tue, 08 Jan 2013 17:09:36 +0100
diff --git a/patches/lp-1097829-rhbz-689053-fix-crash-following-delete-at-last-table.diff b/patches/lp-1097829-rhbz-689053-fix-crash-following-delete-at-last-table.diff
new file mode 100644
index 0000000..a418ac3
--- /dev/null
+++ b/patches/lp-1097829-rhbz-689053-fix-crash-following-delete-at-last-table.diff
@@ -0,0 +1,67 @@
+From fc091c3190c52e41d7f3360d1f85023e038543df Mon Sep 17 00:00:00 2001
+From: Michael Stahl <mstahl@redhat.com>
+Date: Wed, 19 Sep 2012 20:47:48 +0200
+Subject: [PATCH 12/14] rhbz#689053: fix crash following delete at last table
+ cell:
+
+The IsSelOvr() in SwCrsrShell::Combine() detects that the PaM with mark
+in the last table cell and point ouside the table is invalid, but
+unfortunatley restores the wrong position, which does not actually
+correct the PaM; the deletion on the invalid PaM then removes the
+last SwTxtNode in the document, which leads to crash later.
+
+(cherry picked from commit af4b6c94c68b5f67b931cde8d0acda6ec8b288bb)
+
+Conflicts:
+ sw/source/core/crsr/crsrsh.cxx
+
+Change-Id: Ib2ae0b54e6c15dbe5b6811d8696531bf2022e1a4
+Reviewed-on: https://gerrit.libreoffice.org/652
+Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
+Tested-by: Miklos Vajna <vmiklos@suse.cz>
+---
+ sw/source/core/crsr/crsrsh.cxx | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
+index 36fe86d..626557c 100644
+--- a/sw/source/core/crsr/crsrsh.cxx
++++ b/sw/source/core/crsr/crsrsh.cxx
+@@ -1994,26 +1994,27 @@ void SwCrsrShell::Combine()
+ return;
+
+ SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
+- SwCrsrSaveState aSaveState( *pCurCrsr );
++ // rhbz#689053: IsSelOvr must restore the saved stack position, not the
++ // current one, because current point + stack mark may be invalid PaM
++ SwCrsrSaveState aSaveState(*pCrsrStk);
+ if( pCrsrStk->HasMark() ) // nur wenn GetMark gesetzt wurde
+ {
+ bool const bResult =
+ CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, sal_True );
+ OSL_ENSURE(bResult, "StackCrsr & act. Crsr not in same Section.");
+ (void) bResult; // non-debug: unused
+- // kopiere das GetMark
+- if( !pCurCrsr->HasMark() )
+- pCurCrsr->SetMark();
+- *pCurCrsr->GetMark() = *pCrsrStk->GetMark();
+- pCurCrsr->GetMkPos() = pCrsrStk->GetMkPos();
+ }
++ *pCrsrStk->GetPoint() = *pCurCrsr->GetPoint();
++ pCrsrStk->GetPtPos() = pCurCrsr->GetPtPos();
+
+ SwShellCrsr * pTmp = 0;
+ if( pCrsrStk->GetNext() != pCrsrStk )
+ {
+ pTmp = dynamic_cast<SwShellCrsr*>(pCrsrStk->GetNext());
+ }
+- delete pCrsrStk;
++ delete pCurCrsr;
++ pCurCrsr = pCrsrStk;
++ pCrsrStk->MoveTo(0); // remove from ring
+ pCrsrStk = pTmp;
+ if( !pCurCrsr->IsInProtectTable( sal_True ) &&
+ !pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
+--
+1.7.10.4
+
diff --git a/patches/series b/patches/series
index 8b0162b..d33a201 100644
--- a/patches/series
+++ b/patches/series
@@ -53,3 +53,4 @@ lp-1097748-fdo-49819-fdo-54609-Do-not-consider-timestamp-differ.diff
lp-1097760-rhbz-820283-fdo-55462-sw-better-fix-for-DOCX-table-i.diff
lp-1097782-rhbz-890080-crash-in-SwXTextDocument-getRendererCoun.diff
lp-1097811-fdo-53909-STG_FREE-sector-locations-rejecte.diff
+lp-1097829-rhbz-689053-fix-crash-following-delete-at-last-table.diff
--
LibreOffice packaging repository
Reply to: