Closed Bug 1097550 Opened 10 years ago Closed 10 years ago

System dictionaries with underscore separator are ignored when trying to find dictionary

Categories

(Core :: Spelling checker, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: jhorak, Assigned: jhorak)

References

Details

Attachments

(1 file, 2 obsolete files)

On some Linux distributions (like Fedora) dictionaries installed system-wide are using underscore as separator instead of dash. This breaks calling nsStyleUtil::DashMatchCompare in nsEditorSpellCheck::SetCurrentDictionary and nsEditorSpellCheck::DictionaryFetched and results in picking the first dictionary from dictionary list as fallback. To fix this we need to replace underscore with dash when calling nsStyleUtil::DashMatchCompare.
Attached patch patch v1 (obsolete) — Splinter Review
Assignee: nobody → jhorak
Attachment #8521260 - Flags: review?(ehsan.akhgari)
Attachment #8521260 - Attachment is patch: true
Attached patch patch v2 (obsolete) — Splinter Review
Attachment #8521260 - Attachment is obsolete: true
Attachment #8521260 - Flags: review?(ehsan.akhgari)
Attachment #8521271 - Flags: review?(ehsan.akhgari)
I imagine this is an alternative fix for the issue in bug 992118 comment 20, right?
Flags: needinfo?(jhorak)
See Also: → 992118
Comment on attachment 8521271 [details] [diff] [review] patch v2 Review of attachment 8521271 [details] [diff] [review]: ----------------------------------------------------------------- ::: editor/composer/nsEditorSpellCheck.cpp @@ +619,5 @@ > langCode.Assign(Substring(aDictionary, 0, dashIdx)); > } else { > langCode.Assign(aDictionary); > } > + if (mPreferredLang.IsEmpty() || Nit: please remove the trailing space!
Attachment #8521271 - Flags: review?(ehsan.akhgari) → review+
(In reply to :Ehsan Akhgari (not reading bugmail, needinfo? me!) from comment #3) > I imagine this is an alternative fix for the issue in bug 992118 comment 20, > right? Yes, exactly.
Flags: needinfo?(jhorak)
Attached patch patch v3Splinter Review
Fixed nits.
Attachment #8531210 - Flags: review+
Attachment #8521271 - Attachment is obsolete: true
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Blocks: 1175908
Blocks: 1176602
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: