Description: Open a new Writer document. Write a correct sentence in the language from the status bar. Tools - Spelling. In the dbg build of LibreOffice I get in terminal this warning: warn:legacy.osl:370006:370006:sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx:427: ApplyChangedSentence in initial call or after resume Steps to Reproduce: see description Actual Results: warning Expected Results: no warning Reproducible: Always User Profile Reset: Yes Additional Info: Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: b9e3e20bfd102880d12384892eaeca094c38a519 CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded
Reproduced in: Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 5cd3a8ec6d36a389eb0be4d59f4570e3bda92dc5 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded
The same with version Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 0e17d8ddccdee7d4f46b256153853e1cab87c99e CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded warn:legacy.osl:72270:72270:sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx:427: ApplyChangedSentence in initial call or after resume
warn:legacy.osl:136060:136060:sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx:425: ApplyChangedSentence in initial call or after resume The same in Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: 6d39b1a6068bbbd5ca4947f668f989dbfb73342d CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded
warn:legacy.osl:5685:5685:sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx:425: ApplyChangedSentence in initial call or after resume Retested with Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: a3b0ef4088183c4a3b2ec3fef08ef91314eaef54 CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded
Retested with Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 742dbb088b44783c3a4f0fd120b11be3a74fd483 CPU threads: 16; OS: Linux 6.11; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded warn:legacy.osl:5988:5988:sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx:425: ApplyChangedSentence in initial call or after resume
warn:legacy.osl:31539:31539:sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx:425: ApplyChangedSentence in initial call or after resume retested with Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 8ffeca7af4302da21d33494342017c3737d540e1 CPU threads: 16; OS: Linux 6.14; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
That has been there since the file was introduced. commit 66c724a878a15a8d5cf4d084c6e3feaba280ecee Author: Rüdiger Timm on Fri Sep 17 13:01:49 2004 +0000 INTEGRATION: CWS os19 (1.1.2); FILE ADDED It is being called by SpellDialog::GetNextSentence_Impl rParent.ApplyChangedSentence(m_xSentenceED->CreateSpellPortions(), ... Since svx::SpellPortions CreateSpellPortions() const; that should mean that there are no side implications (no changes/modifications to m_xSEntenceED) right? So in theory then we could just avoid this call without causing any bad side effects. I don't see any const_cast's here either, so it really should be a constant, non-modifying, OPTIONAL event. ApplyChangedSentence returns immediately if m_bInitialCall, so it is OPTIONAL as well. Heh - but everything I've concluded so far is irrelevant. GetNextSentence_Impl doesn't know it is in Initialize, so there is no flag to say the call to ApplyChangedSentence is not necessary.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/6af028a2973d7a729293a09a92c7b1bd1bf4eadb tdf#152817 SwSpellDialogChildWindow: remove irritating OSL_ENSURE It will be available in 26.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.