bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / svl / nfkeytab.hxx
blobfe1e3bb69ec5c0a2b2d3513fd3a14f7d096a657b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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
23 #include <vector>
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& );
32 // and method
33 // void SvNumberFormatter::FillKeywordTable( NfKeywordTable&, LanguageType );
34 enum NfKeywordIndex
36 NF_KEY_NONE = 0,
37 NF_KEY_E, // exponential symbol
38 NF_KEY_AMPM, // AM/PM
39 NF_KEY_AP, // a/p
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
47 NF_KEY_H, // hour
48 NF_KEY_HH, // hour 02
49 NF_KEY_S, // second
50 NF_KEY_SS, // second 02
51 NF_KEY_Q, // quarter
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
82 NF_KEY_FIRSTCOLOR,
83 NF_KEY_BLACK = NF_KEY_FIRSTCOLOR, // you do know colors, don't you?
84 NF_KEY_BLUE,
85 NF_KEY_GREEN,
86 NF_KEY_CYAN,
87 NF_KEY_RED,
88 NF_KEY_MAGENTA,
89 NF_KEY_BROWN,
90 NF_KEY_GREY,
91 NF_KEY_YELLOW,
92 NF_KEY_WHITE,
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;
103 public:
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;
118 return *this;
122 #endif // INCLUDED_SVL_NFKEYTAB_HXX
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */