https://bugs.freedesktop.org/show_bug.cgi?id=57646
Julien Nabet <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #8 from Julien Nabet <[email protected]> --- Noticing LoadWrdSttExceptList (http://opengrok.libreoffice.org/xref/core/cui/source/tabpages/autocdlg.cxx#1483) after having fixed fdo#87581, I tried to unwind to find at which moment a word is added: 1) SvxAutoCorrectLanguageLists::AddToWrdSttExceptList http://opengrok.libreoffice.org/xref/core/editeng/source/misc/svxacorr.cxx#2205 2) SvxAutoCorrect::AddWrtSttException http://opengrok.libreoffice.org/xref/core/editeng/source/misc/svxacorr.cxx#1482 3) SwAutoCorrExceptWord::CheckChar http://opengrok.libreoffice.org/xref/core/sw/source/core/edit/acorrect.cxx#431 4) http://opengrok.libreoffice.org/search?q=CheckChar&project=core&defs=&refs=&path=&hist= giving 2 ways, I put in each of them and found this one was called: SwUndoOverwrite::UndoImpl http://opengrok.libreoffice.org/xref/core/sw/source/core/undo/unovwr.cxx#174 Then I noticed with gdb that we don't enter in "if( pACEWord )" block: 186 SwAutoCorrExceptWord* pACEWord = pDoc->GetAutoCorrExceptWord(); 187 if( pACEWord ) 188 { 189 if( 1 == aInsStr.getLength() && 1 == aDelStr.getLength() ) 190 pACEWord->CheckChar( *pAktPam->GetPoint(), aDelStr[0] ); 191 pDoc->SetAutoCorrExceptWord( 0 ); 192 } A quick search in GetAutoCorrExceptWord indicates that it returns mpACEWord This one can be set or deleted in docedt.cxx In gdb, I could see that it's been set just after having typed space (after having typed a word like "IJfs") but it's deleted right after because of this part: Breakpoint 5, SwDoc::DeleteAutoCorrExceptWord (this=0x55769f0) at /home/julien/compile-libreoffice/libo_4_4/sw/source/core/doc/docedt.cxx:797 797 delete mpACEWord; (gdb) bt #0 SwDoc::DeleteAutoCorrExceptWord (this=0x55769f0) at /home/julien/compile-libreoffice/libo_4_4/sw/source/core/doc/docedt.cxx:797 #1 0x00002aaaccbb77e4 in sw::DocumentStateManager::SetModified (this=0x5581510) at /home/julien/compile-libreoffice/libo_4_4/sw/source/core/doc/DocumentStateManager.cxx:58 #2 0x00002aaaccbb5213 in sw::DocumentStatisticsManager::DocInfoChgd (this=0x557f6a0) at /home/julien/compile-libreoffice/libo_4_4/sw/source/core/doc/DocumentStatisticsManager.cxx:87 #3 0x00002aaacd417b69 in SwDocShell::DoFlushDocInfo (this=0x56d7870) at /home/julien/compile-libreoffice/libo_4_4/sw/source/uibase/app/docsh2.cxx:207 #4 0x00002aaaaec191e6 in SfxObjectShell::FlushDocInfo (this=0x56d7870) at /home/julien/compile-libreoffice/libo_4_4/sfx2/source/doc/objmisc.cxx:218 #5 0x00002aaaaec68bcf in SfxDocInfoListener_Impl::modified (this=0x39a88a0) at /home/julien/compile-libreoffice/libo_4_4/sfx2/source/doc/sfxbasemodel.cxx:170 #6 0x00002aaaaebb1863 in cppu::OInterfaceContainerHelper::NotifySingleListener<com::sun::star::util::XModifyListener, com::sun::star::lang::EventObject>::operator() ( this=0x7fffffff38f0, listener=uno::Reference to (SfxDocInfoListener_Impl *) 0x39a88c8) at /home/julien/compile-libreoffice/libo_4_4/include/cppuhelper/interfacecontainer.h:265 #7 0x00002aaaaebad1ca in cppu::OInterfaceContainerHelper::forEach<com::sun::star::util::XModifyListener, cppu::OInterfaceContainerHelper::NotifySingleListener<com::sun::star::util::XModifyListener, com::sun::star::lang::EventObject> > (this=0x39a83b0, func=...) at /home/julien/compile-libreoffice/libo_4_4/include/cppuhelper/interfacecontainer.h:279 #8 0x00002aaaaeba9396 in cppu::OInterfaceContainerHelper::notifyEach<com::sun::star::util::XModifyListener, com::sun::star::lang::EventObject> (this=0x39a83b0, NotificationMethod=&virtual com::sun::star::util::XModifyListener::modified(com::sun::star::lang::EventObject const&), Event=...) at /home/julien/compile-libreoffice/libo_4_4/include/cppuhelper/interfacecontainer.h:292 #9 0x00002aaaaeba1bf5 in (anonymous namespace)::SfxDocumentMetaData::setModified (this=0x39a8320, bModified=1 '\001') at /home/julien/compile-libreoffice/libo_4_4/sfx2/source/doc/SfxDocumentMetaData.cxx:2201 #10 0x00002aaaaeb9e57a in (anonymous namespace)::SfxDocumentMetaData::setDocumentStatistics (this=0x39a8320, the_value=uno::Sequence of length 8 = {...}) at /home/julien/compile-libreoffice/libo_4_4/sfx2/source/doc/SfxDocumentMetaData.cxx:1777 #11 0x00002aaaccbb5b1c in sw::DocumentStatisticsManager::IncrementalDocStatCalculate (this=0x557f6a0, nChars=5000, bFields=false) at /home/julien/compile-libreoffice/libo_4_4/sw/source/core/doc/DocumentStatisticsManager.cxx:212 #12 0x00002aaaccbb5365 in sw::DocumentStatisticsManager::UpdateDocStat (this=0x557f6a0, bCompleteAsync=true, bFields=false) at /home/julien/compile-libreoffice/libo_4_4/sw/source/core/doc/DocumentStatisticsManager.cxx:124 #13 0x00002aaaccbb527f in sw::DocumentStatisticsManager::GetUpdatedDocStat (this=0x557f6a0, bCompleteAsync=true, bFields=false) at /home/julien/compile-libreoffice/libo_4_4/sw/source/core/doc/DocumentStatisticsManager.cxx:104 Commenting the if block line 56 in DocumentStateManager::SetModified 56 if( m_rDoc.GetAutoCorrExceptWord() && !m_rDoc.GetAutoCorrExceptWord()->IsDeleted() ) 57 m_rDoc.DeleteAutoCorrExceptWord(); see http://opengrok.libreoffice.org/xref/core/sw/source/core/doc/DocumentStateManager.cxx#41 allows to retrieve mpACEWord and so to add the word in exception list Now I'm a bit stuck since I don't know if the condition is wrong or if "m_rDoc.GetAutoCorrExceptWord()->IsDeleted()" should be true and that would mean that bDeleted isn't set to true somewhere. Michael: any thoughts? (Really sorry for this long comment, I just wanted to put the whole investigation) -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
