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 | 8ab96261731432608bbcf733775a4fc84afa75e5 (patch) | |
tree | eeec54a98deecb420e00351f2499cf5ed3815abd | |
parent | 5632452090c2cf97e1700abb41684ceab4d04839 (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>
-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 4c33dcec36..05c50fdde8 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 ); |