Bug 1477917 - Part 1. Remove unused methods for spellchecker. r=masayuki
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Thu, 26 Jul 2018 03:09:14 +0000
changeset 428441 b7439662fa8f10c4dc640242c40194c734ab1c39
parent 428440 2465ce9b98335fa1fd678f4ae1206b3b2e541326
child 428442 86df0a5cc49aeb1d5cd1fd9943803359ea656d92
push id34336
push userncsoregi@mozilla.com
push dateThu, 26 Jul 2018 21:57:35 +0000
treeherdermozilla-central@3f362dfcc160 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1477917
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1477917 - Part 1. Remove unused methods for spellchecker. r=masayuki Differential Revision: https://phabricator.services.mozilla.com/D2348
extensions/spellcheck/hunspell/glue/mozHunspell.cpp
extensions/spellcheck/idl/mozIPersonalDictionary.idl
extensions/spellcheck/idl/mozISpellCheckingEngine.idl
extensions/spellcheck/src/mozPersonalDictionary.cpp
--- a/extensions/spellcheck/hunspell/glue/mozHunspell.cpp
+++ b/extensions/spellcheck/hunspell/glue/mozHunspell.cpp
@@ -202,53 +202,16 @@ NS_IMETHODIMP mozHunspell::SetDictionary
   if (pos == -1)
     mLanguage.Assign(mDictionary);
   else
     mLanguage = Substring(mDictionary, 0, pos);
 
   return NS_OK;
 }
 
-NS_IMETHODIMP mozHunspell::GetLanguage(char16_t **aLanguage)
-{
-  NS_ENSURE_ARG_POINTER(aLanguage);
-
-  if (mDictionary.IsEmpty())
-    return NS_ERROR_NOT_INITIALIZED;
-
-  *aLanguage = ToNewUnicode(mLanguage);
-  return *aLanguage ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
-}
-
-NS_IMETHODIMP mozHunspell::GetProvidesPersonalDictionary(bool *aProvidesPersonalDictionary)
-{
-  NS_ENSURE_ARG_POINTER(aProvidesPersonalDictionary);
-
-  *aProvidesPersonalDictionary = false;
-  return NS_OK;
-}
-
-NS_IMETHODIMP mozHunspell::GetProvidesWordUtils(bool *aProvidesWordUtils)
-{
-  NS_ENSURE_ARG_POINTER(aProvidesWordUtils);
-
-  *aProvidesWordUtils = false;
-  return NS_OK;
-}
-
-NS_IMETHODIMP mozHunspell::GetName(char16_t * *aName)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP mozHunspell::GetCopyright(char16_t * *aCopyright)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
 NS_IMETHODIMP mozHunspell::GetPersonalDictionary(mozIPersonalDictionary * *aPersonalDictionary)
 {
   *aPersonalDictionary = mPersonalDictionary;
   NS_IF_ADDREF(*aPersonalDictionary);
   return NS_OK;
 }
 
 NS_IMETHODIMP mozHunspell::SetPersonalDictionary(mozIPersonalDictionary * aPersonalDictionary)
--- a/extensions/spellcheck/idl/mozIPersonalDictionary.idl
+++ b/extensions/spellcheck/idl/mozIPersonalDictionary.idl
@@ -49,29 +49,9 @@ interface mozIPersonalDictionary : nsISu
    * Add a word to the ignore all list
    */
   void ignoreWord(in wstring word);
 
   /**
    * Clear the ignore list
    */
   void endSession();
-
-  /** 
-   * These three functions are here in case we want to store previous 
-   * misspellings and return them at the head of the misspell list.
-   */
- 
-  /**
-   * Add a misspelling to the list of corrections
-   */
-  void addCorrection(in wstring word,in wstring correction, in wstring lang);
-
-  /**
-   * Remove a misspelling from the list of corrections
-   */
-  void removeCorrection(in wstring word,in wstring correction, in wstring lang);
-
-  /**
-   * Get a list of previous corrections for the word
-   */
-  void getCorrection(in wstring word, [array, size_is(count)] out wstring words, out uint32_t count);
 };
--- a/extensions/spellcheck/idl/mozISpellCheckingEngine.idl
+++ b/extensions/spellcheck/idl/mozISpellCheckingEngine.idl
@@ -23,41 +23,16 @@ interface mozISpellCheckingEngine : nsIS
    * NS_ERROR_FILE_NOT_FOUND.
    *
    * If the dictionary is changed to no dictionary (the empty string), an
    * observer is allowed to set another dictionary before it returns.
    */
   attribute wstring dictionary;
 
   /**
-   * The language this spellchecker is using when checking
-   */
-  readonly attribute wstring language;
-
-  /**
-   * Does the engine provide its own personal dictionary?
-   */
-  readonly attribute boolean providesPersonalDictionary;
-
-  /**
-   * Does the engine provide its own word utils?
-   */
-  readonly attribute boolean providesWordUtils;
-
-  /**
-   * The name of the engine
-   */
-  readonly attribute wstring name;
-
-  /** 
-   * a string indicating the copyright of the engine
-   */
-  readonly attribute wstring copyright;
-
-  /**
    * the personal dictionary
    */
   attribute mozIPersonalDictionary personalDictionary;
 
   /**
    * Get the list of dictionaries
    */
   void getDictionaryList([array, size_is(count)] out wstring dictionaries, out uint32_t count);
--- a/extensions/spellcheck/src/mozPersonalDictionary.cpp
+++ b/extensions/spellcheck/src/mozPersonalDictionary.cpp
@@ -439,31 +439,16 @@ NS_IMETHODIMP mozPersonalDictionary::End
 {
   WaitForLoad();
 
   WaitForSave();
   mIgnoreTable.Clear();
   return NS_OK;
 }
 
-NS_IMETHODIMP mozPersonalDictionary::AddCorrection(const char16_t *word, const char16_t *correction, const char16_t *lang)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP mozPersonalDictionary::RemoveCorrection(const char16_t *word, const char16_t *correction, const char16_t *lang)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP mozPersonalDictionary::GetCorrection(const char16_t *word, char16_t ***words, uint32_t *count)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
 NS_IMETHODIMP mozPersonalDictionary::Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData)
 {
   if (!nsCRT::strcmp(aTopic, "profile-do-change")) {
     // The observer is registered in Init() which calls Load and in turn
     // LoadInternal(); i.e. Observe() can't be called before Load().
     WaitForLoad();
     mIsLoaded = false;
     Load(); // load automatically clears out the existing dictionary table