mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1208885 - Remove mozGenericWordUtils; r=smaug
Found by Viva64. In the future we need to add support for more langauges, but right now mozGenericWordUtils doesn't provide any value.
This commit is contained in:
parent
956255d4b5
commit
b6df448ae7
@ -7,7 +7,6 @@
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
SOURCES += [
|
||||
'mozEnglishWordUtils.cpp',
|
||||
'mozGenericWordUtils.cpp',
|
||||
'mozInlineSpellChecker.cpp',
|
||||
'mozInlineSpellWordUtil.cpp',
|
||||
'mozPersonalDictionary.cpp',
|
||||
|
@ -1,40 +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 "mozGenericWordUtils.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS(mozGenericWordUtils, mozISpellI18NUtil)
|
||||
|
||||
// do something sensible but generic ... eventually. For now whine.
|
||||
|
||||
mozGenericWordUtils::mozGenericWordUtils()
|
||||
{
|
||||
/* member initializers and constructor code */
|
||||
}
|
||||
|
||||
mozGenericWordUtils::~mozGenericWordUtils()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
NS_IMETHODIMP mozGenericWordUtils::GetLanguage(char16_t * *aLanguage)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP mozGenericWordUtils::GetRootForm(const char16_t *word, uint32_t type, char16_t ***words, uint32_t *count)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP mozGenericWordUtils::FromRootForm(const char16_t *word, const char16_t **iwords, uint32_t icount, char16_t ***owords, uint32_t *ocount)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP mozGenericWordUtils::FindNextWord(const char16_t *word, uint32_t length, uint32_t offset, int32_t *begin, int32_t *end)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
@ -1,24 +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 mozGenericWordUtils_h__
|
||||
#define mozGenericWordUtils_h__
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "mozISpellI18NUtil.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
|
||||
class mozGenericWordUtils : public mozISpellI18NUtil
|
||||
{
|
||||
protected:
|
||||
virtual ~mozGenericWordUtils();
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_MOZISPELLI18NUTIL
|
||||
|
||||
mozGenericWordUtils();
|
||||
};
|
||||
|
||||
#endif
|
@ -5,36 +5,28 @@
|
||||
|
||||
#include "mozSpellI18NManager.h"
|
||||
#include "mozEnglishWordUtils.h"
|
||||
#include "mozGenericWordUtils.h"
|
||||
#include "nsString.h"
|
||||
#include "mozilla/nsRefPtr.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS(mozSpellI18NManager, mozISpellI18NManager)
|
||||
|
||||
mozSpellI18NManager::mozSpellI18NManager()
|
||||
{
|
||||
/* member initializers and constructor code */
|
||||
}
|
||||
|
||||
mozSpellI18NManager::~mozSpellI18NManager()
|
||||
{
|
||||
/* destructor code */
|
||||
}
|
||||
|
||||
NS_IMETHODIMP mozSpellI18NManager::GetUtil(const char16_t *aLanguage, mozISpellI18NUtil **_retval)
|
||||
{
|
||||
if( nullptr == _retval) {
|
||||
if (!_retval) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
*_retval = nullptr;
|
||||
nsAutoString lang;
|
||||
lang.Assign(aLanguage);
|
||||
if(lang.EqualsLiteral("en")){
|
||||
*_retval = new mozEnglishWordUtils;
|
||||
}
|
||||
else{
|
||||
*_retval = new mozEnglishWordUtils;
|
||||
}
|
||||
|
||||
NS_IF_ADDREF(*_retval);
|
||||
// XXX TODO Actually handle multiple languages.
|
||||
nsRefPtr<mozEnglishWordUtils> utils = new mozEnglishWordUtils;
|
||||
utils.forget(_retval);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user