Comment 111 for bug 303269

Revision history for this message
In , Ehsan-mozilla (ehsan-mozilla) wrote :

Comment on attachment 553143
part2: do not override manually set dictionary

>+ PRBool mUpdateDictionaryRunning;
>+ PRBool mDictWasSetManually;

Please use PRPackedBool.

>+class UpdateDictionnaryHolder {
>+ private:
>+ nsEditorSpellCheck* mSpellCheck;
>+ public:
>+ UpdateDictionnaryHolder(nsEditorSpellCheck* esc): mSpellCheck(esc) {
>+ if (mSpellCheck) {
>+ mSpellCheck->BeginUpdateDictionary();
>+ }
>+ }
>+ ~UpdateDictionnaryHolder() {
>+ if (mSpellCheck) {
>+ mSpellCheck->EndUpdateDictionary();
>+ }
>+ }
> };

Also, please move this class to the cpp file.