extensions/spellcheck/src/mozEnglishWordUtils.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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

mercurial