Line data Source code
1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* This Source Code Form is subject to the terms of the Mozilla Public
3 : * License, v. 2.0. If a copy of the MPL was not distributed with this
4 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 :
6 : #ifndef mozEnglishWordUtils_h__
7 : #define mozEnglishWordUtils_h__
8 :
9 : #include "nsCOMPtr.h"
10 : #include "mozISpellI18NUtil.h"
11 : #include "nsString.h"
12 :
13 : #include "mozITXTToHTMLConv.h"
14 : #include "nsCycleCollectionParticipant.h"
15 :
16 : class mozEnglishWordUtils : public mozISpellI18NUtil
17 : {
18 : public:
19 : NS_DECL_CYCLE_COLLECTING_ISUPPORTS
20 : NS_DECL_MOZISPELLI18NUTIL
21 0 : NS_DECL_CYCLE_COLLECTION_CLASS(mozEnglishWordUtils)
22 :
23 : mozEnglishWordUtils();
24 : /* additional members */
25 : enum myspCapitalization
26 : {
27 : NoCap,
28 : InitCap,
29 : AllCap,
30 : HuhCap
31 : };
32 :
33 : protected:
34 : virtual ~mozEnglishWordUtils();
35 :
36 : mozEnglishWordUtils::myspCapitalization captype(const nsString &word);
37 : bool ucIsAlpha(char16_t aChar);
38 :
39 : nsString mLanguage;
40 : nsString mCharset;
41 : nsCOMPtr<mozITXTToHTMLConv> mURLDetector; // used to detect urls so the spell checker can skip them.
42 : };
43 :
44 : #endif
|