Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
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