Bug 40778 - Remove dictionary choice when adding new entry to the spellchecker
Summary: Remove dictionary choice when adding new entry to the spellchecker
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:3.6.0
Keywords: needsDevEval
Depends on:
Blocks:
 
Reported: 2011-09-11 04:30 UTC by Timothy Arceri
Modified: 2015-12-18 10:19 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Patch to have the add-to-dictionary-button add the word to the dictionary without the pupop when only 1 active dictionary. (2.92 KB, patch)
2012-04-09 07:16 UTC, Rob Snelders
Details
The fix for this bug (3.32 KB, patch)
2012-04-14 04:19 UTC, Rob Snelders
Details
how about this (5.98 KB, patch)
2012-05-02 11:03 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Arceri 2011-09-11 04:30:28 UTC
When adding add a word to my dictionary and i have just one, there is a submenu that asks for what dictionary i want to use.

When there is only one dictionary the add button shouldn't have the dropdown list, it should just be a plain add button.
Comment 1 Rob Snelders 2012-04-09 07:16:36 UTC
Created attachment 59679 [details]
Patch to have the add-to-dictionary-button add the word to the dictionary without the pupop when only 1 active dictionary.

I have created a patch to enable this.

The problem however is that the dropdown-arrow at the button justs adds the word to the dictionary. It won't dropdown the list. I think to change that wouldn't be a easyhack as you´ll need to change the menubutton-item.
Comment 2 Rob Snelders 2012-04-14 04:19:34 UTC
Created attachment 59964 [details]
The fix for this bug
Comment 3 Not Assigned 2012-04-17 03:21:58 UTC
Rob Snelders committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=808be9732e409789f9d26c13c15bbd899c408cd0

fdo#40778 Remove dictionary choice when adding new entry to the spellchecker
Comment 4 Rob Snelders 2012-04-24 16:01:54 UTC
With the supplied patch the option is removed in the spell-checker dialog. But when using the Right-Mouse-Button on a misspelled word then it doesn't work yet. I'm working on getting this solved.
Comment 5 Rob Snelders 2012-04-25 15:33:34 UTC
found 2 places where a popup is created with spelling:
- /core/sw/source/ui/lingu/olmenu.cxx
- /core/editeng/source/editeng/editview.cxx

Looking at changing them both
Comment 6 Caolán McNamara 2012-05-02 08:40:08 UTC
so, for the spell dialog, if we click and hold down we get the drop down list and can select any dictionary, but if we just click it gets added to the default dictionary ?

Would it be better to instead change the "Add" drop down button to a simple "Add" button if there is only one dictionary installed, and leave it as a drop down button where you have to always select the right dictionary when there is more than one dictionary installed, and not have the tricky "hold" behaviour.

I can have a shot at the above
Comment 7 Rob Snelders 2012-05-02 08:51:48 UTC
I don't think it is good to remove the dictionary-name completely. So the button should still give a option to give the name of the dictionary to add it to. So please keep that option. Maybe it would be better to have more people give their opion what needs to be done.
Comment 8 Caolán McNamara 2012-05-02 11:03:07 UTC
Created attachment 60917 [details]
how about this

how about this, makes it a pushbutton if only one dictionary, and a multibutton if there's more than one
Comment 9 Timothy Arceri 2012-05-06 19:09:27 UTC
I agree with Caolán's first comment there is no need to be showing the dictionary name if there is only one, what value does this add?
Comment 10 Rob Snelders 2012-05-16 13:35:48 UTC
You can find your dictionaries in the options-tab. But how do I find which one is used in the language you are checking. If you want to find the correct dictionary to backup then you need to find them.
But the spel-dialog isn't the correct way to find it. So this is indeed the better option. Have you already pushed it to the master?
Comment 11 Not Assigned 2012-05-17 06:19:22 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fdec471a7caca3b5065676e3f31aeaa91b0f238f

Related: fdo#40778 use simple pushbutton for add to single user dict
Comment 12 manj_k 2012-05-21 05:56:39 UTC
Please recheck:

"Due to an unexpected error, LOdev crashed."
via 'Spelling and Grammar' (F7) > Add...
[only 'standard.dic' installed/enabled]

New > Text Document (text language en-US; also: fr-FR)
Type: xyz
Press: F7 > Add
Crash.

'Add' works fine via AutoSpellcheck (right-click context menu).

Tested (on WinXP 32b) w/

(1)
LibO-Dev_3.6.0alpha0
Win-x86@6-fast MASTER
pull time 2012-05-17 21:20:44
git core:8b1d29bc9b00bc2730738a990023a65ab6e0219b

(2)
LibO-Dev_3.6.0alpha0
W2008R2@20-With-Symbol-Bytemark-Hosting MASTER
pull time 2012-05-20 23:56:17
git core:67ff63988f3b8eef2cc2b5bdf917918b93c3f070
Comment 13 Caolán McNamara 2012-05-22 08:11:31 UTC
good catch, worked in a debugging version, but falls over in a non-debug version for very good reasons, thanks for catching that :-)
Comment 14 Not Assigned 2012-05-22 08:13:52 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e5d589bb3c2285362e2c89576cf14fc5e77262d0

Resolves: fdo#40778 wrong type used for callback arg
Comment 15 manj_k 2012-05-23 07:58:20 UTC
Thanks. :)

Verified (on WinXP 32b) w/
LibO-Dev_3.6.0alpha0
Win-x86@6-fast MASTER
pull time 2012-05-22 21:46:19
core:7e656661684669b6d34d3f813d53fad9d9ffd047

*Unknown words - Test 1*
(text language: en-US)
enabled dictionary: standard.dic (language: All)

Spelling and Grammar (F7)
<Add> → simple pushbutton - OK

AutoSpellcheck (right-click context menu)
<Add> → simple pushbutton - OK


*Unknown words - Test 2*
(text language: en-US + fr-FR)
enabled dictionaries: standard.dic + user-defined dictionary (language fr-FR)

Spelling and Grammar (F7)
text language en-US
<Add> → simple pushbutton - OK
text language fr-FR
<Add> → multibutton (drop down) - OK

AutoSpellcheck (right-click context menu)
text language en-US
<Add> → simple pushbutton - OK
text language fr-FR
<Add> → sub-menu - OK


*Unknown words - Test 3*
(text language: en-US + fr-FR)
enabled dictionaries: standard.dic + user-defined dictionary (language fr-FR) + user-defined dictionary (language en-US)

Spelling and Grammar (F7)
text language en-US
<Add> → multibutton (drop down) - OK
text language fr-FR
<Add> → multibutton (drop down) - OK

AutoSpellcheck (right-click context menu)
text language en-US
<Add> → sub-menu - OK
text language fr-FR
<Add> → sub-menu - OK


[OK =
- selection 'simple pushbutton' or 'multibutton (drop down)'/'sub-menu' is correct
- offered dictionaries are correct
- added to the correct dictionary (and works fine)]
Comment 16 Rob Snelders 2012-05-23 09:11:27 UTC
hi Manj_k,

Did you note that the "right-click context menu" is different for writer then the other programs. Those are 2 implementations. Can you test that also in windows?

Many Thanks!
Comment 17 manj_k 2012-05-23 11:07:03 UTC
@Rob Snelders
(In reply to comment #16)

Test cases "right-click context menu" (see comment #15),
applied to Calc, Impress, Draw: 
all successfully completed; works fine (for me)--as expected.

Congratulations... :)
Comment 18 Rob Snelders 2012-05-24 13:24:48 UTC
added to the release-notes
Comment 19 Robinson Tryon (qubit) 2015-12-18 10:19:00 UTC
Migrating Whiteboard tags to Keywords: (ProposedEasyHack -> needsDevEval)
[NinjaEdit]