diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-08-21 17:58:24 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-08-21 18:02:01 +0200 |
commit | fd99896fcd4826e5326fe01dd28f168cf1844fd4 (patch) | |
tree | b26dc9ab265244afd98881df2de9fe2b003d8841 /sw | |
parent | edc4861a68e0269b83b17e0ec57912a1ce4220ad (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
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 a8b91c8a7ae2..8872b00d310c 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1755,7 +1755,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()); |