sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
*
|
sl@0
|
16 |
*/
|
sl@0
|
17 |
|
sl@0
|
18 |
#include <kernel/localise.h>
|
sl@0
|
19 |
#include <collate.h>
|
sl@0
|
20 |
|
sl@0
|
21 |
const TUint KUidTlocl_CollationMethod = 0x10888888;
|
sl@0
|
22 |
const TUint KUidTlocl2_CollationMethod = 0x10999999;
|
sl@0
|
23 |
|
sl@0
|
24 |
//Test locale table 1
|
sl@0
|
25 |
//Override A=B ; a=b
|
sl@0
|
26 |
static const TUint32 TheTlocl_Key[] =
|
sl@0
|
27 |
{
|
sl@0
|
28 |
0x6cf0109,0x6cf0121,
|
sl@0
|
29 |
};
|
sl@0
|
30 |
|
sl@0
|
31 |
static const TUint32 TheTlocl_Index[] =
|
sl@0
|
32 |
{
|
sl@0
|
33 |
0x420001,0x620000,
|
sl@0
|
34 |
};
|
sl@0
|
35 |
|
sl@0
|
36 |
static const TCollationKeyTable TheTlocl_Table =
|
sl@0
|
37 |
{ TheTlocl_Key, TheTlocl_Index, 2, 0, 0, 0 };
|
sl@0
|
38 |
|
sl@0
|
39 |
//Test locale table 2
|
sl@0
|
40 |
//Override B>A ; b>a
|
sl@0
|
41 |
static const TUint32 TheTlocl2_Key[] =
|
sl@0
|
42 |
{
|
sl@0
|
43 |
0x6e30109,0x6cf0109,0x6cf0121,0x6e30121,
|
sl@0
|
44 |
};
|
sl@0
|
45 |
|
sl@0
|
46 |
static const TUint32 TheTlocl2_Index[] =
|
sl@0
|
47 |
{
|
sl@0
|
48 |
0x410003,0x420002,0x610000,0x620001,
|
sl@0
|
49 |
};
|
sl@0
|
50 |
|
sl@0
|
51 |
static const TCollationKeyTable TheTlocl2_Table =
|
sl@0
|
52 |
{ TheTlocl2_Key, TheTlocl2_Index, 4, 0, 0, 0 };
|
sl@0
|
53 |
|
sl@0
|
54 |
//Test CollationMethod
|
sl@0
|
55 |
static const TCollationMethod TheCollationMethod[] =
|
sl@0
|
56 |
{
|
sl@0
|
57 |
{
|
sl@0
|
58 |
KUidTlocl2_CollationMethod, // the method for the locale
|
sl@0
|
59 |
NULL, // use the standard table as the main table
|
sl@0
|
60 |
&TheTlocl2_Table, // the locale values override the standard values
|
sl@0
|
61 |
0 // the flags are standard
|
sl@0
|
62 |
},
|
sl@0
|
63 |
{
|
sl@0
|
64 |
KUidBasicCollationMethod, // the standard unlocalised method
|
sl@0
|
65 |
NULL, // null means use the standard table
|
sl@0
|
66 |
NULL, // there's no override table
|
sl@0
|
67 |
0 // the flags are standard
|
sl@0
|
68 |
},
|
sl@0
|
69 |
{
|
sl@0
|
70 |
KUidTlocl_CollationMethod, // the method for the locale
|
sl@0
|
71 |
NULL, // use the standard table as the main table
|
sl@0
|
72 |
&TheTlocl_Table, // the locale values override the standard values
|
sl@0
|
73 |
TCollationMethod::EMatchingTable // add matching flag here
|
sl@0
|
74 |
}
|
sl@0
|
75 |
};
|
sl@0
|
76 |
|
sl@0
|
77 |
static const TCollationDataSet TheCollationDataSet =
|
sl@0
|
78 |
{
|
sl@0
|
79 |
TheCollationMethod,
|
sl@0
|
80 |
3
|
sl@0
|
81 |
};
|
sl@0
|
82 |
|
sl@0
|
83 |
// The one and only locale character set object.
|
sl@0
|
84 |
const LCharSet TheCharSet =
|
sl@0
|
85 |
{
|
sl@0
|
86 |
NULL,
|
sl@0
|
87 |
&TheCollationDataSet
|
sl@0
|
88 |
};
|