LCOV - code coverage report
Current view: directory - extensions/spellcheck/src - mozSpellCheckerFactory.cpp (source / functions) Found Hit Coverage
Test: app.info Lines: 9 5 55.6 %
Date: 2012-06-02 Functions: 9 4 44.4 %

       1                 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 : /* ***** BEGIN LICENSE BLOCK *****
       3                 :  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
       4                 :  *
       5                 :  * The contents of this file are subject to the Mozilla Public License Version
       6                 :  * 1.1 (the "License"); you may not use this file except in compliance with
       7                 :  * the License. You may obtain a copy of the License at
       8                 :  * http://www.mozilla.org/MPL/
       9                 :  *
      10                 :  * Software distributed under the License is distributed on an "AS IS" basis,
      11                 :  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
      12                 :  * for the specific language governing rights and limitations under the
      13                 :  * License.
      14                 :  *
      15                 :  * The Original Code is Mozilla Spellchecker Component.
      16                 :  *
      17                 :  * The Initial Developer of the Original Code is David Einstein.
      18                 :  * Portions created by the Initial Developer are Copyright (C) 2001
      19                 :  * the Initial Developer. All Rights Reserved.
      20                 :  *
      21                 :  * Contributor(s): David Einstein <Deinst@world.std.com>
      22                 :  *
      23                 :  * Alternatively, the contents of this file may be used under the terms of
      24                 :  * either the GNU General Public License Version 2 or later (the "GPL"), or
      25                 :  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
      26                 :  * in which case the provisions of the GPL or the LGPL are applicable instead
      27                 :  * of those above. If you wish to allow use of your version of this file only
      28                 :  * under the terms of either the GPL or the LGPL, and not to allow others to
      29                 :  * use your version of this file under the terms of the MPL, indicate your
      30                 :  * decision by deleting the provisions above and replace them with the notice
      31                 :  * and other provisions required by the GPL or the LGPL. If you do not delete
      32                 :  * the provisions above, a recipient may use your version of this file under
      33                 :  * the terms of any one of the MPL, the GPL or the LGPL.
      34                 :  *
      35                 :  * ***** END LICENSE BLOCK ***** */
      36                 : 
      37                 : 
      38                 : #include "mozilla/ModuleUtils.h"
      39                 : #include "mozHunspell.h"
      40                 : #include "mozHunspellDirProvider.h"
      41                 : #include "mozSpellChecker.h"
      42                 : #include "mozInlineSpellChecker.h"
      43                 : #include "nsTextServicesCID.h"
      44                 : #include "mozPersonalDictionary.h"
      45                 : #include "mozSpellI18NManager.h"
      46                 : 
      47                 : #define NS_SPELLCHECKER_CID         \
      48                 : { /* 8227f019-afc7-461e-b030-9f185d7a0e29 */    \
      49                 : 0x8227F019, 0xAFC7, 0x461e,                     \
      50                 : { 0xB0, 0x30, 0x9F, 0x18, 0x5D, 0x7A, 0x0E, 0x29} }
      51                 : 
      52                 : #define MOZ_INLINESPELLCHECKER_CID         \
      53                 : { /* 9FE5D975-09BD-44aa-A01A-66402EA28657 */    \
      54                 : 0x9fe5d975, 0x9bd, 0x44aa,                      \
      55                 : { 0xa0, 0x1a, 0x66, 0x40, 0x2e, 0xa2, 0x86, 0x57} }
      56                 : 
      57               2 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozHunspell, Init)
      58            2838 : NS_GENERIC_FACTORY_CONSTRUCTOR(mozHunspellDirProvider)
      59               0 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozSpellChecker, Init)
      60               0 : NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozPersonalDictionary, Init)
      61               0 : NS_GENERIC_FACTORY_CONSTRUCTOR(mozSpellI18NManager)
      62               0 : NS_GENERIC_FACTORY_CONSTRUCTOR(mozInlineSpellChecker)
      63                 : 
      64                 : NS_DEFINE_NAMED_CID(MOZ_HUNSPELL_CID);
      65                 : NS_DEFINE_NAMED_CID(HUNSPELLDIRPROVIDER_CID);
      66                 : NS_DEFINE_NAMED_CID(NS_SPELLCHECKER_CID);
      67                 : NS_DEFINE_NAMED_CID(MOZ_PERSONALDICTIONARY_CID);
      68                 : NS_DEFINE_NAMED_CID(MOZ_SPELLI18NMANAGER_CID);
      69                 : NS_DEFINE_NAMED_CID(MOZ_INLINESPELLCHECKER_CID);
      70                 : 
      71                 : static const mozilla::Module::CIDEntry kSpellcheckCIDs[] = {
      72                 :     { &kMOZ_HUNSPELL_CID, false, NULL, mozHunspellConstructor },
      73                 :     { &kHUNSPELLDIRPROVIDER_CID, false, NULL, mozHunspellDirProviderConstructor },
      74                 :     { &kNS_SPELLCHECKER_CID, false, NULL, mozSpellCheckerConstructor },
      75                 :     { &kMOZ_PERSONALDICTIONARY_CID, false, NULL, mozPersonalDictionaryConstructor },
      76                 :     { &kMOZ_SPELLI18NMANAGER_CID, false, NULL, mozSpellI18NManagerConstructor },
      77                 :     { &kMOZ_INLINESPELLCHECKER_CID, false, NULL, mozInlineSpellCheckerConstructor },
      78                 :     { NULL }
      79                 : };
      80                 : 
      81                 : static const mozilla::Module::ContractIDEntry kSpellcheckContracts[] = {
      82                 :     { MOZ_HUNSPELL_CONTRACTID, &kMOZ_HUNSPELL_CID },
      83                 :     { mozHunspellDirProvider::kContractID, &kHUNSPELLDIRPROVIDER_CID },
      84                 :     { NS_SPELLCHECKER_CONTRACTID, &kNS_SPELLCHECKER_CID },
      85                 :     { MOZ_PERSONALDICTIONARY_CONTRACTID, &kMOZ_PERSONALDICTIONARY_CID },
      86                 :     { MOZ_SPELLI18NMANAGER_CONTRACTID, &kMOZ_SPELLI18NMANAGER_CID },
      87                 :     { MOZ_INLINESPELLCHECKER_CONTRACTID, &kMOZ_INLINESPELLCHECKER_CID },
      88                 :     { NULL }
      89            1464 : };
      90                 : 
      91                 : static const mozilla::Module::CategoryEntry kSpellcheckCategories[] = {
      92                 :     { XPCOM_DIRECTORY_PROVIDER_CATEGORY, "spellcheck-directory-provider", mozHunspellDirProvider::kContractID },
      93                 :     { NULL }
      94            1464 : };
      95                 : 
      96                 : const mozilla::Module kSpellcheckModule = {
      97                 :     mozilla::Module::kVersion,
      98                 :     kSpellcheckCIDs,
      99                 :     kSpellcheckContracts,
     100                 :     kSpellcheckCategories
     101                 : };
     102                 : 
     103            4392 : NSMODULE_DEFN(mozSpellCheckerModule) = &kSpellcheckModule;

Generated by: LCOV version 1.7