[Libreoffice-commits] .: sw/source
Noel Power
noelp at kemper.freedesktop.org
Mon Feb 7 04:13:25 PST 2011
sw/source/core/unocore/unotext.cxx | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 7c85cd305fcfaa4d714d5d83a7a1f22000a57a8f
Author: Noel Power <noel.power at novell.com>
Date: Mon Feb 7 12:02:12 2011 +0000
fix for bnc#655763
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index cf1729a..78952cf 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 );
More information about the Libreoffice-commits
mailing list