mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-26 02:17:34 +09:00
Issue #1971 - Part 2: Update ICU source to 63.2.
This commit is contained in:
parent
8df84683be
commit
1e69214382
3160 changed files with 275815 additions and 234203 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
**********************************************************************
|
||||
|
|
@ -15,8 +15,8 @@
|
|||
#include "unicode/fpositer.h"
|
||||
#include "unicode/utf16.h"
|
||||
#include "unicode/uniset.h"
|
||||
#include "decfmtst.h"
|
||||
#include "unicode/decimfmt.h"
|
||||
#include "static_unicode_sets.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
|
|
@ -129,7 +129,6 @@ UnicodeString &ScientificNumberFormatter::SuperscriptStyle::format(
|
|||
const UnicodeString &original,
|
||||
FieldPositionIterator &fpi,
|
||||
const UnicodeString &preExponent,
|
||||
const DecimalFormatStaticSets &staticSets,
|
||||
UnicodeString &appendTo,
|
||||
UErrorCode &status) const {
|
||||
if (U_FAILURE(status)) {
|
||||
|
|
@ -149,16 +148,17 @@ UnicodeString &ScientificNumberFormatter::SuperscriptStyle::format(
|
|||
break;
|
||||
case UNUM_EXPONENT_SIGN_FIELD:
|
||||
{
|
||||
using namespace icu::numparse::impl;
|
||||
int32_t beginIndex = fp.getBeginIndex();
|
||||
int32_t endIndex = fp.getEndIndex();
|
||||
UChar32 aChar = original.char32At(beginIndex);
|
||||
if (staticSets.fMinusSigns->contains(aChar)) {
|
||||
if (unisets::get(unisets::MINUS_SIGN)->contains(aChar)) {
|
||||
appendTo.append(
|
||||
original,
|
||||
copyFromOffset,
|
||||
beginIndex - copyFromOffset);
|
||||
appendTo.append(kSuperscriptMinusSign);
|
||||
} else if (staticSets.fPlusSigns->contains(aChar)) {
|
||||
} else if (unisets::get(unisets::PLUS_SIGN)->contains(aChar)) {
|
||||
appendTo.append(
|
||||
original,
|
||||
copyFromOffset,
|
||||
|
|
@ -203,7 +203,6 @@ UnicodeString &ScientificNumberFormatter::MarkupStyle::format(
|
|||
const UnicodeString &original,
|
||||
FieldPositionIterator &fpi,
|
||||
const UnicodeString &preExponent,
|
||||
const DecimalFormatStaticSets & /*unusedDecimalFormatSets*/,
|
||||
UnicodeString &appendTo,
|
||||
UErrorCode &status) const {
|
||||
if (U_FAILURE(status)) {
|
||||
|
|
@ -243,8 +242,7 @@ ScientificNumberFormatter::ScientificNumberFormatter(
|
|||
DecimalFormat *fmtToAdopt, Style *styleToAdopt, UErrorCode &status)
|
||||
: fPreExponent(),
|
||||
fDecimalFormat(fmtToAdopt),
|
||||
fStyle(styleToAdopt),
|
||||
fStaticSets(NULL) {
|
||||
fStyle(styleToAdopt) {
|
||||
if (U_FAILURE(status)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -258,7 +256,6 @@ ScientificNumberFormatter::ScientificNumberFormatter(
|
|||
return;
|
||||
}
|
||||
getPreExponent(*sym, fPreExponent);
|
||||
fStaticSets = DecimalFormatStaticSets::getStaticSets(status);
|
||||
}
|
||||
|
||||
ScientificNumberFormatter::ScientificNumberFormatter(
|
||||
|
|
@ -266,8 +263,7 @@ ScientificNumberFormatter::ScientificNumberFormatter(
|
|||
: UObject(other),
|
||||
fPreExponent(other.fPreExponent),
|
||||
fDecimalFormat(NULL),
|
||||
fStyle(NULL),
|
||||
fStaticSets(other.fStaticSets) {
|
||||
fStyle(NULL) {
|
||||
fDecimalFormat = static_cast<DecimalFormat *>(
|
||||
other.fDecimalFormat->clone());
|
||||
fStyle = other.fStyle->clone();
|
||||
|
|
@ -292,7 +288,6 @@ UnicodeString &ScientificNumberFormatter::format(
|
|||
original,
|
||||
fpi,
|
||||
fPreExponent,
|
||||
*fStaticSets,
|
||||
appendTo,
|
||||
status);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue