sw/source/core/unocore/unotext.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit 12ce1c3a06e07f16fefe11fce9ae35c94ef657e7 Author: Miklos Vajna <vmik...@suse.cz> Date: Tue Aug 21 16:15:09 2012 +0200 n#775899 SwXText::convertToTextFrame fix removing fake paragraph In case the textrange contains a single table, the DelFullPara() call to remove the ending fake paragraph failed. When this happens, we now find the paragraph in question manually to delete it. Change-Id: I7055d4489192a8a694aef118f7646d8db87a64df diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index a36cc9c..a8b91c8 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1755,7 +1755,14 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) if (bParaAfterInserted) { xFrameTextCursor->gotoEnd(sal_False); - m_pImpl->m_pDoc->DelFullPara(*pFrameCursor->GetPaM()); + if (!m_pImpl->m_pDoc->DelFullPara(*pFrameCursor->GetPaM())) + { + // 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()); + // Now we have the end of the frame -- the node before that will be the paragraph we want to remove. + aPaM.GetPoint()->nNode--; + m_pImpl->m_pDoc->DelFullPara(aPaM); + } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits