[Libreoffice-commits] .: Branch 'libreoffice-3-3' - sw/source
Noel Power
noelp at kemper.freedesktop.org
Mon Feb 7 07:52:26 PST 2011
sw/source/core/unocore/unotext.cxx | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 8ab96261731432608bbcf733775a4fc84afa75e5
Author: Noel Power <noel.power at novell.com>
Date: Mon Feb 7 12:02:12 2011 +0000
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 at novell.com>
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 4c33dce..05c50fd 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