Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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/. */
6 #ifndef mozEnglishWordUtils_h__
7 #define mozEnglishWordUtils_h__
9 #include "nsCOMPtr.h"
10 #include "mozISpellI18NUtil.h"
11 #include "nsIUnicodeEncoder.h"
12 #include "nsIUnicodeDecoder.h"
13 #include "nsString.h"
15 #include "mozITXTToHTMLConv.h"
16 #include "nsCycleCollectionParticipant.h"
18 class mozEnglishWordUtils : public mozISpellI18NUtil
19 {
20 public:
21 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
22 NS_DECL_MOZISPELLI18NUTIL
23 NS_DECL_CYCLE_COLLECTION_CLASS(mozEnglishWordUtils)
25 mozEnglishWordUtils();
26 virtual ~mozEnglishWordUtils();
27 /* additional members */
28 enum myspCapitalization{
29 NoCap,InitCap,AllCap,HuhCap
30 };
32 protected:
33 mozEnglishWordUtils::myspCapitalization captype(const nsString &word);
34 bool ucIsAlpha(char16_t aChar);
36 nsString mLanguage;
37 nsString mCharset;
38 nsCOMPtr<mozITXTToHTMLConv> mURLDetector; // used to detect urls so the spell checker can skip them.
39 };
41 #endif