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
This commit is contained in:
Miklos Vajna
2012-08-21 17:58:24 +02:00
parent edc4861a68
commit fd99896fcd

View File

@@ -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());