diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-03-13 20:05:16 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-03-13 20:08:54 +0100 |
commit | ccd765079ae573d24ded2a07ec434e4e89b619a2 (patch) | |
tree | 55cde4dc5131ca3cf367de12905c19d7c8c4db13 | |
parent | 697af5520444439bc8f843d4a4390297961c6766 (diff) |
SwFEShell::InsertRow: forgot to comment what that -2 does
Change-Id: I1d169939c98b0d155803dd08dd59eabcdfa87354
-rw-r--r-- | sw/source/core/frmedt/fetab.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 593d1f28cce6..bbb7b6cfb335 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -207,8 +207,10 @@ bool SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind ) bool bSelectAll = StartsWithTable() && ExtendedSelectedAll(/*bFootnotes=*/false); if (bSelectAll) { + // Set the end of the selection to the last paragraph of the last cell of the table. SwPaM* pPaM = getShellCrsr(false); SwNode* pNode = pPaM->Start()->nNode.GetNode().FindTableNode()->EndOfSectionNode(); + // pNode is the end node of the table, we want the last node before the end node of the last cell. pPaM->End()->nNode = pNode->GetIndex() - 2; pPaM->End()->nContent.Assign(pPaM->End()->nNode.GetNode().GetCntntNode(), 0); } |