1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SVL_NFKEYTAB_HXX
21 #define INCLUDED_SVL_NFKEYTAB_HXX
24 #include <rtl/ustring.hxx>
26 //! For ImpSvNumberformatScan: first the short symbols, then the long symbols!
27 //! e.g. first YY then YYYY
28 //! The internal order is essential for the format code string scanner.
30 // This table is externally only to be used with method
31 // OUString SvNumberformat::GetMappedFormatstring( const NfKeywordTable&, const LocaleDataWrapper& );
33 // void SvNumberFormatter::FillKeywordTable( NfKeywordTable&, LanguageType );
37 NF_KEY_E
, // exponential symbol
40 NF_KEY_MI
, // minute (!)
41 NF_KEY_MMI
, // minute 02 (!)
42 NF_KEY_M
, // month (!)
43 NF_KEY_MM
, // month 02 (!)
44 NF_KEY_MMM
, // month short name
45 NF_KEY_MMMM
, // month long name
46 NF_KEY_MMMMM
, // month narrow name, first letter
50 NF_KEY_SS
, // second 02
52 NF_KEY_QQ
, // quarter 02
53 NF_KEY_D
, // day of month
54 NF_KEY_DD
, // day of month 02
55 NF_KEY_DDD
, // day of week short
56 NF_KEY_DDDD
, // day of week long
57 NF_KEY_YY
, // year two digits
58 NF_KEY_YYYY
, // year four digits
59 NF_KEY_NN
, // day of week short
60 NF_KEY_NNN
, // day of week long without separator, as of version 6, 10.10.97
61 NF_KEY_NNNN
, // day of week long with separator
62 NF_KEY_AAA
, // abbreviated day name from Japanese Xcl, same as DDD or NN English
63 NF_KEY_AAAA
, // full day name from Japanese Xcl, same as DDDD or NNN English
64 NF_KEY_EC
, // E non-gregorian calendar year without preceding 0
65 NF_KEY_EEC
, // EE non-gregorian calendar year with preceding 0 (two digit)
66 NF_KEY_G
, // abbreviated era name, latin characters M T S or H for Gengou calendar
67 NF_KEY_GG
, // abbreviated era name
68 NF_KEY_GGG
, // full era name
69 NF_KEY_R
, // acts as EE (Xcl) => GR==GEE, GGR==GGEE, GGGR==GGGEE
70 NF_KEY_RR
, // acts as GGGEE (Xcl)
71 NF_KEY_WW
, // week of year, as of version 8, 19.06.98
72 NF_KEY_THAI_T
, // Thai T modifier, speciality of Thai Excel, only used with Thai locale and converted to [NatNum1]
73 NF_KEY_CCC
, // currency bank symbol (old version)
74 NF_KEY_GENERAL
, // General / Standard
75 NF_KEY_LASTKEYWORD
= NF_KEY_GENERAL
,
77 // Reserved words translated and color names follow:
78 NF_KEY_TRUE
, // boolean true
79 NF_KEY_FALSE
, // boolean false
80 NF_KEY_BOOLEAN
, // boolean
81 NF_KEY_COLOR
, // color
83 NF_KEY_BLACK
= NF_KEY_FIRSTCOLOR
, // you do know colors, don't you?
93 NF_KEY_LASTCOLOR
= NF_KEY_WHITE
,
95 NF_KEYWORD_ENTRIES_COUNT
98 class NfKeywordTable final
100 typedef ::std::vector
<OUString
> Keywords_t
;
101 Keywords_t m_keywords
;
104 NfKeywordTable() : m_keywords(NF_KEYWORD_ENTRIES_COUNT
) {};
105 NfKeywordTable( const std::initializer_list
<OUString
> & l
) : m_keywords(l
)
107 assert(m_keywords
.size() == NF_KEYWORD_ENTRIES_COUNT
);
110 OUString
& operator[] (Keywords_t::size_type n
) { return m_keywords
[n
]; }
111 const OUString
& operator[] (Keywords_t::size_type n
) const { return m_keywords
[n
]; }
113 Keywords_t::size_type
size() const { return m_keywords
.size(); }
115 NfKeywordTable
& operator=( const NfKeywordTable
& r
)
117 m_keywords
= r
.m_keywords
;
122 #endif // INCLUDED_SVL_NFKEYTAB_HXX
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */