[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    koffice/kpresenter
From:       Mashrab Kuvatov <kmashrab () sat ! physik ! uni-bremen ! de>
Date:       2005-04-25 17:22:15
Message-ID: 20050425172215.AC3F3488 () office ! kde ! org
[Download RAW message or body]

CVS commit by kuvatov: 

Fix a crash while spellchecking. Do not delete spellchecker dialog
inside of clearSpellChecker, use m_spell.kospell->textDocument()
instead of textobj->textDocument() in spellCheckerDone. OK'd by David
Faure.
CCMAIL:koffice-devel@kde.org


  M +4 -6      kpresenter_view.cc   1.1112


--- koffice/kpresenter/kpresenter_view.cc  #1.1111:1.1112
@@ -4565,4 +4565,5 @@ void KPresenterView::startKSpell()
 
     delete m_spell.dlg;
+    m_spell.dlg = 0L;
     m_spell.dlg = new KSpell2::Dialog( m_spell.kospell, this );
     m_spell.dlg->activeAutoCorrect( true );
@@ -4624,6 +4625,4 @@ void KPresenterView::clearSpellChecker(b
     m_initSwitchPage = -1;
     m_switchPage = -1;
-    delete m_spell.dlg;
-    m_spell.dlg = 0L;
 
     if ( m_spell.macroCmdSpellCheck )
@@ -4696,8 +4695,7 @@ void KPresenterView::spellCheckerDone( c
 {
 #ifdef HAVE_LIBKSPELL2
-    //kdDebug(32001) << "KWView::spellCheckerDone" << endl;
-    KoTextObject* textobj = m_spell.kospell->currentTextObject();
-    Q_ASSERT( textobj );
-    KPrTextDocument *textdoc=static_cast<KPrTextDocument *>( textobj->textDocument() );
+    /* See also KWView::spellCheckerDone from KWord */
+    kdDebug() << "KPresenterView::spellCheckerDone" << endl;
+    KPrTextDocument *textdoc=static_cast<KPrTextDocument *>( m_spell.kospell->textDocument() );
     Q_ASSERT( textdoc );
     if ( textdoc )


_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic