summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-04-14 18:06:08 +0200
committerJulien Nabet <serval2412@yahoo.fr>2012-04-14 18:06:08 +0200
commit95cc5de63b20c5986fe8f3913da86002eabd7cb1 (patch)
tree523c1c5076b0ce2beb45c674fc4744a031bd1e0a
parent1ba0ab72d12f3713f7b2b817e6f783bcb83f36a3 (diff)
Resolves: fdo#48683 nice crash when hitting DEL
-rw-r--r--editeng/source/editeng/impedit3.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 0d6877b99088..5ea5d718b4b3 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2436,7 +2436,6 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
// Remove portion;
sal_uInt8 nType = pTP->GetKind();
pParaPortion->GetTextPortions().Remove( nPortion );
- delete pTP;
if ( nType == PORTIONKIND_LINEBREAK )
{
TextPortion* pNext = pParaPortion->GetTextPortions()[ nPortion ];
@@ -2444,7 +2443,6 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
{
// Remove dummy portion
pParaPortion->GetTextPortions().Remove( nPortion );
- delete pNext;
}
}
}
@@ -2462,7 +2460,6 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
{
// Discard portion; if possible, correct the ones before,
// if the Hyphenator portion has swallowed one character...
- pParaPortion->GetTextPortions().Remove( nLastPortion );
if ( nLastPortion && pTP->GetLen() )
{
TextPortion* pPrev = pParaPortion->GetTextPortions()[nLastPortion - 1];
@@ -2470,7 +2467,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
pPrev->SetLen( pPrev->GetLen() + pTP->GetLen() );
pPrev->GetSize().Width() = (-1);
}
- delete pTP;
+ pParaPortion->GetTextPortions().Remove( nLastPortion );
}
}
#if OSL_DEBUG_LEVEL > 2