From fd99896fcd4826e5326fe01dd28f168cf1844fd4 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 21 Aug 2012 17:58:24 +0200 Subject: 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 --- sw/source/core/unocore/unotext.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sw') 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()); -- cgit