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.
Comment on attachment 553143
part2: do not override manually set dictionary
>+ PRBool mUpdateDictiona ryRunning; ally;
>+ PRBool mDictWasSetManu
Please use PRPackedBool.
>+class UpdateDictionna ryHolder { ryHolder( nsEditorSpellCh eck* esc): mSpellCheck(esc) { >BeginUpdateDic tionary( ); aryHolder( ) { >EndUpdateDicti onary() ;
>+ private:
>+ nsEditorSpellCheck* mSpellCheck;
>+ public:
>+ UpdateDictionna
>+ if (mSpellCheck) {
>+ mSpellCheck-
>+ }
>+ }
>+ ~UpdateDictionn
>+ if (mSpellCheck) {
>+ mSpellCheck-
>+ }
>+ }
> };
Also, please move this class to the cpp file.