Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsCaseConversionImp2.h" |
michael@0 | 7 | #include "nsUnicharUtils.h" |
michael@0 | 8 | |
michael@0 | 9 | NS_IMETHODIMP_(MozExternalRefCountType) nsCaseConversionImp2::AddRef(void) |
michael@0 | 10 | { |
michael@0 | 11 | return (MozExternalRefCountType)1; |
michael@0 | 12 | } |
michael@0 | 13 | |
michael@0 | 14 | NS_IMETHODIMP_(MozExternalRefCountType) nsCaseConversionImp2::Release(void) |
michael@0 | 15 | { |
michael@0 | 16 | return (MozExternalRefCountType)1; |
michael@0 | 17 | } |
michael@0 | 18 | |
michael@0 | 19 | NS_IMPL_QUERY_INTERFACE(nsCaseConversionImp2, nsICaseConversion) |
michael@0 | 20 | |
michael@0 | 21 | NS_IMETHODIMP nsCaseConversionImp2::ToUpper(char16_t aChar, char16_t* aReturn) |
michael@0 | 22 | { |
michael@0 | 23 | *aReturn = ToUpperCase(aChar); |
michael@0 | 24 | return NS_OK; |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | NS_IMETHODIMP nsCaseConversionImp2::ToLower(char16_t aChar, char16_t* aReturn) |
michael@0 | 28 | { |
michael@0 | 29 | *aReturn = ToLowerCase(aChar); |
michael@0 | 30 | return NS_OK; |
michael@0 | 31 | } |
michael@0 | 32 | |
michael@0 | 33 | NS_IMETHODIMP nsCaseConversionImp2::ToTitle(char16_t aChar, char16_t* aReturn) |
michael@0 | 34 | { |
michael@0 | 35 | *aReturn = ToTitleCase(aChar); |
michael@0 | 36 | return NS_OK; |
michael@0 | 37 | } |
michael@0 | 38 | |
michael@0 | 39 | NS_IMETHODIMP nsCaseConversionImp2::ToUpper(const char16_t* anArray, |
michael@0 | 40 | char16_t* aReturn, |
michael@0 | 41 | uint32_t aLen) |
michael@0 | 42 | { |
michael@0 | 43 | ToUpperCase(anArray, aReturn, aLen); |
michael@0 | 44 | return NS_OK; |
michael@0 | 45 | } |
michael@0 | 46 | |
michael@0 | 47 | NS_IMETHODIMP nsCaseConversionImp2::ToLower(const char16_t* anArray, |
michael@0 | 48 | char16_t* aReturn, |
michael@0 | 49 | uint32_t aLen) |
michael@0 | 50 | { |
michael@0 | 51 | ToLowerCase(anArray, aReturn, aLen); |
michael@0 | 52 | return NS_OK; |
michael@0 | 53 | } |
michael@0 | 54 | |
michael@0 | 55 | NS_IMETHODIMP |
michael@0 | 56 | nsCaseConversionImp2::CaseInsensitiveCompare(const char16_t *aLeft, |
michael@0 | 57 | const char16_t *aRight, |
michael@0 | 58 | uint32_t aCount, int32_t* aResult) |
michael@0 | 59 | { |
michael@0 | 60 | *aResult = ::CaseInsensitiveCompare(aLeft, aRight, aCount); |
michael@0 | 61 | return NS_OK; |
michael@0 | 62 | } |