1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/extensions/spellcheck/src/mozEnglishWordUtils.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,41 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef mozEnglishWordUtils_h__ 1.10 +#define mozEnglishWordUtils_h__ 1.11 + 1.12 +#include "nsCOMPtr.h" 1.13 +#include "mozISpellI18NUtil.h" 1.14 +#include "nsIUnicodeEncoder.h" 1.15 +#include "nsIUnicodeDecoder.h" 1.16 +#include "nsString.h" 1.17 + 1.18 +#include "mozITXTToHTMLConv.h" 1.19 +#include "nsCycleCollectionParticipant.h" 1.20 + 1.21 +class mozEnglishWordUtils : public mozISpellI18NUtil 1.22 +{ 1.23 +public: 1.24 + NS_DECL_CYCLE_COLLECTING_ISUPPORTS 1.25 + NS_DECL_MOZISPELLI18NUTIL 1.26 + NS_DECL_CYCLE_COLLECTION_CLASS(mozEnglishWordUtils) 1.27 + 1.28 + mozEnglishWordUtils(); 1.29 + virtual ~mozEnglishWordUtils(); 1.30 + /* additional members */ 1.31 + enum myspCapitalization{ 1.32 + NoCap,InitCap,AllCap,HuhCap 1.33 + }; 1.34 + 1.35 +protected: 1.36 + mozEnglishWordUtils::myspCapitalization captype(const nsString &word); 1.37 + bool ucIsAlpha(char16_t aChar); 1.38 + 1.39 + nsString mLanguage; 1.40 + nsString mCharset; 1.41 + nsCOMPtr<mozITXTToHTMLConv> mURLDetector; // used to detect urls so the spell checker can skip them. 1.42 +}; 1.43 + 1.44 +#endif