pango 2.2.5-x86-mingw32 → 3.0.0-x86-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-mingw +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
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
********************************************************************************
|
3
|
-
* Copyright (C) 1997-
|
3
|
+
* Copyright (C) 1997-2015, International Business Machines
|
4
4
|
* Corporation and others. All Rights Reserved.
|
5
5
|
********************************************************************************
|
6
6
|
*
|
@@ -408,6 +408,38 @@ public:
|
|
408
408
|
*/
|
409
409
|
void setAmPmStrings(const UnicodeString* ampms, int32_t count);
|
410
410
|
|
411
|
+
#ifndef U_HIDE_INTERNAL_API
|
412
|
+
/**
|
413
|
+
* This default time separator is used for formatting when the locale
|
414
|
+
* doesn't specify any time separator, and always recognized when parsing.
|
415
|
+
* @internal
|
416
|
+
*/
|
417
|
+
static const UChar DEFAULT_TIME_SEPARATOR = 0x003a; // ':'
|
418
|
+
|
419
|
+
/**
|
420
|
+
* This alternate time separator is always recognized when parsing.
|
421
|
+
* @internal
|
422
|
+
*/
|
423
|
+
static const UChar ALTERNATE_TIME_SEPARATOR = 0x002e; // '.'
|
424
|
+
#endif /* U_HIDE_INTERNAL_API */
|
425
|
+
|
426
|
+
#ifndef U_HIDE_DRAFT_API
|
427
|
+
/**
|
428
|
+
* Gets the time separator string. For example: ":".
|
429
|
+
* @param result Output param which will receive the time separator string.
|
430
|
+
* @return A reference to 'result'.
|
431
|
+
* @draft ICU 55
|
432
|
+
*/
|
433
|
+
UnicodeString& getTimeSeparatorString(UnicodeString& result) const;
|
434
|
+
|
435
|
+
/**
|
436
|
+
* Sets the time separator string. For example: ":".
|
437
|
+
* @param newTimeSeparator the new time separator string.
|
438
|
+
* @draft ICU 55
|
439
|
+
*/
|
440
|
+
void setTimeSeparatorString(const UnicodeString& newTimeSeparator);
|
441
|
+
#endif /* U_HIDE_DRAFT_API */
|
442
|
+
|
411
443
|
#ifndef U_HIDE_DRAFT_API
|
412
444
|
/**
|
413
445
|
* Gets cyclic year name strings if the calendar has them, by width and context.
|
@@ -710,6 +742,17 @@ private:
|
|
710
742
|
UnicodeString* fAmPms;
|
711
743
|
int32_t fAmPmsCount;
|
712
744
|
|
745
|
+
/**
|
746
|
+
* Narrow Ampm strings. For example: "a" and "p".
|
747
|
+
*/
|
748
|
+
UnicodeString* fNarrowAmPms;
|
749
|
+
int32_t fNarrowAmPmsCount;
|
750
|
+
|
751
|
+
/**
|
752
|
+
* Time separator string. For example: ":".
|
753
|
+
*/
|
754
|
+
UnicodeString fTimeSeparator;
|
755
|
+
|
713
756
|
/**
|
714
757
|
* Quarter strings. For example: "1st quarter", "2nd quarter", etc.
|
715
758
|
*/
|
@@ -902,6 +945,22 @@ private:
|
|
902
945
|
* Returns TRUE if c (repeated count times) is the pattern character for a numeric field.
|
903
946
|
*/
|
904
947
|
static UBool U_EXPORT2 isNumericPatternChar(UChar c, int32_t count);
|
948
|
+
public:
|
949
|
+
#ifndef U_HIDE_INTERNAL_API
|
950
|
+
/**
|
951
|
+
* Gets a DateFormatSymbols by locale.
|
952
|
+
* Unlike the constructors which always use gregorian calendar, this
|
953
|
+
* method uses the calendar in the locale. If the locale contains no
|
954
|
+
* explicit calendar, this method uses the default calendar for that
|
955
|
+
* locale.
|
956
|
+
* @param locale the locale.
|
957
|
+
* @param status error returned here.
|
958
|
+
* @return the new DateFormatSymbols which the caller owns.
|
959
|
+
* @internal For ICU use only.
|
960
|
+
*/
|
961
|
+
static DateFormatSymbols * U_EXPORT2 createForLocale(
|
962
|
+
const Locale &locale, UErrorCode &status);
|
963
|
+
#endif /* U_HIDE_INTERNAL_API */
|
905
964
|
};
|
906
965
|
|
907
966
|
U_NAMESPACE_END
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
*******************************************************************************
|
3
|
-
* Copyright (C) 2007-
|
3
|
+
* Copyright (C) 2007-2015, International Business Machines Corporation and
|
4
4
|
* others. All Rights Reserved.
|
5
5
|
*******************************************************************************
|
6
6
|
*
|
@@ -31,6 +31,7 @@ class DateTimeMatcher;
|
|
31
31
|
class DistanceInfo;
|
32
32
|
class PatternMap;
|
33
33
|
class PtnSkeleton;
|
34
|
+
class SharedDateTimePatternGenerator;
|
34
35
|
|
35
36
|
/**
|
36
37
|
* This class provides flexible generation of date format patterns, like "yy-MM-dd".
|
@@ -65,6 +66,17 @@ public:
|
|
65
66
|
*/
|
66
67
|
static DateTimePatternGenerator* U_EXPORT2 createInstance(const Locale& uLocale, UErrorCode& status);
|
67
68
|
|
69
|
+
#ifndef U_HIDE_INTERNAL_API
|
70
|
+
|
71
|
+
/**
|
72
|
+
* For ICU use only
|
73
|
+
*
|
74
|
+
* @internal
|
75
|
+
*/
|
76
|
+
static DateTimePatternGenerator* U_EXPORT2 internalMakeInstance(const Locale& uLocale, UErrorCode& status);
|
77
|
+
|
78
|
+
#endif /* U_HIDE_INTERNAL_API */
|
79
|
+
|
68
80
|
/**
|
69
81
|
* Create an empty generator, to be constructed with addPattern(...) etc.
|
70
82
|
* @param status Output param set to success/failure code on exit,
|
@@ -215,22 +227,24 @@ public:
|
|
215
227
|
const UnicodeString& getAppendItemName(UDateTimePatternField field) const;
|
216
228
|
|
217
229
|
/**
|
218
|
-
* The
|
219
|
-
* time patterns. The default
|
220
|
-
* by the date pattern and {
|
230
|
+
* The DateTimeFormat is a message format pattern used to compose date and
|
231
|
+
* time patterns. The default pattern in the root locale is "{1} {0}", where
|
232
|
+
* {1} will be replaced by the date pattern and {0} will be replaced by the
|
233
|
+
* time pattern; however, other locales may specify patterns such as
|
234
|
+
* "{1}, {0}" or "{1} 'at' {0}", etc.
|
221
235
|
* <p>
|
222
236
|
* This is used when the input skeleton contains both date and time fields,
|
223
237
|
* but there is not a close match among the added patterns. For example,
|
224
238
|
* suppose that this object was created by adding "dd-MMM" and "hh:mm", and
|
225
|
-
* its datetimeFormat is the default "{
|
239
|
+
* its datetimeFormat is the default "{1} {0}". Then if the input skeleton
|
226
240
|
* is "MMMdhmm", there is not an exact match, so the input skeleton is
|
227
241
|
* broken up into two components "MMMd" and "hmm". There are close matches
|
228
242
|
* for those two skeletons, so the result is put together with this pattern,
|
229
243
|
* resulting in "d-MMM h:mm".
|
230
244
|
*
|
231
245
|
* @param dateTimeFormat
|
232
|
-
* message format pattern, here {
|
233
|
-
* pattern and {
|
246
|
+
* message format pattern, here {1} will be replaced by the date
|
247
|
+
* pattern and {0} will be replaced by the time pattern.
|
234
248
|
* @stable ICU 3.8
|
235
249
|
*/
|
236
250
|
void setDateTimeFormat(const UnicodeString& dateTimeFormat);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
*******************************************************************************
|
3
3
|
*
|
4
|
-
* Copyright (C) 2009-
|
4
|
+
* Copyright (C) 2009-2014, International Business Machines
|
5
5
|
* Corporation and others. All Rights Reserved.
|
6
6
|
*
|
7
7
|
*******************************************************************************
|
@@ -191,6 +191,26 @@ public:
|
|
191
191
|
* @stable ICU 4.4
|
192
192
|
*/
|
193
193
|
explicit LocalPointer(T *p=NULL) : LocalPointerBase<T>(p) {}
|
194
|
+
#ifndef U_HIDE_DRAFT_API
|
195
|
+
/**
|
196
|
+
* Constructor takes ownership and reports an error if NULL.
|
197
|
+
*
|
198
|
+
* This constructor is intended to be used with other-class constructors
|
199
|
+
* that may report a failure UErrorCode,
|
200
|
+
* so that callers need to check only for U_FAILURE(errorCode)
|
201
|
+
* and not also separately for isNull().
|
202
|
+
*
|
203
|
+
* @param p simple pointer to an object that is adopted
|
204
|
+
* @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR
|
205
|
+
* if p==NULL and no other failure code had been set
|
206
|
+
* @draft ICU 55
|
207
|
+
*/
|
208
|
+
LocalPointer(T *p, UErrorCode &errorCode) : LocalPointerBase<T>(p) {
|
209
|
+
if(p==NULL && U_SUCCESS(errorCode)) {
|
210
|
+
errorCode=U_MEMORY_ALLOCATION_ERROR;
|
211
|
+
}
|
212
|
+
}
|
213
|
+
#endif /* U_HIDE_DRAFT_API */
|
194
214
|
/**
|
195
215
|
* Destructor deletes the object it owns.
|
196
216
|
* @stable ICU 4.4
|
@@ -208,6 +228,34 @@ public:
|
|
208
228
|
delete LocalPointerBase<T>::ptr;
|
209
229
|
LocalPointerBase<T>::ptr=p;
|
210
230
|
}
|
231
|
+
#ifndef U_HIDE_DRAFT_API
|
232
|
+
/**
|
233
|
+
* Deletes the object it owns,
|
234
|
+
* and adopts (takes ownership of) the one passed in.
|
235
|
+
*
|
236
|
+
* If U_FAILURE(errorCode), then the current object is retained and the new one deleted.
|
237
|
+
*
|
238
|
+
* If U_SUCCESS(errorCode) but the input pointer is NULL,
|
239
|
+
* then U_MEMORY_ALLOCATION_ERROR is set,
|
240
|
+
* the current object is deleted, and NULL is set.
|
241
|
+
*
|
242
|
+
* @param p simple pointer to an object that is adopted
|
243
|
+
* @param errorCode in/out UErrorCode, set to U_MEMORY_ALLOCATION_ERROR
|
244
|
+
* if p==NULL and no other failure code had been set
|
245
|
+
* @draft ICU 55
|
246
|
+
*/
|
247
|
+
void adoptInsteadAndCheckErrorCode(T *p, UErrorCode &errorCode) {
|
248
|
+
if(U_SUCCESS(errorCode)) {
|
249
|
+
delete LocalPointerBase<T>::ptr;
|
250
|
+
LocalPointerBase<T>::ptr=p;
|
251
|
+
if(p==NULL) {
|
252
|
+
errorCode=U_MEMORY_ALLOCATION_ERROR;
|
253
|
+
}
|
254
|
+
} else {
|
255
|
+
delete p;
|
256
|
+
}
|
257
|
+
}
|
258
|
+
#endif /* U_HIDE_DRAFT_API */
|
211
259
|
};
|
212
260
|
|
213
261
|
/**
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
******************************************************************************
|
3
3
|
*
|
4
|
-
* Copyright (C) 1996-
|
4
|
+
* Copyright (C) 1996-2015, International Business Machines
|
5
5
|
* Corporation and others. All Rights Reserved.
|
6
6
|
*
|
7
7
|
******************************************************************************
|
@@ -750,7 +750,7 @@ private:
|
|
750
750
|
char fullNameBuffer[ULOC_FULLNAME_CAPACITY];
|
751
751
|
// name without keywords
|
752
752
|
char* baseName;
|
753
|
-
|
753
|
+
void initBaseName(UErrorCode& status);
|
754
754
|
|
755
755
|
UBool fIsBogus;
|
756
756
|
|
@@ -795,7 +795,6 @@ Locale::getScript() const
|
|
795
795
|
inline const char *
|
796
796
|
Locale::getVariant() const
|
797
797
|
{
|
798
|
-
getBaseName(); // lazy init
|
799
798
|
return &baseName[variantBegin];
|
800
799
|
}
|
801
800
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*
|
2
2
|
**********************************************************************
|
3
|
-
* Copyright (c) 2004-
|
3
|
+
* Copyright (c) 2004-2015, International Business Machines
|
4
4
|
* Corporation and others. All Rights Reserved.
|
5
5
|
**********************************************************************
|
6
6
|
* Author: Alan Liu
|
@@ -29,45 +29,43 @@
|
|
29
29
|
* For example, for English, when formatting "3 hours"
|
30
30
|
* Wide is "3 hours"; short is "3 hrs"; narrow is "3h";
|
31
31
|
* formatting "3 hours 17 minutes" as numeric give "3:17"
|
32
|
-
* @
|
32
|
+
* @stable ICU 53
|
33
33
|
*/
|
34
34
|
enum UMeasureFormatWidth {
|
35
35
|
|
36
|
-
#ifndef U_HIDE_DRAFT_API
|
37
36
|
// Wide, short, and narrow must be first and in this order.
|
38
37
|
/**
|
39
38
|
* Spell out measure units.
|
40
|
-
* @
|
39
|
+
* @stable ICU 53
|
41
40
|
*/
|
42
41
|
UMEASFMT_WIDTH_WIDE,
|
43
42
|
|
44
43
|
/**
|
45
44
|
* Abbreviate measure units.
|
46
|
-
* @
|
45
|
+
* @stable ICU 53
|
47
46
|
*/
|
48
47
|
UMEASFMT_WIDTH_SHORT,
|
49
48
|
|
50
49
|
/**
|
51
50
|
* Use symbols for measure units when possible.
|
52
|
-
* @
|
51
|
+
* @stable ICU 53
|
53
52
|
*/
|
54
53
|
UMEASFMT_WIDTH_NARROW,
|
55
54
|
|
56
55
|
/**
|
57
56
|
* Completely omit measure units when possible. For example, format
|
58
57
|
* '5 hours, 37 minutes' as '5:37'
|
59
|
-
* @
|
58
|
+
* @stable ICU 53
|
60
59
|
*/
|
61
60
|
UMEASFMT_WIDTH_NUMERIC,
|
62
|
-
#endif /* U_HIDE_DRAFT_API */
|
63
61
|
|
64
62
|
/**
|
65
63
|
* Count of values in this enum.
|
66
|
-
* @
|
64
|
+
* @stable ICU 53
|
67
65
|
*/
|
68
66
|
UMEASFMT_WIDTH_COUNT = 4
|
69
67
|
};
|
70
|
-
/** @
|
68
|
+
/** @stable ICU 53 */
|
71
69
|
typedef enum UMeasureFormatWidth UMeasureFormatWidth;
|
72
70
|
|
73
71
|
U_NAMESPACE_BEGIN
|
@@ -97,34 +95,32 @@ class U_I18N_API MeasureFormat : public Format {
|
|
97
95
|
using Format::parseObject;
|
98
96
|
using Format::format;
|
99
97
|
|
100
|
-
#ifndef U_HIDE_DRAFT_API
|
101
98
|
/**
|
102
99
|
* Constructor.
|
103
|
-
* @
|
100
|
+
* @stable ICU 53
|
104
101
|
*/
|
105
102
|
MeasureFormat(
|
106
103
|
const Locale &locale, UMeasureFormatWidth width, UErrorCode &status);
|
107
104
|
|
108
105
|
/**
|
109
106
|
* Constructor.
|
110
|
-
* @
|
107
|
+
* @stable ICU 53
|
111
108
|
*/
|
112
109
|
MeasureFormat(
|
113
110
|
const Locale &locale,
|
114
111
|
UMeasureFormatWidth width,
|
115
112
|
NumberFormat *nfToAdopt,
|
116
113
|
UErrorCode &status);
|
117
|
-
#endif /* U_HIDE_DRAFT_API */
|
118
114
|
|
119
115
|
/**
|
120
116
|
* Copy constructor.
|
121
|
-
* @
|
117
|
+
* @stable ICU 3.0
|
122
118
|
*/
|
123
119
|
MeasureFormat(const MeasureFormat &other);
|
124
120
|
|
125
121
|
/**
|
126
122
|
* Assignment operator.
|
127
|
-
* @
|
123
|
+
* @stable ICU 3.0
|
128
124
|
*/
|
129
125
|
MeasureFormat &operator=(const MeasureFormat &rhs);
|
130
126
|
|
@@ -136,19 +132,19 @@ class U_I18N_API MeasureFormat : public Format {
|
|
136
132
|
|
137
133
|
/**
|
138
134
|
* Return true if given Format objects are semantically equal.
|
139
|
-
* @
|
135
|
+
* @stable ICU 53
|
140
136
|
*/
|
141
137
|
virtual UBool operator==(const Format &other) const;
|
142
138
|
|
143
139
|
/**
|
144
140
|
* Clones this object polymorphically.
|
145
|
-
* @
|
141
|
+
* @stable ICU 53
|
146
142
|
*/
|
147
143
|
virtual Format *clone() const;
|
148
144
|
|
149
145
|
/**
|
150
146
|
* Formats object to produce a string.
|
151
|
-
* @
|
147
|
+
* @stable ICU 53
|
152
148
|
*/
|
153
149
|
virtual UnicodeString &format(
|
154
150
|
const Formattable &obj,
|
@@ -167,7 +163,6 @@ class U_I18N_API MeasureFormat : public Format {
|
|
167
163
|
Formattable &reslt,
|
168
164
|
ParsePosition &pos) const;
|
169
165
|
|
170
|
-
#ifndef U_HIDE_DRAFT_API
|
171
166
|
/**
|
172
167
|
* Formats measure objects to produce a string. An example of such a
|
173
168
|
* formatted string is 3 meters, 3.5 centimeters. Measure objects appear
|
@@ -182,7 +177,7 @@ class U_I18N_API MeasureFormat : public Format {
|
|
182
177
|
* @param status the error.
|
183
178
|
* @return appendTo reference
|
184
179
|
*
|
185
|
-
* @
|
180
|
+
* @stable ICU 53
|
186
181
|
*/
|
187
182
|
UnicodeString &formatMeasures(
|
188
183
|
const Measure *measures,
|
@@ -190,31 +185,29 @@ class U_I18N_API MeasureFormat : public Format {
|
|
190
185
|
UnicodeString &appendTo,
|
191
186
|
FieldPosition &pos,
|
192
187
|
UErrorCode &status) const;
|
193
|
-
#endif /* U_HIDE_DRAFT_API */
|
194
188
|
|
195
|
-
#ifndef
|
189
|
+
#ifndef U_HIDE_DRAFT_API
|
196
190
|
/**
|
197
|
-
*
|
198
|
-
* formatted string is 3
|
199
|
-
* @param
|
200
|
-
* @param
|
201
|
-
*
|
202
|
-
* it is *MeasureUnit::createSecond(status).
|
191
|
+
* Formats a single measure per unit. An example of such a
|
192
|
+
* formatted string is 3.5 meters per second.
|
193
|
+
* @param measure The measure object. In above example, 3.5 meters.
|
194
|
+
* @param perUnit The per unit. In above example, it is
|
195
|
+
* *MeasureUnit::createSecond(status).
|
203
196
|
* @param appendTo formatted string appended here.
|
204
197
|
* @param pos the field position.
|
205
198
|
* @param status the error.
|
206
199
|
* @return appendTo reference
|
207
200
|
*
|
208
|
-
* @
|
201
|
+
* @draft ICU 55
|
209
202
|
*/
|
210
|
-
UnicodeString &
|
211
|
-
const Measure
|
212
|
-
int32_t measureCount,
|
203
|
+
UnicodeString &formatMeasurePerUnit(
|
204
|
+
const Measure &measure,
|
213
205
|
const MeasureUnit &perUnit,
|
214
206
|
UnicodeString &appendTo,
|
215
207
|
FieldPosition &pos,
|
216
208
|
UErrorCode &status) const;
|
217
|
-
|
209
|
+
|
210
|
+
#endif /* U_HIDE_DRAFT_API */
|
218
211
|
|
219
212
|
/**
|
220
213
|
* Return a formatter for CurrencyAmount objects in the given
|
@@ -245,7 +238,7 @@ class U_I18N_API MeasureFormat : public Format {
|
|
245
238
|
* . erived::getStaticClassID()) ...
|
246
239
|
* </pre>
|
247
240
|
* @return The class ID for all objects of this class.
|
248
|
-
* @
|
241
|
+
* @stable ICU 53
|
249
242
|
*/
|
250
243
|
static UClassID U_EXPORT2 getStaticClassID(void);
|
251
244
|
|
@@ -258,7 +251,7 @@ class U_I18N_API MeasureFormat : public Format {
|
|
258
251
|
* @return The class ID for this object. All objects of a
|
259
252
|
* given class have the same class ID. Objects of
|
260
253
|
* other classes have different class IDs.
|
261
|
-
* @
|
254
|
+
* @stable ICU 53
|
262
255
|
*/
|
263
256
|
virtual UClassID getDynamicClassID(void) const;
|
264
257
|
|
@@ -347,7 +340,7 @@ class U_I18N_API MeasureFormat : public Format {
|
|
347
340
|
int32_t widthIndex,
|
348
341
|
UErrorCode &status) const;
|
349
342
|
|
350
|
-
int32_t
|
343
|
+
int32_t withPerUnitAndAppend(
|
351
344
|
const UnicodeString &formatted,
|
352
345
|
const MeasureUnit &perUnit,
|
353
346
|
UnicodeString &appendTo,
|