Issue 120048 - Add button in spell check dialog doesn't show custom dictionaries
Summary: Add button in spell check dialog doesn't show custom dictionaries
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: ui (show other issues)
Version: 3.4.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: 3.4.1
Assignee: Ariel Constenla-Haile
QA Contact:
URL: http://user.services.openoffice.org/e...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-20 20:43 UTC by Hagar Delest
Modified: 2012-07-25 09:22 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---
jsc: 3.4.1_release_blocker+


Attachments
Test document (156.94 KB, application/vnd.oasis.opendocument.text)
2012-07-17 14:55 UTC, Ariel Constenla-Haile
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Hagar Delest 2012-06-20 20:43:24 UTC
Create custom dictionaries with a specific language.
In a text, on a misspelled word, right-click, the "Add" button lists the available custom dictionaries (dics set to language>All and with a specific language).
Launch the spell check dialog, click "Add": only the custom dics set to language>All are displayed. No custom dic.
In spell check dialog, the "Add" button should also list custom dictionaries when their language setting matches the text language.
Comment 1 Regina Henschel 2012-06-20 22:46:43 UTC
It had been OK in DEV300m88 and broken in DEV300m92. There are changes from DEV300m88 to DEV300m92 in SpellDialog::InitUserDicts().

The user dictionary is available in context menu.
Comment 2 Hagar Delest 2012-06-22 11:56:20 UTC
For the record, information has been given in the forum that LibO team has fixed this problem.
-> https://bugs.freedesktop.org/show_bug.cgi?id=36678
-> https://bugs.freedesktop.org/show_bug.cgi?id=42372

NB: ok, the user dic is available in context menu but it's still a bad regression when you need to use the spell check dialog (when checking a whole document at once).
Comment 3 Ariel Constenla-Haile 2012-06-22 20:56:04 UTC
Looking at the code in 

svx::SpellDialog::InitUserDicts()
main/cui/source/dialogs/SpellDialog.cxx

reveals that the language in the SvxLanguageBox is LANGUAGE_DONTKNOW (0x03FF) when the PopupMenu is filled. On the other side, SwSpellPopup in sw/source/ui/lingu/olemenu.cxx has the right language (though the code is almost the same).

The issue is that svx::SpellDialog::InitUserDicts() is called on the constructor (actually on void SpellDialog::Init_Impl()), but not every time SpellDialog::UpdateBoxes_Impl() is called, as it should: 

SpellDialog::UpdateBoxes_Impl() gets the current Locale from the SpellErrorDescription and updates the selected language accordingly calling SetSelectedLang_Impl(). Right after this call, the user dictionaries should be updated.

In short, InitUserDicts() is invoked too little, not reflecting the Locale/language change.
Comment 4 Ariel Constenla-Haile 2012-06-24 14:22:42 UTC
Fixed in revision 1353272
Comment 5 jsc 2012-06-29 11:29:23 UTC
set release blocker flag for 3.4.1

fix should be merged in AOO34 branch
Comment 6 Ariel Constenla-Haile 2012-07-05 14:11:04 UTC
(In reply to comment #4)
> Fixed in revision 1353272

Trunk: revision 1353272
Branch AOO34: revision 1357619
Comment 7 Li Feng Wang 2012-07-17 06:17:18 UTC
I have two questions to verify:
1)how to create a custom dictionary?
I download an oxt from http://extensions.openoffice.org/dictionaries, Is it OK?
2)What should I do after the first step? maybe need some configurations.

I got steps to verify:
1)create custom dictionary---intall oxt extension
2)new a text document,enter a misspelled word
3)right click the misspelled word, and click "Add" on context menu. To check whether the user dic is available in context menu.
4)Pop up Spell check dialog, click "Add" button to check whether the user dic is available.
Comment 8 Li Feng Wang 2012-07-17 06:37:52 UTC
Please igone my above comment, I got steps on https://bugs.freedesktop.org/show_bug.cgi?id=36678
Comment 9 Li Feng Wang 2012-07-17 07:01:48 UTC
I follow steps in LibO Bug 36678, bug there is no spell check on Germany. 

Sometimes only standard.dic and add_all.dic in context menu of "Add". same problem in spell check dialog.

Verify version: AOO3.4.1 branch r1359641 on Windows XP
Comment 10 Ariel Constenla-Haile 2012-07-17 13:22:12 UTC
(In reply to comment #9)
> I follow steps in LibO Bug 36678, bug there is no spell check on Germany. 
> 
> Sometimes only standard.dic and add_all.dic in context menu of "Add". same
> problem in spell check dialog.

You need to install a dictionary extension for the respective language, otherwise spell checking for that language won't be triggered, despite that there might be a user dict for that language.
I guess you don't have German (Germany) installed.
Comment 11 Ariel Constenla-Haile 2012-07-17 14:55:31 UTC
Created attachment 78667 [details]
Test document

Text document with instructions and sample text to verify the bug
Comment 12 Li Feng Wang 2012-07-18 05:18:20 UTC
(In reply to comment #11)
> Created attachment 78667 [details]
Test document

Text document with
> instructions and sample text to verify the bug


Thank you Ariel Constenla-Haile's detail steps.

I already verify it on Mac, Windows, Redhat with AOO341 branch r1359641.

There are Germany/France/Spanish custom dictionaries in Add checklist of context menu and spell check dialog, Bug just on Mac it is OK, I encounter defect like Bug 119100, So after spell check on Windows and Redhat is ok, I will re-verify it.
Comment 13 Li Feng Wang 2012-07-18 05:44:12 UTC
Verified pass on Windows and Mac with AOO341 branch r1359641.

note:
1)May need clean App Data like "C:\Documents and Settings\Administrator\Application Data\OpenOffice.org\3\user"
2)Need close all AOO files and restart AOO after install Germany dictionary extenion and configure Germany custom dictionary.
  This can trigger some operations about extension in restart.
Comment 14 Li Feng Wang 2012-07-18 09:12:11 UTC
Verified pass on Windows and Mac with AOO trunk r1362376
Comment 15 jsc 2012-07-25 09:22:59 UTC
set target milestone AOO 3.4.1