diff options
author | Noel Power <noel.power@novell.com> | 2011-02-07 12:02:12 +0000 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2011-02-07 15:49:24 +0000 |
commit | 9ff42ec6fcbf4d6392104303d6437d9ef5d3d8d0 (patch) | |
tree | b57c71a2701c82f6755dea43a31185940a7b0210 /sw | |
parent | f0171370526a27e32d96af2fca0ff58d3c5c57d0 (diff) |
fix for bnc#655763
cherry picked from 7c85cd305fcfaa4d714d5d83a7a1f22000a57a8f
reviewed in bug https://bugzilla.novell.com/show_bug.cgi?id=655763#c6
Signed-off-by: Cedric Bosdonnat <cbosdonnat@novell.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unotext.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 408372ff72f3..856480fdbd3f 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1654,11 +1654,20 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) SfxItemSet aFrameItemSet(m_pImpl->m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1, 0 ); - + // If there is no content in the frame the shape is in + // it gets deleted in the DelFullPara call below, + // In this case insert a tmp text node ( we delete it later ) + if ( aStartPam.Start()->nNode == pEndPam->Start()->nNode + && aStartPam.End()->nNode == pEndPam->End()->nNode ) + { + SwPosition aEnd(*aStartPam.End()); + bParaAfterInserted = GetDoc()->AppendTxtNode( aEnd ); + pEndPam->DeleteMark(); + *pEndPam->GetPoint() = aEnd; + } aStartPam.SetMark(); *aStartPam.End() = *pEndPam->End(); pEndPam.reset(0); - SwXTextFrame *const pNewFrame = new SwXTextFrame(m_pImpl->m_pDoc); const uno::Reference< text::XTextFrame > xNewFrame = pNewFrame; pNewFrame->SetSelection( aStartPam ); |