summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode/ndtxt.cxx
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-09-21 17:07:30 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-10-01 10:37:48 +0200
commit1e79f6f01a8afc55a455b0c52fd5cf2b766e1e08 (patch)
treee77201e768ebc612a733525b817e34c541dcbc16 /sw/source/core/txtnode/ndtxt.cxx
parent831b9594a2b91a6cb79624ccd28cdb6056165259 (diff)
sw_redlinehide_2: more footnote assert problems
If there are multiple footnotes in a node, the notifications that happen during Cut require that the text is still in the source node. 4 sw::MapModelToView(sw::MergedPara const&, SwTextNode const*, int) (rMerged=..., pNode=0x5975180, nIndex=5) at sw/source/core/text/txtfrm.cxx:1020 5 SwTextFrame::MapModelToView(SwTextNode const*, int) const (this=0x5a7b5f0, pNode=0x5975180, nIndex=5) at sw/source/core/text/txtfrm.cxx:1061 6 SwTextFrame::SwClientNotify(SwModify const&, SfxHint const&) (this=0x5a7b5f0, rModify=..., rHint=...) at sw/source/core/text/txtfrm.cxx:2092 ... 14 SwContentNode::ModifyNotification(SfxPoolItem const*, SfxPoolItem const*) (this=0x5975180, pOld=0x0, pNew=0x59b7300) at sw/inc/node.hxx:477 15 SwTextFootnote::SetNumber(unsigned short, rtl::OUString const&) (this=0x5967a90, nNewNum=2, sNumStr="") at sw/source/core/txtnode/atrftn.cxx:341 16 SwFootnoteIdxs::UpdateFootnote(SwNodeIndex const&) (this=0x58d3070, rStt=SwNodeIndex (node 29)) at sw/source/core/doc/ftnidx.cxx:154 17 SwTextNode::InsertHint(SwTextAttr*, SetAttrMode) (this=0x77f63e0, pAttr=0x59b6bd0, nMode=(SetAttrMode::DONTREPLACE | SetAttrMode::NOTXTATRCHR)) at sw/source/core/txtnode/thints.cxx:1461 18 SwTextNode::CutImpl(SwTextNode*, SwIndex const&, SwIndex const&, int, bool) (this=0x5975180, pDest=0x77f63e0, rDestStart=SwIndex (offset 0), rStart=SwIndex (offset 0), nLen=3, bUpdate=false) at sw/source/core/txtnode/ndtxt.cxx:2594 Change-Id: Id9863fa455207c6fab97f9561c6c390c15dd2ea6 Reviewed-on: https://gerrit.libreoffice.org/60933 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sw/source/core/txtnode/ndtxt.cxx')
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 514efdfc1c84..e0e6d4223840 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -2442,7 +2442,7 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
}
pDest->m_Text = pDest->m_Text.replaceAt(nDestStart, 0,
m_Text.copy(nTextStartIdx, nLen));
- m_Text = m_Text.replaceAt(nTextStartIdx, nLen, "");
+ OUString const newText = m_Text.replaceAt(nTextStartIdx, nLen, "");
nLen = pDest->m_Text.getLength() - nInitSize; // update w/ current size!
if (!nLen) // String didn't grow?
return;
@@ -2659,6 +2659,9 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
Update( rStart, nLen, true, true );
}
+ // set after moving hints
+ m_Text = newText;
+
if (bMergePortionsNeeded)
{
m_pSwpHints->MergePortions(*this);