зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1368418 part 2 - Remove nsCaseConversionImp2. r=emk
Code search indicates that it is used neither internally nor in any addon. It should be safe to remove. MozReview-Commit-ID: K3dBoydIwGk --HG-- extra : rebase_source : 984aee342b0006af94eec1cd7fce123bccea4bd7
This commit is contained in:
Родитель
9dc47921e1
Коммит
143db590ff
|
@ -13,7 +13,6 @@
|
|||
// unicharutil
|
||||
#include "nsCategoryImp.h"
|
||||
#include "nsUnicharUtilCIID.h"
|
||||
#include "nsCaseConversionImp2.h"
|
||||
#include "nsEntityConverter.h"
|
||||
#include "nsSaveAsCharset.h"
|
||||
#include "nsUnicodeNormalizer.h"
|
||||
|
@ -33,7 +32,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsSampleWordBreaker)
|
|||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsStringBundleService, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsStringBundleTextOverride, Init)
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCaseConversionImp2)
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsCategoryImp,
|
||||
nsCategoryImp::GetInstance)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEntityConverter)
|
||||
|
@ -44,7 +42,6 @@ NS_DEFINE_NAMED_CID(MOZ_LOCALESERVICE_CID);
|
|||
NS_DEFINE_NAMED_CID(MOZ_OSPREFERENCES_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_LBRK_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_WBRK_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_UNICHARUTIL_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_UNICHARCATEGORY_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_ENTITYCONVERTER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_SAVEASCHARSET_CID);
|
||||
|
@ -62,7 +59,6 @@ static const mozilla::Module::CIDEntry kIntlCIDs[] = {
|
|||
{ &kMOZ_OSPREFERENCES_CID, false, nullptr, mozilla::intl::OSPreferencesConstructor },
|
||||
{ &kNS_LBRK_CID, false, nullptr, nsJISx4051LineBreakerConstructor },
|
||||
{ &kNS_WBRK_CID, false, nullptr, nsSampleWordBreakerConstructor },
|
||||
{ &kNS_UNICHARUTIL_CID, false, nullptr, nsCaseConversionImp2Constructor },
|
||||
{ &kNS_UNICHARCATEGORY_CID, false, nullptr, nsCategoryImpConstructor },
|
||||
{ &kNS_ENTITYCONVERTER_CID, false, nullptr, nsEntityConverterConstructor },
|
||||
{ &kNS_SAVEASCHARSET_CID, false, nullptr, nsSaveAsCharsetConstructor },
|
||||
|
@ -82,7 +78,6 @@ static const mozilla::Module::ContractIDEntry kIntlContracts[] = {
|
|||
{ MOZ_OSPREFERENCES_CONTRACTID, &kMOZ_OSPREFERENCES_CID },
|
||||
{ NS_LBRK_CONTRACTID, &kNS_LBRK_CID },
|
||||
{ NS_WBRK_CONTRACTID, &kNS_WBRK_CID },
|
||||
{ NS_UNICHARUTIL_CONTRACTID, &kNS_UNICHARUTIL_CID },
|
||||
{ NS_UNICHARCATEGORY_CONTRACTID, &kNS_UNICHARCATEGORY_CID },
|
||||
{ NS_ENTITYCONVERTER_CONTRACTID, &kNS_ENTITYCONVERTER_CID },
|
||||
{ NS_SAVEASCHARSET_CONTRACTID, &kNS_SAVEASCHARSET_CID },
|
||||
|
|
|
@ -16,14 +16,12 @@ XPIDL_SOURCES += [
|
|||
XPIDL_MODULE = 'unicharutil'
|
||||
|
||||
EXPORTS += [
|
||||
'nsICaseConversion.h',
|
||||
'nsIUGenCategory.h',
|
||||
'nsUnicharUtilCIID.h',
|
||||
'nsUnicodeNormalizer.h',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'nsCaseConversionImp2.cpp',
|
||||
'nsCategoryImp.cpp',
|
||||
'nsEntityConverter.cpp',
|
||||
'nsSaveAsCharset.cpp',
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/* -*- Mode: C; tab-width: 4; 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 "nsCaseConversionImp2.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
|
||||
NS_IMETHODIMP_(MozExternalRefCountType) nsCaseConversionImp2::AddRef(void)
|
||||
{
|
||||
return (MozExternalRefCountType)1;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(MozExternalRefCountType) nsCaseConversionImp2::Release(void)
|
||||
{
|
||||
return (MozExternalRefCountType)1;
|
||||
}
|
||||
|
||||
NS_IMPL_QUERY_INTERFACE(nsCaseConversionImp2, nsICaseConversion)
|
||||
|
||||
NS_IMETHODIMP nsCaseConversionImp2::ToUpper(char16_t aChar, char16_t* aReturn)
|
||||
{
|
||||
*aReturn = ToUpperCase(aChar);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCaseConversionImp2::ToLower(char16_t aChar, char16_t* aReturn)
|
||||
{
|
||||
*aReturn = ToLowerCase(aChar);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCaseConversionImp2::ToTitle(char16_t aChar, char16_t* aReturn)
|
||||
{
|
||||
*aReturn = ToTitleCase(aChar);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCaseConversionImp2::ToUpper(const char16_t* anArray,
|
||||
char16_t* aReturn,
|
||||
uint32_t aLen)
|
||||
{
|
||||
ToUpperCase(anArray, aReturn, aLen);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCaseConversionImp2::ToLower(const char16_t* anArray,
|
||||
char16_t* aReturn,
|
||||
uint32_t aLen)
|
||||
{
|
||||
ToLowerCase(anArray, aReturn, aLen);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCaseConversionImp2::CaseInsensitiveCompare(const char16_t *aLeft,
|
||||
const char16_t *aRight,
|
||||
uint32_t aCount, int32_t* aResult)
|
||||
{
|
||||
*aResult = ::CaseInsensitiveCompare(aLeft, aRight, aCount);
|
||||
return NS_OK;
|
||||
}
|
|
@ -1,35 +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 nsCaseConversionImp2_h__
|
||||
#define nsCaseConversionImp2_h__
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsISupports.h"
|
||||
|
||||
#include "nsICaseConversion.h"
|
||||
|
||||
class nsCaseConversionImp2 : public nsICaseConversion {
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
public:
|
||||
virtual ~nsCaseConversionImp2() { }
|
||||
|
||||
static nsCaseConversionImp2* GetInstance();
|
||||
|
||||
NS_IMETHOD ToUpper(char16_t aChar, char16_t* aReturn) override;
|
||||
|
||||
NS_IMETHOD ToLower(char16_t aChar, char16_t* aReturn) override;
|
||||
|
||||
NS_IMETHOD ToTitle(char16_t aChar, char16_t* aReturn) override;
|
||||
|
||||
NS_IMETHOD ToUpper(const char16_t* anArray, char16_t* aReturn, uint32_t aLen) override;
|
||||
|
||||
NS_IMETHOD ToLower(const char16_t* anArray, char16_t* aReturn, uint32_t aLen) override;
|
||||
|
||||
NS_IMETHOD CaseInsensitiveCompare(const char16_t* aLeft, const char16_t* aRight, uint32_t aLength, int32_t *aResult) override;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,45 +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 nsICaseConversion_h__
|
||||
#define nsICaseConversion_h__
|
||||
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nscore.h"
|
||||
|
||||
// {07D3D8E0-9614-11d2-B3AD-00805F8A6670}
|
||||
#define NS_ICASECONVERSION_IID \
|
||||
{ 0x7d3d8e0, 0x9614, 0x11d2, \
|
||||
{ 0xb3, 0xad, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 } }
|
||||
|
||||
class nsICaseConversion : public nsISupports {
|
||||
|
||||
public:
|
||||
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICASECONVERSION_IID)
|
||||
|
||||
// Convert one Unicode character into upper case
|
||||
NS_IMETHOD ToUpper( char16_t aChar, char16_t* aReturn) = 0;
|
||||
|
||||
// Convert one Unicode character into lower case
|
||||
NS_IMETHOD ToLower( char16_t aChar, char16_t* aReturn) = 0;
|
||||
|
||||
// Convert one Unicode character into title case
|
||||
NS_IMETHOD ToTitle( char16_t aChar, char16_t* aReturn) = 0;
|
||||
|
||||
// Convert an array of Unicode characters into upper case
|
||||
NS_IMETHOD ToUpper( const char16_t* anArray, char16_t* aReturn, uint32_t aLen) = 0;
|
||||
|
||||
// Convert an array of Unicode characters into lower case
|
||||
NS_IMETHOD ToLower( const char16_t* anArray, char16_t* aReturn, uint32_t aLen) = 0;
|
||||
|
||||
// case-insensitive char16_t* comparison - aResult returns similar
|
||||
// to strcasecmp
|
||||
NS_IMETHOD CaseInsensitiveCompare(const char16_t* aLeft, const char16_t* aRight, uint32_t aLength, int32_t* aResult) = 0;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsICaseConversion, NS_ICASECONVERSION_IID)
|
||||
|
||||
#endif /* nsICaseConversion_h__ */
|
|
@ -9,12 +9,6 @@
|
|||
#include "nsISupports.h"
|
||||
#include "nscore.h"
|
||||
|
||||
#define NS_UNICHARUTIL_CID \
|
||||
{ 0xcc10c750, 0x9ec3, 0x11d2, \
|
||||
{ 0xb3, 0xae, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 } }
|
||||
|
||||
#define NS_UNICHARUTIL_CONTRACTID "@mozilla.org/intl/unicharutil;1"
|
||||
|
||||
#define NS_UNICHARCATEGORY_CID \
|
||||
{ 0x748a1132, 0x671a, 0x409a, \
|
||||
{ 0x8d, 0x1d, 0xf1, 0xcd, 0xf6, 0xb3, 0xa6, 0xb4 } }
|
||||
|
|
Загрузка…
Ссылка в новой задаче