You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ch...@apache.org on 2012/06/21 03:13:37 UTC
svn commit: r1352384 -
/incubator/ooo/trunk/main/sw/source/core/edit/eddel.cxx
Author: chengjh
Date: Thu Jun 21 01:13:36 2012
New Revision: 1352384
URL: http://svn.apache.org/viewvc?rev=1352384&view=rev
Log:
Fix issue #i119652: When press "Ctrl+Shift+Backspace" in table cell "A1" ,Undo,crash
* sw/source/core/edit/eddel.cxx
range invalid
Patch by: Lin Yuan,<yu...@gmail.com>
Found by: Yan Ji,<ya...@gmail.com>
Review by: Jian Hong Cheng,<ch...@apache.org>
Modified:
incubator/ooo/trunk/main/sw/source/core/edit/eddel.cxx
Modified: incubator/ooo/trunk/main/sw/source/core/edit/eddel.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/core/edit/eddel.cxx?rev=1352384&r1=1352383&r2=1352384&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/core/edit/eddel.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/core/edit/eddel.cxx Thu Jun 21 01:13:36 2012
@@ -57,7 +57,10 @@ void SwEditShell::DeleteSel( SwPaM& rPam
// 1. Point und Mark stehen in einer Box, Selection normal loeschen
// 2. Point und Mark stehen in unterschiedlichen Boxen, alle
// selektierten Boxen suchen in den Inhalt loeschen
- if( rPam.GetNode()->FindTableNode() &&
+
+ //Comment:If the point is outside of a table and the mark point is in the a table cell,
+ // should go throw the following code
+ if( (rPam.GetNode()->FindTableNode() || rPam.GetNode(sal_False)->FindTableNode()) &&
rPam.GetNode()->StartOfSectionNode() !=
rPam.GetNode(sal_False)->StartOfSectionNode() )
{
@@ -72,7 +75,11 @@ void SwEditShell::DeleteSel( SwPaM& rPam
do {
aDelPam.SetMark();
SwNode* pNd = aDelPam.GetNode();
- const SwNode& rEndNd = *pNd->EndOfSectionNode();
+ //Comment:If the point is outside of table, select the table start node as the end node of current selection node
+ const SwNode& rEndNd = !rPam.GetNode()->FindTableNode() && !pNd->FindTableNode()?
+ *(SwNode*)(rPam.GetNode(sal_False)->FindTableNode())
+ :
+ *pNd->EndOfSectionNode();
if( pEndSelPos->nNode.GetIndex() <= rEndNd.GetIndex() )
{
*aDelPam.GetPoint() = *pEndSelPos;