Bug 1550519 - Show a translucent parent highlight when a subgrid is highlighted....
[gecko.git] / intl / locale / nsCollation.h
blobc39083ca7cd5054a363509342b357e1e89c76d58
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsCollation_h_
7 #define nsCollation_h_
9 #include "mozilla/Attributes.h"
10 #include "nsICollation.h"
11 #include "nsCollationFactory.h"
12 #include "nsString.h"
14 #include "unicode/ucol.h"
16 class nsCollation final : public nsICollation {
17 public:
18 nsCollation();
20 // nsISupports interface
21 NS_DECL_ISUPPORTS
23 // nsICollation interface
24 NS_DECL_NSICOLLATION
26 protected:
27 ~nsCollation();
29 nsresult ConvertStrength(const int32_t aStrength,
30 UCollationStrength* aStrengthOut,
31 UColAttributeValue* aCaseLevelOut);
32 nsresult EnsureCollator(const int32_t newStrength);
33 nsresult CleanUpCollator(void);
35 private:
36 bool mInit;
37 bool mHasCollator;
38 nsCString mLocale;
39 int32_t mLastStrength;
40 UCollator* mCollatorICU;
43 #endif /* nsCollation_h_ */