diff --git a/intl/build/nsI18nModule.cpp b/intl/build/nsI18nModule.cpp index df28bb2d1e0c..6c992c44820e 100644 --- a/intl/build/nsI18nModule.cpp +++ b/intl/build/nsI18nModule.cpp @@ -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 }, diff --git a/intl/unicharutil/moz.build b/intl/unicharutil/moz.build index 461fd255efaf..03db78d1dde6 100644 --- a/intl/unicharutil/moz.build +++ b/intl/unicharutil/moz.build @@ -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', diff --git a/intl/unicharutil/nsCaseConversionImp2.cpp b/intl/unicharutil/nsCaseConversionImp2.cpp deleted file mode 100644 index 61750213742d..000000000000 --- a/intl/unicharutil/nsCaseConversionImp2.cpp +++ /dev/null @@ -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; -} diff --git a/intl/unicharutil/nsCaseConversionImp2.h b/intl/unicharutil/nsCaseConversionImp2.h deleted file mode 100644 index 6521ae832ea6..000000000000 --- a/intl/unicharutil/nsCaseConversionImp2.h +++ /dev/null @@ -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 diff --git a/intl/unicharutil/nsICaseConversion.h b/intl/unicharutil/nsICaseConversion.h deleted file mode 100644 index 06d5dc5a1f09..000000000000 --- a/intl/unicharutil/nsICaseConversion.h +++ /dev/null @@ -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__ */ diff --git a/intl/unicharutil/nsUnicharUtilCIID.h b/intl/unicharutil/nsUnicharUtilCIID.h index 16aad35fe9bd..43783dbb77ab 100644 --- a/intl/unicharutil/nsUnicharUtilCIID.h +++ b/intl/unicharutil/nsUnicharUtilCIID.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 } }