Kaydet (Commit) a413f18e authored tarafından Michael Stahl's avatar Michael Stahl

SwTxtNode::CutImpl: check for max text limit

Unfortunately i don't see an easy way to handle the problem, let's hope
it doesn't happen in practice.

Change-Id: I86e58c241fda6d07d83fb383421f0a5a810b581a
üst 8d25fde6
...@@ -1984,6 +1984,11 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart, ...@@ -1984,6 +1984,11 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
pDest->m_Text = pDest->m_Text.replaceAt(nDestStart, 0, pDest->m_Text = pDest->m_Text.replaceAt(nDestStart, 0,
m_Text.copy(nTxtStartIdx, nLen)); m_Text.copy(nTxtStartIdx, nLen));
m_Text = m_Text.replaceAt(nTxtStartIdx, nLen, ""); m_Text = m_Text.replaceAt(nTxtStartIdx, nLen, "");
if (m_Text.getLength() > TXTNODE_MAX)
{ // FIXME: could only happen when called from SwRedline::Show.
// unfortunately can't really do anything here to handle that...
abort();
}
nLen = pDest->m_Text.getLength() - nInitSize; // update w/ current size! nLen = pDest->m_Text.getLength() - nInitSize; // update w/ current size!
if( !nLen ) // String nicht gewachsen ?? if( !nLen ) // String nicht gewachsen ??
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment