Comment 113 for bug 303269

Revision history for this message
In , Arnaud Renevier (arenevier) wrote :

(In reply to Ehsan Akhgari [:ehsan] from comment #105)
> 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.

Patch fixes those 2 stuffs.