[Libreoffice-commits] .: editeng/source

Julien Nabet serval2412 at kemper.freedesktop.org
Sat Apr 14 09:08:13 PDT 2012


 editeng/source/editeng/impedit3.cxx |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 95cc5de63b20c5986fe8f3913da86002eabd7cb1
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Apr 14 18:06:08 2012 +0200

    Resolves: fdo#48683 nice crash when hitting DEL

diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 0d6877b..5ea5d71 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


More information about the Libreoffice-commits mailing list