diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-08-21 17:58:24 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-09-28 14:30:38 +0200 |
commit | 453821351238d81f7707c4e205a6ed82f884eca5 (patch) | |
tree | b67e5634177a0e8a30a27ad79df0b3db8bfd519f /sw | |
parent | ca7b41e7e0d11768957f2211656f93ba4a6f75fc (diff) |
n#775899 SwXText::convertToTextFrame fix for multi-paragraph tables
The problem was that when we only had a table inside the frame, the
DelFullPara() call removed the last paragraph of the first cell, and
returned no error. Instead, check if we had to remove paragraphs both
before and after, and if so, use the manual remove all the time.
Change-Id: I9a3591ce9a92a2aca7d2f65b62fdf641f54e4f05
(cherry picked from commit fd99896fcd4826e5326fe01dd28f168cf1844fd4)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unotext.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 1366db163565..ea5e83b46096 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1753,7 +1753,9 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) if (bParaAfterInserted) { xFrameTextCursor->gotoEnd(sal_False); - if (!m_pImpl->m_pDoc->DelFullPara(*pFrameCursor->GetPaM())) + if (!bParaBeforeInserted) + m_pImpl->m_pDoc->DelFullPara(*pFrameCursor->GetPaM()); + else { // In case the frame has a table only, the cursor points to the end of the first cell of the table. SwPaM aPaM(*pFrameCursor->GetPaM()->GetNode()->FindSttNodeByType(SwFlyStartNode)->EndOfSectionNode()); |