Bug 1469759 - Part 2. Get rid of mozISpellI18NManager. r?masayuki draft
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 02 Jul 2018 11:21:04 +0900
changeset 814784 160ace2fbd752c12923a59576bb2273f5bf74030
parent 814783 cde8a836239cc8ff001ce191a50a4cad5eeddf3d
child 814785 8bef5812c3ffa8d16e044649816fc103a9b7de13
child 816410 149847a68bd8512bf97dc3818d40bab80d92c33b
push id115343
push userbmo:m_kato@ga2.so-net.ne.jp
push dateFri, 06 Jul 2018 07:41:34 +0000
reviewersmasayuki
bugs1469759
milestone63.0a1
Bug 1469759 - Part 2. Get rid of mozISpellI18NManager. r?masayuki No one uses mozISpellI18NManager, so we should get rid of this interface. MozReview-Commit-ID: 7f0Cy3tHnt1
extensions/spellcheck/hunspell/glue/mozHunspell.cpp
extensions/spellcheck/idl/moz.build
extensions/spellcheck/idl/mozISpellI18NManager.idl
extensions/spellcheck/src/moz.build
extensions/spellcheck/src/mozInlineSpellChecker.cpp
extensions/spellcheck/src/mozSpellCheckerFactory.cpp
extensions/spellcheck/src/mozSpellI18NManager.cpp
extensions/spellcheck/src/mozSpellI18NManager.h
--- a/extensions/spellcheck/hunspell/glue/mozHunspell.cpp
+++ b/extensions/spellcheck/hunspell/glue/mozHunspell.cpp
@@ -59,17 +59,16 @@
 
 #include "mozHunspell.h"
 #include "nsReadableUtils.h"
 #include "nsString.h"
 #include "nsIObserverService.h"
 #include "nsISimpleEnumerator.h"
 #include "nsIDirectoryEnumerator.h"
 #include "nsIFile.h"
-#include "mozISpellI18NManager.h"
 #include "nsUnicharUtils.h"
 #include "nsCRT.h"
 #include "mozInlineSpellChecker.h"
 #include <stdlib.h>
 #include "nsIPrefService.h"
 #include "nsIPrefBranch.h"
 #include "nsNetUtil.h"
 #include "mozilla/dom/ContentParent.h"
--- a/extensions/spellcheck/idl/moz.build
+++ b/extensions/spellcheck/idl/moz.build
@@ -2,14 +2,13 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 XPIDL_SOURCES += [
     'mozIPersonalDictionary.idl',
     'mozISpellCheckingEngine.idl',
-    'mozISpellI18NManager.idl',
     'mozISpellI18NUtil.idl',
 ]
 
 XPIDL_MODULE = 'spellchecker'
 
deleted file mode 100644
--- a/extensions/spellcheck/idl/mozISpellI18NManager.idl
+++ /dev/null
@@ -1,21 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-#include "mozISpellI18NUtil.idl"
-
-[scriptable, uuid(AEB8936F-219C-4D3C-8385-D9382DAA551A)]
-
-/**
- * This interface contains various I18N related code used in various places
- * by the spell checker.
- */
-
-interface mozISpellI18NManager : nsISupports {
-  /**
-   * Get a mozISpellI18NUtil interface that best matches the given language.
-   */
-  mozISpellI18NUtil getUtil(in wstring language);
-};
--- a/extensions/spellcheck/src/moz.build
+++ b/extensions/spellcheck/src/moz.build
@@ -7,17 +7,16 @@
 include('/ipc/chromium/chromium-config.mozbuild')
 UNIFIED_SOURCES += [
     'mozEnglishWordUtils.cpp',
     'mozInlineSpellChecker.cpp',
     'mozInlineSpellWordUtil.cpp',
     'mozPersonalDictionary.cpp',
     'mozSpellChecker.cpp',
     'mozSpellCheckerFactory.cpp',
-    'mozSpellI18NManager.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '../hunspell/glue',
     '../hunspell/src',
     '/dom/base',
--- a/extensions/spellcheck/src/mozInlineSpellChecker.cpp
+++ b/extensions/spellcheck/src/mozInlineSpellChecker.cpp
@@ -40,17 +40,16 @@
 #include "mozilla/Services.h"
 #include "mozilla/TextEditor.h"
 #include "mozilla/dom/Event.h"
 #include "mozilla/dom/KeyboardEvent.h"
 #include "mozilla/dom/KeyboardEventBinding.h"
 #include "mozilla/dom/MouseEvent.h"
 #include "mozilla/dom/Selection.h"
 #include "mozInlineSpellWordUtil.h"
-#include "mozISpellI18NManager.h"
 #include "mozISpellI18NUtil.h"
 #include "nsCOMPtr.h"
 #include "nsCRT.h"
 #include "nsGenericHTMLElement.h"
 #include "nsRange.h"
 #include "nsIPlaintextEditor.h"
 #include "nsIPrefBranch.h"
 #include "nsIPrefService.h"
--- a/extensions/spellcheck/src/mozSpellCheckerFactory.cpp
+++ b/extensions/spellcheck/src/mozSpellCheckerFactory.cpp
@@ -3,47 +3,42 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 
 #include "mozilla/ModuleUtils.h"
 #include "mozHunspell.h"
 #include "mozSpellChecker.h"
 #include "mozPersonalDictionary.h"
-#include "mozSpellI18NManager.h"
 #include "nsIFile.h"
 
 #define NS_SPELLCHECKER_CID         \
 { /* 8227f019-afc7-461e-b030-9f185d7a0e29 */    \
 0x8227F019, 0xAFC7, 0x461e,                     \
 { 0xB0, 0x30, 0x9F, 0x18, 0x5D, 0x7A, 0x0E, 0x29} }
 
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozHunspell, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozSpellChecker, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozPersonalDictionary, Init)
-NS_GENERIC_FACTORY_CONSTRUCTOR(mozSpellI18NManager)
 
 NS_DEFINE_NAMED_CID(MOZ_HUNSPELL_CID);
 NS_DEFINE_NAMED_CID(NS_SPELLCHECKER_CID);
 NS_DEFINE_NAMED_CID(MOZ_PERSONALDICTIONARY_CID);
-NS_DEFINE_NAMED_CID(MOZ_SPELLI18NMANAGER_CID);
 
 static const mozilla::Module::CIDEntry kSpellcheckCIDs[] = {
     { &kMOZ_HUNSPELL_CID, false, nullptr, mozHunspellConstructor },
     { &kNS_SPELLCHECKER_CID, false, nullptr, mozSpellCheckerConstructor },
     { &kMOZ_PERSONALDICTIONARY_CID, false, nullptr, mozPersonalDictionaryConstructor },
-    { &kMOZ_SPELLI18NMANAGER_CID, false, nullptr, mozSpellI18NManagerConstructor },
     { nullptr }
 };
 
 static const mozilla::Module::ContractIDEntry kSpellcheckContracts[] = {
     { MOZ_HUNSPELL_CONTRACTID, &kMOZ_HUNSPELL_CID },
     { NS_SPELLCHECKER_CONTRACTID, &kNS_SPELLCHECKER_CID },
     { MOZ_PERSONALDICTIONARY_CONTRACTID, &kMOZ_PERSONALDICTIONARY_CID },
-    { MOZ_SPELLI18NMANAGER_CONTRACTID, &kMOZ_SPELLI18NMANAGER_CID },
     { nullptr }
 };
 
 const mozilla::Module kSpellcheckModule = {
     mozilla::Module::kVersion,
     kSpellcheckCIDs,
     kSpellcheckContracts,
     nullptr
deleted file mode 100644
--- a/extensions/spellcheck/src/mozSpellI18NManager.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "mozSpellI18NManager.h"
-#include "mozEnglishWordUtils.h"
-#include "nsString.h"
-#include "mozilla/RefPtr.h"
-
-NS_IMPL_ISUPPORTS(mozSpellI18NManager, mozISpellI18NManager)
-
-mozSpellI18NManager::mozSpellI18NManager()
-{
-}
-
-mozSpellI18NManager::~mozSpellI18NManager()
-{
-}
-
-NS_IMETHODIMP mozSpellI18NManager::GetUtil(const char16_t *aLanguage, mozISpellI18NUtil **_retval)
-{
- if (!_retval) {
-   return NS_ERROR_NULL_POINTER;
- }
-
- // XXX TODO Actually handle multiple languages.
- RefPtr<mozEnglishWordUtils> utils = new mozEnglishWordUtils;
- utils.forget(_retval);
-
- return NS_OK;
-}
deleted file mode 100644
--- a/extensions/spellcheck/src/mozSpellI18NManager.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozSpellI18NManager_h__
-#define mozSpellI18NManager_h__
-
-#include "nsCOMPtr.h"
-#include "mozISpellI18NManager.h"
-#include "nsCycleCollectionParticipant.h"
-
-#define MOZ_SPELLI18NMANAGER_CONTRACTID "@mozilla.org/spellchecker/i18nmanager;1"
-#define MOZ_SPELLI18NMANAGER_CID         \
-{ /* {AEB8936F-219C-4D3C-8385-D9382DAA551A} */  \
-0xaeb8936f, 0x219c, 0x4d3c, \
-  { 0x83, 0x85, 0xd9, 0x38, 0x2d, 0xaa, 0x55, 0x1a } }
-
-class mozSpellI18NManager : public mozISpellI18NManager
-{
-protected:
-  virtual ~mozSpellI18NManager();
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_MOZISPELLI18NMANAGER
-
-  mozSpellI18NManager();
-};
-#endif
-