Bug 117020 - EDITING Spellchecker should not be recovered together with the file
Summary: EDITING Spellchecker should not be recovered together with the file
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low enhancement
Assignee: Justin L
URL:
Whiteboard: target:26.2.0
Keywords:
Depends on:
Blocks: Spell-Checking Document-Recovery
  Show dependency treegraph
 
Reported: 2018-04-15 12:23 UTC by Emil Tanev
Modified: 2025-10-01 12:08 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
large Excel file (9.29 MB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-04-15 12:23 UTC, Emil Tanev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emil Tanev 2018-04-15 12:23:49 UTC
Created attachment 141380 [details]
large Excel file

Open the attached file in Calc
Click Spellchecker from the toolbar
Spellchecker and Calc hang
Force quit Calc from Task manager
Open the file again - choose Recover
Issue: Upon Recover, the Spellchecker is active again, so Calc hangs again.

Spellchecker should not be auto-resumed upon recover, because large files may not be recovered if it keeps making Calc hang.
https://screencast-o-matic.com/watch/cFfolDDWn7

Version: 6.1.0.0.alpha0+ (x64)
Build ID: d39a8e791618a40328c0f90bece3cc246dcf57f7
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-04-06_00:59:07
Locale: en-US (en_US); Calc: group
Comment 1 m_a_riosv 2018-04-15 14:19:05 UTC
I can't reproduce the hang. What should be the language?, have you tried Restart in Safe Mode.
Comment 2 Emil Tanev 2018-04-21 07:01:36 UTC
The language is English, and yes, the hang happens in Safe mode as well. 
The bug is that after recovery of the document, Spellchecker is recovered as well and starts spell checking again. Not the actual hang. So, you can reproduce the Spellchecker recovery without the hang, by force quitting an empty Calc document and recovering it. Then compare the same behavior with Writer - Spellchecker does start automatically. At the very least, we want to be consistent across the products.
Comment 3 m_a_riosv 2018-04-21 12:00:19 UTC
I can't reproduce the hang with:
Version: 6.1.0.0.alpha0+
Build ID: c8c74a0b4ca6f3a3619f423b6548c80c52392ae0
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-04-14_22:59:27
Locale: en-US (es_ES); Calc: group

Forcing the quit to get a recovery, the Spellcheck has the same status as before.
Comment 4 Emil Tanev 2018-04-22 09:50:28 UTC
Spellchecker should not start automatically with recovery. This behavior is not consistent with Writer.
Comment 5 Emil Tanev 2018-04-22 10:18:10 UTC
Reproduced with the hang in this builds as well

Version: 6.0.5.0.0+
Build ID: e58dc868a6ac0df24adf88f32f90a9e4fc6fdae9
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86@42, Branch:libreoffice-6-0, Time: 2018-04-19_23:05:52
Locale: en-US (en_US); Calc: group
Comment 6 Buovjaga 2018-04-23 12:20:52 UTC
I reproduce the spellchecker appearing upon recovery.

Version: 6.1.0.0.alpha0+
Build ID: 104b26b246c94c8c66864b20d00e419d96b15961
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2018-04-16_08:30:15
Locale: fi-FI (fi_FI); Calc: group
Comment 7 Justin L 2023-08-10 11:48:30 UTC
surprising - but confirmed with 24.2. The spell checker dialog actually does appear when recovering (in my case from a SessionSave). (I had the spell checker running when I initiated the session save.)
Comment 8 Justin L 2025-09-27 23:59:31 UTC
repro with Linux in 26.2+
Comment 9 Justin L 2025-09-30 14:57:56 UTC
Inherited from OOo. 

I simply opened a calc document, pressed F7 to get the spellcheck dialog running, and then did a command-line Ctrl-C to kill my bibisect-releases soffice. On restart there was the spellcheck...
Comment 10 Justin L 2025-10-01 00:51:21 UTC
OK - this can be seen by going to Tools - Options - LibreOffice - Advanced - Expert configuration  and searching for "scalc/10243" (which is SID_SPELL_DIALOG). 

Mine has the value "V2,V,0" for version 2, Visible, SfxChildWindowFlags::NONE

This is being read in with sfx2/source/appl/childwin.cxx's SfxChildWindow::InitializeChildWinFactory_Impl.

The only spot with qualifications for whether to save or not is SfxWorkWindow::SaveStatus_Impl which checks IsDockingAllowed...

Well, look at this...
SfxChildWinInfo SwSpellDialogChildWindow::GetInfo() const
{
    SfxChildWinInfo aInfo = svx::SpellDialogChildWindow::GetInfo();
    aInfo.bVisible = false;
    return aInfo;
}
from commit 999bb4cd6a6c67c622889b0344918a7664c86cf3
  Author: Rüdiger Timm on Tue Oct 18 12:50:07 2005 +0000
  2005/05/11 10:33:43 os 1.3.172.1: #i48417# ::GetInfo(): set bVisible to FALSE to prevent unwanted opening
Comment 11 Commit Notification 2025-10-01 11:21:41 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8e60550fb69f154aecf43fc621b70d9b5d50b285

tdf#117020 sc sd: don't restart SpellDialog on application start

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.
Comment 12 Justin L 2025-10-01 12:08:48 UTC
An alternative would be to force writing an H for nId == SID_SPELL_DIALOG in SfxChildWindow::InitializeChildWinFactory_Impl

or 

skip writing at all for pChild->GetType() == SID_SPELL_DIALOG in SfxWorkWindow::SaveStatus_Impl