pango 2.2.5-x64-mingw32 → 3.0.0-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +19 -3
- data/ext/pango/depend +0 -1
- data/ext/pango/extconf.rb +0 -2
- data/ext/pango/rbpango.c +44 -6
- data/ext/pango/rbpango.h +0 -1
- data/ext/pango/rbpangoattribute.c +2 -2
- data/ext/pango/rbpangocairo.c +4 -4
- data/ext/pango/rbpangocontext.c +2 -2
- data/ext/pango/rbpangofontdescription.c +2 -2
- data/ext/pango/rbpangogravity.c +2 -2
- data/ext/pango/rbpangolanguage.c +8 -0
- data/ext/pango/rbpangolayout.c +15 -4
- data/ext/pango/rbpangomatrix.c +2 -2
- data/ext/pango/rbpangoscript.c +3 -3
- data/lib/2.0/pango.so +0 -0
- data/lib/2.1/pango.so +0 -0
- data/lib/2.2/pango.so +0 -0
- data/test/test-language.rb +5 -0
- data/test/test-layout.rb +7 -1
- data/vendor/local/bin/derb.exe +0 -0
- data/vendor/local/bin/genbrk.exe +0 -0
- data/vendor/local/bin/genccode.exe +0 -0
- data/vendor/local/bin/gencfu.exe +0 -0
- data/vendor/local/bin/gencmn.exe +0 -0
- data/vendor/local/bin/gencnval.exe +0 -0
- data/vendor/local/bin/gendict.exe +0 -0
- data/vendor/local/bin/gennorm2.exe +0 -0
- data/vendor/local/bin/genrb.exe +0 -0
- data/vendor/local/bin/gensprep.exe +0 -0
- data/vendor/local/bin/hb-ot-shape-closure.exe +0 -0
- data/vendor/local/bin/hb-shape.exe +0 -0
- data/vendor/local/bin/hb-view.exe +0 -0
- data/vendor/local/bin/icu-config +6 -6
- data/vendor/local/bin/icuinfo.exe +0 -0
- data/vendor/local/bin/icupkg.exe +0 -0
- data/vendor/local/bin/libharfbuzz-0.dll +0 -0
- data/vendor/local/bin/libpango-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangocairo-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangoft2-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangowin32-1.0-0.dll +0 -0
- data/vendor/local/bin/makeconv.exe +0 -0
- data/vendor/local/bin/pango-querymodules.exe +0 -0
- data/vendor/local/bin/pango-view.exe +0 -0
- data/vendor/local/bin/pkgdata.exe +0 -0
- data/vendor/local/bin/uconv.exe +0 -0
- data/vendor/local/etc/pango/pango.modules +1 -1
- data/vendor/local/include/harfbuzz/hb-buffer.h +26 -1
- data/vendor/local/include/harfbuzz/hb-common.h +7 -0
- data/vendor/local/include/harfbuzz/hb-font.h +7 -6
- data/vendor/local/include/harfbuzz/hb-ft.h +58 -1
- data/vendor/local/include/harfbuzz/hb-glib.h +3 -0
- data/vendor/local/include/harfbuzz/hb-ot-font.h +4 -0
- data/vendor/local/include/harfbuzz/hb-shape.h +0 -3
- data/vendor/local/include/harfbuzz/hb-unicode.h +28 -3
- data/vendor/local/include/harfbuzz/hb-version.h +4 -4
- data/vendor/local/include/layout/LEFontInstance.h +2 -28
- data/vendor/local/include/layout/LETableReference.h +7 -2
- data/vendor/local/include/unicode/calendar.h +32 -2
- data/vendor/local/include/unicode/coll.h +9 -7
- data/vendor/local/include/unicode/datefmt.h +102 -13
- data/vendor/local/include/unicode/dcfmtsym.h +4 -2
- data/vendor/local/include/unicode/decimfmt.h +4 -5
- data/vendor/local/include/unicode/dtfmtsym.h +60 -1
- data/vendor/local/include/unicode/dtptngen.h +21 -7
- data/vendor/local/include/unicode/localpointer.h +49 -1
- data/vendor/local/include/unicode/locid.h +2 -3
- data/vendor/local/include/unicode/measfmt.h +30 -37
- data/vendor/local/include/unicode/measunit.h +65 -152
- data/vendor/local/include/unicode/measure.h +3 -3
- data/vendor/local/include/unicode/numfmt.h +3 -5
- data/vendor/local/include/unicode/platform.h +12 -2
- data/vendor/local/include/unicode/plurrule.h +18 -14
- data/vendor/local/include/unicode/rbnf.h +3 -4
- data/vendor/local/include/unicode/regex.h +42 -26
- data/vendor/local/include/unicode/region.h +9 -9
- data/vendor/local/include/unicode/reldatefmt.h +50 -45
- data/vendor/local/include/unicode/scientificnumberformatter.h +222 -0
- data/vendor/local/include/unicode/smpdtfmt.h +30 -24
- data/vendor/local/include/unicode/tblcoll.h +5 -4
- data/vendor/local/include/unicode/timezone.h +18 -1
- data/vendor/local/include/unicode/ucal.h +2 -2
- data/vendor/local/include/unicode/ucol.h +22 -18
- data/vendor/local/include/unicode/uconfig.h +17 -2
- data/vendor/local/include/unicode/udat.h +164 -56
- data/vendor/local/include/unicode/udatpg.h +9 -7
- data/vendor/local/include/unicode/ufieldpositer.h +121 -0
- data/vendor/local/include/unicode/uidna.h +21 -13
- data/vendor/local/include/unicode/ulistformatter.h +130 -0
- data/vendor/local/include/unicode/ulocdata.h +4 -3
- data/vendor/local/include/unicode/unistr.h +101 -53
- data/vendor/local/include/unicode/unum.h +7 -10
- data/vendor/local/include/unicode/uregex.h +52 -29
- data/vendor/local/include/unicode/urename.h +14 -3
- data/vendor/local/include/unicode/uscript.h +30 -16
- data/vendor/local/include/unicode/uspoof.h +13 -9
- data/vendor/local/include/unicode/utrans.h +5 -7
- data/vendor/local/include/unicode/utypes.h +9 -3
- data/vendor/local/include/unicode/uvernum.h +8 -8
- data/vendor/local/lib/icu/{54.1 → 55.1}/Makefile.inc +5 -5
- data/vendor/local/lib/icu/{54.1 → 55.1}/pkgdata.inc +1 -1
- data/vendor/local/lib/icu/Makefile.inc +5 -5
- data/vendor/local/lib/icu/pkgdata.inc +1 -1
- data/vendor/local/lib/icudt.dll +0 -0
- data/vendor/local/lib/{icudt54.dll → icudt55.dll} +0 -0
- data/vendor/local/lib/icuin.dll +0 -0
- data/vendor/local/lib/icuin55.dll +0 -0
- data/vendor/local/lib/icuio.dll +0 -0
- data/vendor/local/lib/icuio55.dll +0 -0
- data/vendor/local/lib/icule.dll +0 -0
- data/vendor/local/lib/icule55.dll +0 -0
- data/vendor/local/lib/iculx.dll +0 -0
- data/vendor/local/lib/iculx55.dll +0 -0
- data/vendor/local/lib/icutest.dll +0 -0
- data/vendor/local/lib/icutest55.dll +0 -0
- data/vendor/local/lib/icutu.dll +0 -0
- data/vendor/local/lib/icutu55.dll +0 -0
- data/vendor/local/lib/icuuc.dll +0 -0
- data/vendor/local/lib/icuuc55.dll +0 -0
- data/vendor/local/lib/libharfbuzz-icu.a +0 -0
- data/vendor/local/lib/libharfbuzz-icu.la +7 -7
- data/vendor/local/lib/libharfbuzz.dll.a +0 -0
- data/vendor/local/lib/libharfbuzz.la +7 -7
- data/vendor/local/lib/libicudt.dll.a +0 -0
- data/vendor/local/lib/libicuin.dll.a +0 -0
- data/vendor/local/lib/libicuio.dll.a +0 -0
- data/vendor/local/lib/libicule.dll.a +0 -0
- data/vendor/local/lib/libiculx.dll.a +0 -0
- data/vendor/local/lib/libicutest.dll.a +0 -0
- data/vendor/local/lib/libicutu.dll.a +0 -0
- data/vendor/local/lib/libicuuc.dll.a +0 -0
- data/vendor/local/lib/libpango-1.0.dll.a +0 -0
- data/vendor/local/lib/libpango-1.0.la +2 -2
- data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangocairo-1.0.la +1 -1
- data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangoft2-1.0.la +2 -2
- data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangowin32-1.0.la +2 -2
- data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll.a +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.la +2 -2
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll.a +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.la +2 -2
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll.a +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.la +2 -2
- data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll.a +0 -0
- data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.la +2 -2
- data/vendor/local/lib/pkgconfig/harfbuzz-icu.pc +1 -1
- data/vendor/local/lib/pkgconfig/harfbuzz.pc +3 -1
- data/vendor/local/lib/pkgconfig/icu-i18n.pc +5 -5
- data/vendor/local/lib/pkgconfig/icu-io.pc +5 -5
- data/vendor/local/lib/pkgconfig/icu-le.pc +5 -5
- data/vendor/local/lib/pkgconfig/icu-lx.pc +5 -5
- data/vendor/local/lib/pkgconfig/icu-uc.pc +5 -5
- data/vendor/local/share/gtk-doc/html/harfbuzz/adding-text-to-the-buffer.html +35 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/annotation-glossary.html +30 -35
- data/vendor/local/share/gtk-doc/html/harfbuzz/api-index-full.html +158 -27
- data/vendor/local/share/gtk-doc/html/harfbuzz/buffers-language-script-and-direction.html +87 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/{ch01.html → ch06.html} +12 -13
- data/vendor/local/share/gtk-doc/html/harfbuzz/customizing-unicode-functions.html +31 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/deprecated-api-index.html +7 -8
- data/vendor/local/share/gtk-doc/html/harfbuzz/fonts-and-faces.html +40 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-Shaping.html +352 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-blob.html +88 -47
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-buffer.html +128 -204
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-common.html +290 -304
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-coretext.html +14 -23
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-deprecated.html +14 -17
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-face.html +40 -51
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-font.html +126 -190
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ft.html +19 -24
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-glib.html +14 -29
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-gobject.html +438 -11
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-graphite2.html +14 -25
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-icu.html +14 -29
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-layout.html +19 -160
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-tag.html +21 -36
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot.html +14 -11
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-set.html +70 -81
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape-plan.html +33 -44
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-unicode.html +290 -323
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-uniscribe.html +14 -23
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-version.html +59 -27
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb.html +16 -13
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz.devhelp2 +415 -104
- data/vendor/local/share/gtk-doc/html/harfbuzz/hello-harfbuzz.html +181 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/index.html +43 -12
- data/vendor/local/share/gtk-doc/html/harfbuzz/object-tree.html +11 -13
- data/vendor/local/share/gtk-doc/html/harfbuzz/plans-and-caching.html +31 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/pt01.html +70 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/pt02.html +107 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/setting-buffer-properties.html +31 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/shaping-and-shape-plans.html +39 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/style.css +9 -6
- data/vendor/local/share/gtk-doc/html/harfbuzz/using-harfbuzzs-native-opentype-implementation.html +31 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/using-your-own-font-functions.html +31 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/what-about-the-other-scripts.html +31 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/what-is-harfbuzz.html +124 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/why-is-it-called-harfbuzz.html +38 -0
- data/vendor/local/share/icu/{54.1 → 55.1}/config/mh-mingw64 +0 -0
- data/vendor/local/share/icu/{54.1 → 55.1}/install-sh +0 -0
- data/vendor/local/share/icu/{54.1 → 55.1}/license.html +3 -4
- data/vendor/local/share/icu/{54.1 → 55.1}/mkinstalldirs +0 -0
- data/vendor/local/share/man/man1/derb.1 +2 -2
- data/vendor/local/share/man/man1/genbrk.1 +2 -2
- data/vendor/local/share/man/man1/gencfu.1 +1 -1
- data/vendor/local/share/man/man1/gencnval.1 +3 -3
- data/vendor/local/share/man/man1/gendict.1 +2 -2
- data/vendor/local/share/man/man1/genrb.1 +3 -3
- data/vendor/local/share/man/man1/icu-config.1 +2 -2
- data/vendor/local/share/man/man1/makeconv.1 +3 -3
- data/vendor/local/share/man/man1/pkgdata.1 +2 -2
- data/vendor/local/share/man/man1/uconv.1 +2 -2
- data/vendor/local/share/man/man8/genccode.8 +2 -2
- data/vendor/local/share/man/man8/gencmn.8 +3 -3
- data/vendor/local/share/man/man8/gensprep.8 +3 -3
- data/vendor/local/share/man/man8/icupkg.8 +1 -1
- metadata +38 -22
- data/vendor/local/include/unicode/scientificformathelper.h +0 -139
- data/vendor/local/lib/icuin54.dll +0 -0
- data/vendor/local/lib/icuio54.dll +0 -0
- data/vendor/local/lib/icule54.dll +0 -0
- data/vendor/local/lib/iculx54.dll +0 -0
- data/vendor/local/lib/icutest54.dll +0 -0
- data/vendor/local/lib/icutu54.dll +0 -0
- data/vendor/local/lib/icuuc54.dll +0 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape.html +0 -286
- data/vendor/local/share/gtk-doc/html/harfbuzz/index.sgml +0 -496
@@ -0,0 +1,222 @@
|
|
1
|
+
/*
|
2
|
+
**********************************************************************
|
3
|
+
* Copyright (c) 2014, International Business Machines
|
4
|
+
* Corporation and others. All Rights Reserved.
|
5
|
+
**********************************************************************
|
6
|
+
*/
|
7
|
+
#ifndef SCINUMBERFORMATTER_H
|
8
|
+
#define SCINUMBERFORMATTER_H
|
9
|
+
|
10
|
+
#include "unicode/utypes.h"
|
11
|
+
|
12
|
+
#if !UCONFIG_NO_FORMATTING
|
13
|
+
|
14
|
+
#ifndef U_HIDE_DRAFT_API
|
15
|
+
|
16
|
+
#include "unicode/unistr.h"
|
17
|
+
|
18
|
+
/**
|
19
|
+
* \file
|
20
|
+
* \brief C++ API: Formats in scientific notation.
|
21
|
+
*/
|
22
|
+
|
23
|
+
U_NAMESPACE_BEGIN
|
24
|
+
|
25
|
+
class FieldPositionIterator;
|
26
|
+
class DecimalFormatStaticSets;
|
27
|
+
class DecimalFormatSymbols;
|
28
|
+
class DecimalFormat;
|
29
|
+
class Formattable;
|
30
|
+
|
31
|
+
/**
|
32
|
+
* A formatter that formats numbers in user-friendly scientific notation.
|
33
|
+
*
|
34
|
+
* Sample code:
|
35
|
+
* <pre>
|
36
|
+
* UErrorCode status = U_ZERO_ERROR;
|
37
|
+
* LocalPointer<ScientificNumberFormatter> fmt(
|
38
|
+
* ScientificNumberFormatter::createMarkupInstance(
|
39
|
+
* "en", "<sup>", "</sup>", status));
|
40
|
+
* if (U_FAILURE(status)) {
|
41
|
+
* return;
|
42
|
+
* }
|
43
|
+
* UnicodeString appendTo;
|
44
|
+
* // appendTo = "1.23456x10<sup>-78</sup>"
|
45
|
+
* fmt->format(1.23456e-78, appendTo, status);
|
46
|
+
* </pre>
|
47
|
+
*
|
48
|
+
* @draft ICU 55
|
49
|
+
*/
|
50
|
+
class U_I18N_API ScientificNumberFormatter : public UObject {
|
51
|
+
public:
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Creates a ScientificNumberFormatter instance that uses
|
55
|
+
* superscript characters for exponents.
|
56
|
+
* @param fmtToAdopt The DecimalFormat which must be configured for
|
57
|
+
* scientific notation.
|
58
|
+
* @param status error returned here.
|
59
|
+
* @return The new ScientificNumberFormatter instance.
|
60
|
+
*
|
61
|
+
* @draft ICU 55
|
62
|
+
*/
|
63
|
+
static ScientificNumberFormatter *createSuperscriptInstance(
|
64
|
+
DecimalFormat *fmtToAdopt, UErrorCode &status);
|
65
|
+
|
66
|
+
/**
|
67
|
+
* Creates a ScientificNumberFormatter instance that uses
|
68
|
+
* superscript characters for exponents for this locale.
|
69
|
+
* @param locale The locale
|
70
|
+
* @param status error returned here.
|
71
|
+
* @return The ScientificNumberFormatter instance.
|
72
|
+
*
|
73
|
+
* @draft ICU 55
|
74
|
+
*/
|
75
|
+
static ScientificNumberFormatter *createSuperscriptInstance(
|
76
|
+
const Locale &locale, UErrorCode &status);
|
77
|
+
|
78
|
+
|
79
|
+
/**
|
80
|
+
* Creates a ScientificNumberFormatter instance that uses
|
81
|
+
* markup for exponents.
|
82
|
+
* @param fmtToAdopt The DecimalFormat which must be configured for
|
83
|
+
* scientific notation.
|
84
|
+
* @param beginMarkup the markup to start superscript.
|
85
|
+
* @param endMarkup the markup to end superscript.
|
86
|
+
* @param status error returned here.
|
87
|
+
* @return The new ScientificNumberFormatter instance.
|
88
|
+
*
|
89
|
+
* @draft ICU 55
|
90
|
+
*/
|
91
|
+
static ScientificNumberFormatter *createMarkupInstance(
|
92
|
+
DecimalFormat *fmtToAdopt,
|
93
|
+
const UnicodeString &beginMarkup,
|
94
|
+
const UnicodeString &endMarkup,
|
95
|
+
UErrorCode &status);
|
96
|
+
|
97
|
+
/**
|
98
|
+
* Creates a ScientificNumberFormatter instance that uses
|
99
|
+
* markup for exponents for this locale.
|
100
|
+
* @param locale The locale
|
101
|
+
* @param beginMarkup the markup to start superscript.
|
102
|
+
* @param endMarkup the markup to end superscript.
|
103
|
+
* @param status error returned here.
|
104
|
+
* @return The ScientificNumberFormatter instance.
|
105
|
+
*
|
106
|
+
* @draft ICU 55
|
107
|
+
*/
|
108
|
+
static ScientificNumberFormatter *createMarkupInstance(
|
109
|
+
const Locale &locale,
|
110
|
+
const UnicodeString &beginMarkup,
|
111
|
+
const UnicodeString &endMarkup,
|
112
|
+
UErrorCode &status);
|
113
|
+
|
114
|
+
|
115
|
+
/**
|
116
|
+
* Returns a copy of this object. Caller must free returned copy.
|
117
|
+
* @draft ICU 55
|
118
|
+
*/
|
119
|
+
ScientificNumberFormatter *clone() const {
|
120
|
+
return new ScientificNumberFormatter(*this);
|
121
|
+
}
|
122
|
+
|
123
|
+
/**
|
124
|
+
* Destructor.
|
125
|
+
* @draft ICU 55
|
126
|
+
*/
|
127
|
+
virtual ~ScientificNumberFormatter();
|
128
|
+
|
129
|
+
/**
|
130
|
+
* Formats a number into user friendly scientific notation.
|
131
|
+
*
|
132
|
+
* @param number the number to format.
|
133
|
+
* @param appendTo formatted string appended here.
|
134
|
+
* @param status any error returned here.
|
135
|
+
* @return appendTo
|
136
|
+
*
|
137
|
+
* @draft ICU 55
|
138
|
+
*/
|
139
|
+
UnicodeString &format(
|
140
|
+
const Formattable &number,
|
141
|
+
UnicodeString &appendTo,
|
142
|
+
UErrorCode &status) const;
|
143
|
+
private:
|
144
|
+
class U_I18N_API Style : public UObject {
|
145
|
+
public:
|
146
|
+
virtual Style *clone() const = 0;
|
147
|
+
protected:
|
148
|
+
virtual UnicodeString &format(
|
149
|
+
const UnicodeString &original,
|
150
|
+
FieldPositionIterator &fpi,
|
151
|
+
const UnicodeString &preExponent,
|
152
|
+
const DecimalFormatStaticSets &decimalFormatSets,
|
153
|
+
UnicodeString &appendTo,
|
154
|
+
UErrorCode &status) const = 0;
|
155
|
+
private:
|
156
|
+
friend class ScientificNumberFormatter;
|
157
|
+
};
|
158
|
+
|
159
|
+
class U_I18N_API SuperscriptStyle : public Style {
|
160
|
+
public:
|
161
|
+
virtual Style *clone() const;
|
162
|
+
protected:
|
163
|
+
virtual UnicodeString &format(
|
164
|
+
const UnicodeString &original,
|
165
|
+
FieldPositionIterator &fpi,
|
166
|
+
const UnicodeString &preExponent,
|
167
|
+
const DecimalFormatStaticSets &decimalFormatSets,
|
168
|
+
UnicodeString &appendTo,
|
169
|
+
UErrorCode &status) const;
|
170
|
+
};
|
171
|
+
|
172
|
+
class U_I18N_API MarkupStyle : public Style {
|
173
|
+
public:
|
174
|
+
MarkupStyle(
|
175
|
+
const UnicodeString &beginMarkup,
|
176
|
+
const UnicodeString &endMarkup)
|
177
|
+
: Style(),
|
178
|
+
fBeginMarkup(beginMarkup),
|
179
|
+
fEndMarkup(endMarkup) { }
|
180
|
+
virtual Style *clone() const;
|
181
|
+
protected:
|
182
|
+
virtual UnicodeString &format(
|
183
|
+
const UnicodeString &original,
|
184
|
+
FieldPositionIterator &fpi,
|
185
|
+
const UnicodeString &preExponent,
|
186
|
+
const DecimalFormatStaticSets &decimalFormatSets,
|
187
|
+
UnicodeString &appendTo,
|
188
|
+
UErrorCode &status) const;
|
189
|
+
private:
|
190
|
+
UnicodeString fBeginMarkup;
|
191
|
+
UnicodeString fEndMarkup;
|
192
|
+
};
|
193
|
+
|
194
|
+
ScientificNumberFormatter(
|
195
|
+
DecimalFormat *fmtToAdopt,
|
196
|
+
Style *styleToAdopt,
|
197
|
+
UErrorCode &status);
|
198
|
+
|
199
|
+
ScientificNumberFormatter(const ScientificNumberFormatter &other);
|
200
|
+
ScientificNumberFormatter &operator=(const ScientificNumberFormatter &);
|
201
|
+
|
202
|
+
static void getPreExponent(
|
203
|
+
const DecimalFormatSymbols &dfs, UnicodeString &preExponent);
|
204
|
+
|
205
|
+
static ScientificNumberFormatter *createInstance(
|
206
|
+
DecimalFormat *fmtToAdopt,
|
207
|
+
Style *styleToAdopt,
|
208
|
+
UErrorCode &status);
|
209
|
+
|
210
|
+
UnicodeString fPreExponent;
|
211
|
+
DecimalFormat *fDecimalFormat;
|
212
|
+
Style *fStyle;
|
213
|
+
const DecimalFormatStaticSets *fStaticSets;
|
214
|
+
|
215
|
+
};
|
216
|
+
|
217
|
+
U_NAMESPACE_END
|
218
|
+
|
219
|
+
#endif /* U_HIDE_DRAFT_API */
|
220
|
+
|
221
|
+
#endif /* !UCONFIG_NO_FORMATTING */
|
222
|
+
#endif
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright (C) 1997-
|
2
|
+
* Copyright (C) 1997-2015, International Business Machines Corporation and
|
3
3
|
* others. All Rights Reserved.
|
4
4
|
*******************************************************************************
|
5
5
|
*
|
@@ -45,6 +45,8 @@ class DateFormat;
|
|
45
45
|
class MessageFormat;
|
46
46
|
class FieldPositionHandler;
|
47
47
|
class TimeZoneFormat;
|
48
|
+
class SharedNumberFormat;
|
49
|
+
class SimpleDateFormatMutableNFs;
|
48
50
|
|
49
51
|
/**
|
50
52
|
*
|
@@ -1117,7 +1119,6 @@ public:
|
|
1117
1119
|
*/
|
1118
1120
|
virtual const TimeZoneFormat* getTimeZoneFormat(void) const;
|
1119
1121
|
|
1120
|
-
/* Cannot use #ifndef U_HIDE_DRAFT_API for the following draft method since it is virtual */
|
1121
1122
|
/**
|
1122
1123
|
* Set a particular UDisplayContext value in the formatter, such as
|
1123
1124
|
* UDISPCTX_CAPITALIZATION_FOR_STANDALONE. Note: For getContext, see
|
@@ -1126,7 +1127,7 @@ public:
|
|
1126
1127
|
* @param status Input/output status. If at entry this indicates a failure
|
1127
1128
|
* status, the function will do nothing; otherwise this will be
|
1128
1129
|
* updated with any new status from the function.
|
1129
|
-
* @
|
1130
|
+
* @stable ICU 53
|
1130
1131
|
*/
|
1131
1132
|
virtual void setContext(UDisplayContext value, UErrorCode& status);
|
1132
1133
|
|
@@ -1261,6 +1262,7 @@ private:
|
|
1261
1262
|
int32_t fieldNum,
|
1262
1263
|
FieldPositionHandler& handler,
|
1263
1264
|
Calendar& cal,
|
1265
|
+
SimpleDateFormatMutableNFs &mutableNFs,
|
1264
1266
|
UErrorCode& status) const; // in case of illegal argument
|
1265
1267
|
|
1266
1268
|
/**
|
@@ -1307,14 +1309,6 @@ private:
|
|
1307
1309
|
*/
|
1308
1310
|
Calendar *initializeCalendar(TimeZone* adoptZone, const Locale& locale, UErrorCode& status);
|
1309
1311
|
|
1310
|
-
/**
|
1311
|
-
* initializes fSymbols from parameters.
|
1312
|
-
* @param locale Locale of the symbols
|
1313
|
-
* @param calendar Alias to Calendar that will be used.
|
1314
|
-
* @param status Error code
|
1315
|
-
*/
|
1316
|
-
void initializeSymbols(const Locale& locale, Calendar* calendar, UErrorCode& status);
|
1317
|
-
|
1318
1312
|
/**
|
1319
1313
|
* Called by several of the constructors to load pattern data and formatting symbols
|
1320
1314
|
* out of a resource bundle and initialize the locale based on it.
|
@@ -1407,7 +1401,7 @@ private:
|
|
1407
1401
|
*/
|
1408
1402
|
int32_t subParse(const UnicodeString& text, int32_t& start, UChar ch, int32_t count,
|
1409
1403
|
UBool obeyCount, UBool allowNegative, UBool ambiguousYear[], int32_t& saveHebrewMonth, Calendar& cal,
|
1410
|
-
int32_t patLoc, MessageFormat * numericLeapMonthFormatter, UTimeZoneFormatTimeType *tzTimeType) const;
|
1404
|
+
int32_t patLoc, MessageFormat * numericLeapMonthFormatter, UTimeZoneFormatTimeType *tzTimeType, SimpleDateFormatMutableNFs &mutableNFs) const;
|
1411
1405
|
|
1412
1406
|
void parseInt(const UnicodeString& text,
|
1413
1407
|
Formattable& number,
|
@@ -1482,11 +1476,6 @@ private:
|
|
1482
1476
|
*/
|
1483
1477
|
void initNumberFormatters(const Locale &locale,UErrorCode &status);
|
1484
1478
|
|
1485
|
-
/**
|
1486
|
-
* Get the numbering system to be used for a particular field.
|
1487
|
-
*/
|
1488
|
-
NumberFormat * getNumberFormatByIndex(UDateFormatField index) const;
|
1489
|
-
|
1490
1479
|
/**
|
1491
1480
|
* Parse the given override string and set up structures for number formats
|
1492
1481
|
*/
|
@@ -1507,6 +1496,8 @@ private:
|
|
1507
1496
|
*/
|
1508
1497
|
TimeZoneFormat *tzFormat() const;
|
1509
1498
|
|
1499
|
+
const NumberFormat* getNumberFormatByIndex(UDateFormatField index) const;
|
1500
|
+
|
1510
1501
|
/**
|
1511
1502
|
* Used to map Calendar field to field level.
|
1512
1503
|
* The larger the level, the smaller the field unit.
|
@@ -1514,7 +1505,16 @@ private:
|
|
1514
1505
|
* UCAL_MONTH level is 20.
|
1515
1506
|
*/
|
1516
1507
|
static const int32_t fgCalendarFieldToLevel[];
|
1517
|
-
|
1508
|
+
|
1509
|
+
/**
|
1510
|
+
* Map calendar field letter into calendar field level.
|
1511
|
+
*/
|
1512
|
+
static int32_t getLevelFromChar(UChar ch);
|
1513
|
+
|
1514
|
+
/**
|
1515
|
+
* Tell if a character can be used to define a field in a format string.
|
1516
|
+
*/
|
1517
|
+
static UBool isSyntaxChar(UChar ch);
|
1518
1518
|
|
1519
1519
|
/**
|
1520
1520
|
* The formatting pattern for this formatter.
|
@@ -1563,15 +1563,21 @@ private:
|
|
1563
1563
|
*/
|
1564
1564
|
/*transient*/ int32_t fDefaultCenturyStartYear;
|
1565
1565
|
|
1566
|
-
|
1567
|
-
|
1566
|
+
struct NSOverride : public UMemory {
|
1567
|
+
const SharedNumberFormat *snf;
|
1568
1568
|
int32_t hash;
|
1569
1569
|
NSOverride *next;
|
1570
|
-
|
1571
|
-
|
1572
|
-
|
1570
|
+
void free();
|
1571
|
+
NSOverride() : snf(NULL), hash(0), next(NULL) {
|
1572
|
+
}
|
1573
|
+
~NSOverride();
|
1574
|
+
};
|
1573
1575
|
|
1574
|
-
|
1576
|
+
/**
|
1577
|
+
* The number format in use for each date field. NULL means fall back
|
1578
|
+
* to fNumberFormat in DateFormat.
|
1579
|
+
*/
|
1580
|
+
const SharedNumberFormat **fSharedNumberFormatters;
|
1575
1581
|
|
1576
1582
|
UBool fHaveDefaultCentury;
|
1577
1583
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
******************************************************************************
|
3
|
-
* Copyright (C) 1996-
|
3
|
+
* Copyright (C) 1996-2015, International Business Machines Corporation and
|
4
4
|
* others. All Rights Reserved.
|
5
5
|
******************************************************************************
|
6
6
|
*/
|
@@ -531,7 +531,7 @@ public:
|
|
531
531
|
* function chaining. (See User Guide for details.)
|
532
532
|
* @return *this
|
533
533
|
* @see getMaxVariable
|
534
|
-
* @
|
534
|
+
* @stable ICU 53
|
535
535
|
*/
|
536
536
|
virtual Collator &setMaxVariable(UColReorderCode group, UErrorCode &errorCode);
|
537
537
|
|
@@ -539,7 +539,7 @@ public:
|
|
539
539
|
* Returns the maximum reordering group whose characters are affected by UCOL_ALTERNATE_HANDLING.
|
540
540
|
* @return the maximum variable reordering group.
|
541
541
|
* @see setMaxVariable
|
542
|
-
* @
|
542
|
+
* @stable ICU 53
|
543
543
|
*/
|
544
544
|
virtual UColReorderCode getMaxVariable() const;
|
545
545
|
|
@@ -651,7 +651,7 @@ public:
|
|
651
651
|
* Retrieves the reordering codes for this collator.
|
652
652
|
* @param dest The array to fill with the script ordering.
|
653
653
|
* @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function
|
654
|
-
* will only return the length of the result without writing any
|
654
|
+
* will only return the length of the result without writing any codes (pre-flighting).
|
655
655
|
* @param status A reference to an error code value, which must not indicate
|
656
656
|
* a failure before the function call.
|
657
657
|
* @return The length of the script ordering array.
|
@@ -670,6 +670,7 @@ public:
|
|
670
670
|
* length is also set to 0. An empty array will clear any reordering codes on the collator.
|
671
671
|
* @param reorderCodesLength The length of reorderCodes.
|
672
672
|
* @param status error code
|
673
|
+
* @see ucol_setReorderCodes
|
673
674
|
* @see Collator#getReorderCodes
|
674
675
|
* @see Collator#getEquivalentReorderCodes
|
675
676
|
* @stable ICU 4.8
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*************************************************************************
|
2
|
-
* Copyright (c) 1997-
|
2
|
+
* Copyright (c) 1997-2015, International Business Machines Corporation
|
3
3
|
* and others. All Rights Reserved.
|
4
4
|
**************************************************************************
|
5
5
|
*
|
@@ -273,6 +273,23 @@ public:
|
|
273
273
|
static const UnicodeString U_EXPORT2 getEquivalentID(const UnicodeString& id,
|
274
274
|
int32_t index);
|
275
275
|
|
276
|
+
#ifndef U_HIDE_DRAFT_API
|
277
|
+
/**
|
278
|
+
* Creates an instance of TimeZone detected from the current host
|
279
|
+
* system configuration. Note that ICU4C does not change the default
|
280
|
+
* time zone unless TimeZone::adoptDefault(TimeZone*) or
|
281
|
+
* TimeZone::setDefault(const TimeZone&) is explicitly called by a
|
282
|
+
* user. This method does not update the current ICU's default,
|
283
|
+
* and may return a different TimeZone from the one returned by
|
284
|
+
* TimeZone::createDefault().
|
285
|
+
*
|
286
|
+
* @return A new instance of TimeZone detected from the current host system
|
287
|
+
* configuration.
|
288
|
+
* @draft ICU 55
|
289
|
+
*/
|
290
|
+
static TimeZone* U_EXPORT2 detectHostTimeZone();
|
291
|
+
#endif
|
292
|
+
|
276
293
|
/**
|
277
294
|
* Creates a new copy of the default TimeZone for this host. Unless the default time
|
278
295
|
* zone has already been set using adoptDefault() or setDefault(), the default is
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
*******************************************************************************
|
3
|
-
* Copyright (C) 1996-
|
3
|
+
* Copyright (C) 1996-2015, International Business Machines Corporation and
|
4
4
|
* others. All Rights Reserved.
|
5
5
|
*******************************************************************************
|
6
6
|
*/
|
@@ -422,7 +422,7 @@ enum UCalendarDateFields {
|
|
422
422
|
* an example of this.
|
423
423
|
*/
|
424
424
|
UCAL_IS_LEAP_MONTH,
|
425
|
-
|
425
|
+
|
426
426
|
/**
|
427
427
|
* Field count
|
428
428
|
* @stable ICU 2.6
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
*******************************************************************************
|
3
|
-
* Copyright (c) 1996-
|
3
|
+
* Copyright (c) 1996-2015, International Business Machines Corporation and others.
|
4
4
|
* All Rights Reserved.
|
5
5
|
*******************************************************************************
|
6
6
|
*/
|
@@ -685,7 +685,7 @@ ucol_setStrength(UCollator *coll,
|
|
685
685
|
* @param coll The UCollator to query.
|
686
686
|
* @param dest The array to fill with the script ordering.
|
687
687
|
* @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function
|
688
|
-
* will only return the length of the result without writing any
|
688
|
+
* will only return the length of the result without writing any codes (pre-flighting).
|
689
689
|
* @param pErrorCode Must be a valid pointer to an error code value, which must not indicate a
|
690
690
|
* failure before the function call.
|
691
691
|
* @return The number of reordering codes written to the dest array.
|
@@ -702,27 +702,32 @@ ucol_getReorderCodes(const UCollator* coll,
|
|
702
702
|
UErrorCode *pErrorCode);
|
703
703
|
/**
|
704
704
|
* Sets the reordering codes for this collator.
|
705
|
-
* Collation reordering allows scripts and some other
|
706
|
-
* to be moved relative to each other
|
705
|
+
* Collation reordering allows scripts and some other groups of characters
|
706
|
+
* to be moved relative to each other. This reordering is done on top of
|
707
707
|
* the DUCET/CLDR standard collation order. Reordering can specify groups to be placed
|
708
708
|
* at the start and/or the end of the collation order. These groups are specified using
|
709
709
|
* UScript codes and UColReorderCode entries.
|
710
|
+
*
|
710
711
|
* <p>By default, reordering codes specified for the start of the order are placed in the
|
711
|
-
* order given after
|
712
|
+
* order given after several special non-script blocks. These special groups of characters
|
712
713
|
* are space, punctuation, symbol, currency, and digit. These special groups are represented with
|
713
714
|
* UColReorderCode entries. Script groups can be intermingled with
|
714
|
-
* these special non-script
|
715
|
+
* these special non-script groups if those special groups are explicitly specified in the reordering.
|
716
|
+
*
|
715
717
|
* <p>The special code OTHERS stands for any script that is not explicitly
|
716
718
|
* mentioned in the list of reordering codes given. Anything that is after OTHERS
|
717
719
|
* will go at the very end of the reordering in the order given.
|
720
|
+
*
|
718
721
|
* <p>The special reorder code DEFAULT will reset the reordering for this collator
|
719
722
|
* to the default for this collator. The default reordering may be the DUCET/CLDR order or may be a reordering that
|
720
723
|
* was specified when this collator was created from resource data or from rules. The
|
721
|
-
* DEFAULT code <b>must</b> be the sole code supplied when it used.
|
722
|
-
*
|
724
|
+
* DEFAULT code <b>must</b> be the sole code supplied when it is used.
|
725
|
+
* If not, then U_ILLEGAL_ARGUMENT_ERROR will be set.
|
726
|
+
*
|
723
727
|
* <p>The special reorder code NONE will remove any reordering for this collator.
|
724
728
|
* The result of setting no reordering will be to have the DUCET/CLDR ordering used. The
|
725
|
-
* NONE code <b>must</b> be the sole code supplied when it used.
|
729
|
+
* NONE code <b>must</b> be the sole code supplied when it is used.
|
730
|
+
*
|
726
731
|
* @param coll The UCollator to set.
|
727
732
|
* @param reorderCodes An array of script codes in the new order. This can be NULL if the
|
728
733
|
* length is also set to 0. An empty array will clear any reordering codes on the collator.
|
@@ -744,10 +749,13 @@ ucol_setReorderCodes(UCollator* coll,
|
|
744
749
|
/**
|
745
750
|
* Retrieves the reorder codes that are grouped with the given reorder code. Some reorder
|
746
751
|
* codes will be grouped and must reorder together.
|
752
|
+
* Beginning with ICU 55, scripts only reorder together if they are primary-equal,
|
753
|
+
* for example Hiragana and Katakana.
|
754
|
+
*
|
747
755
|
* @param reorderCode The reorder code to determine equivalence for.
|
748
756
|
* @param dest The array to fill with the script ordering.
|
749
757
|
* @param destCapacity The length of dest. If it is 0, then dest may be NULL and the function
|
750
|
-
* will only return the length of the result without writing any
|
758
|
+
* will only return the length of the result without writing any codes (pre-flighting).
|
751
759
|
* @param pErrorCode Must be a valid pointer to an error code value, which must not indicate
|
752
760
|
* a failure before the function call.
|
753
761
|
* @return The number of reordering codes written to the dest array.
|
@@ -1192,8 +1200,6 @@ ucol_setAttribute(UCollator *coll, UColAttribute attr, UColAttributeValue value,
|
|
1192
1200
|
U_STABLE UColAttributeValue U_EXPORT2
|
1193
1201
|
ucol_getAttribute(const UCollator *coll, UColAttribute attr, UErrorCode *status);
|
1194
1202
|
|
1195
|
-
#ifndef U_HIDE_DRAFT_API
|
1196
|
-
|
1197
1203
|
/**
|
1198
1204
|
* Sets the variable top to the top of the specified reordering group.
|
1199
1205
|
* The variable top determines the highest-sorting character
|
@@ -1208,9 +1214,9 @@ ucol_getAttribute(const UCollator *coll, UColAttribute attr, UErrorCode *status)
|
|
1208
1214
|
* immediately. Check for U_FAILURE() on output or use with
|
1209
1215
|
* function chaining. (See User Guide for details.)
|
1210
1216
|
* @see ucol_getMaxVariable
|
1211
|
-
* @
|
1217
|
+
* @stable ICU 53
|
1212
1218
|
*/
|
1213
|
-
|
1219
|
+
U_STABLE void U_EXPORT2
|
1214
1220
|
ucol_setMaxVariable(UCollator *coll, UColReorderCode group, UErrorCode *pErrorCode);
|
1215
1221
|
|
1216
1222
|
/**
|
@@ -1218,13 +1224,11 @@ ucol_setMaxVariable(UCollator *coll, UColReorderCode group, UErrorCode *pErrorCo
|
|
1218
1224
|
* @param coll the collator
|
1219
1225
|
* @return the maximum variable reordering group.
|
1220
1226
|
* @see ucol_setMaxVariable
|
1221
|
-
* @
|
1227
|
+
* @stable ICU 53
|
1222
1228
|
*/
|
1223
|
-
|
1229
|
+
U_STABLE UColReorderCode U_EXPORT2
|
1224
1230
|
ucol_getMaxVariable(const UCollator *coll);
|
1225
1231
|
|
1226
|
-
#endif /* U_HIDE_DRAFT_API */
|
1227
|
-
|
1228
1232
|
#ifndef U_HIDE_DEPRECATED_API
|
1229
1233
|
/**
|
1230
1234
|
* Sets the variable top to the primary weight of the specified string.
|