mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
805dd78c93
Bug 924839 - Remove a patch already part of ICU 52.1. See http://bugs.icu-project.org/trac/ticket/10283 but also note the relevant code was removed completely upstream. r=glandium * * * Bug 924839 - Remove another patch already part of ICU 52.1. See http://bugs.icu-project.org/trac/ticket/10290 for that. r=gaston * * * Bug 924839 - Remove another patch already in ICU 52.1. See http://bugs.icu-project.org/trac/ticket/10045 for more. r=Norbert * * * Bug 924839 - Remove another patch already applied upstream. See http://bugs.icu-project.org/trac/changeset/32937 for more. r=gaston * * * Bug 924839 - Update the ICU update script to update to 52.1, *without* applying any of our local patches. r=glandium * * * Bug 924839 - Make the ICU update script only do updating within intl/icu/source and nowhere else. r=glandium * * * Bug 924839 - Implement the changes that would be made by |cd intl/; ./update-icu.sh http://source.icu-project.org/repos/icu/icu/tags/release-52-1/;|, run with the prior changesets' changes made (thus not applying any of our local patches). These changes don't actually work without subsequent adjustments, but this provides a codebase upon which those adjustments can be made, for the purpose of generating local patches to be kept in intl/icu-patches/. rs=the-usual-suspects * * * Bug 924839 - Update the bug 899722 local patch to make runConfigureICU not override CC/CXX on BSD systems. r=gaston * * * Bug 924839 - Update the bug 724533 patch that makes ICU builds with MozillaBuild on Windows. r=glandium * * * Bug 924839 - Import an upstream patch fixing the genrb tool to properly handle the -R (--omitCollationRules) option. See http://bugs.icu-project.org/trac/ticket/10043 for the original bug report and a link to the ultimate upstream landing. r=Norbert * * * Bug 924839 - Import the upstream fix for http://bugs.icu-project.org/trac/ticket/10486 so that ICU with -DU_USING_ICU_NAMESPACE=0 will compile on Windows. r=Norbert * * * Bug 924839 - Adjust the update script to update ICU, then to apply all local patches (rather than skipping the second step). Thus if the update script is properly run, now, the final result should be no changes at all to the tree. NOT REVIEWED YET * * * Bug 924839 - Update jstests that depend on CLDR locale data to match CLDR 24. r=Norbert
163 lines
5.7 KiB
C++
163 lines
5.7 KiB
C++
/*
|
|
********************************************************************************
|
|
* Copyright (C) 2005-2013, International Business Machines
|
|
* Corporation and others. All Rights Reserved.
|
|
********************************************************************************
|
|
*
|
|
* File WINNMFMT.H
|
|
*
|
|
********************************************************************************
|
|
*/
|
|
|
|
#ifndef __WINNMFMT
|
|
#define __WINNMFMT
|
|
|
|
#include "unicode/utypes.h"
|
|
|
|
#if U_PLATFORM_USES_ONLY_WIN32_API
|
|
|
|
#include "unicode/format.h"
|
|
#include "unicode/datefmt.h"
|
|
#include "unicode/calendar.h"
|
|
#include "unicode/ustring.h"
|
|
#include "unicode/locid.h"
|
|
|
|
#if !UCONFIG_NO_FORMATTING
|
|
|
|
/**
|
|
* \file
|
|
* \brief C++ API: Format numbers using Windows API.
|
|
*/
|
|
|
|
U_NAMESPACE_BEGIN
|
|
|
|
union FormatInfo;
|
|
|
|
class Win32NumberFormat : public NumberFormat
|
|
{
|
|
public:
|
|
Win32NumberFormat(const Locale &locale, UBool currency, UErrorCode &status);
|
|
|
|
Win32NumberFormat(const Win32NumberFormat &other);
|
|
|
|
virtual ~Win32NumberFormat();
|
|
|
|
virtual Format *clone(void) const;
|
|
|
|
Win32NumberFormat &operator=(const Win32NumberFormat &other);
|
|
|
|
/**
|
|
* Format a double number. Concrete subclasses must implement
|
|
* these pure virtual methods.
|
|
*
|
|
* @param number The value to be formatted.
|
|
* @param appendTo Output parameter to receive result.
|
|
* Result is appended to existing contents.
|
|
* @param pos On input: an alignment field, if desired.
|
|
* On output: the offsets of the alignment field.
|
|
* @return Reference to 'appendTo' parameter.
|
|
*/
|
|
virtual UnicodeString& format(double number,
|
|
UnicodeString& appendTo,
|
|
FieldPosition& pos) const;
|
|
/**
|
|
* Format a long number. Concrete subclasses must implement
|
|
* these pure virtual methods.
|
|
*
|
|
* @param number The value to be formatted.
|
|
* @param appendTo Output parameter to receive result.
|
|
* Result is appended to existing contents.
|
|
* @param pos On input: an alignment field, if desired.
|
|
* On output: the offsets of the alignment field.
|
|
* @return Reference to 'appendTo' parameter.
|
|
*/
|
|
virtual UnicodeString& format(int32_t number,
|
|
UnicodeString& appendTo,
|
|
FieldPosition& pos) const;
|
|
|
|
/**
|
|
* Format an int64 number.
|
|
*
|
|
* @param number The value to be formatted.
|
|
* @param appendTo Output parameter to receive result.
|
|
* Result is appended to existing contents.
|
|
* @param pos On input: an alignment field, if desired.
|
|
* On output: the offsets of the alignment field.
|
|
* @return Reference to 'appendTo' parameter.
|
|
*/
|
|
virtual UnicodeString& format(int64_t number,
|
|
UnicodeString& appendTo,
|
|
FieldPosition& pos) const;
|
|
|
|
// Use the default behavior for the following.
|
|
// virtual UnicodeString &format(double number, UnicodeString &appendTo) const;
|
|
// virtual UnicodeString &format(int32_t number, UnicodeString &appendTo) const;
|
|
// virtual UnicodeString &format(int64_t number, UnicodeString &appendTo) const;
|
|
|
|
virtual void parse(const UnicodeString& text, Formattable& result, ParsePosition& parsePosition) const;
|
|
|
|
/**
|
|
* Sets the maximum number of digits allowed in the fraction portion of a
|
|
* number. maximumFractionDigits must be >= minimumFractionDigits. If the
|
|
* new value for maximumFractionDigits is less than the current value
|
|
* of minimumFractionDigits, then minimumFractionDigits will also be set to
|
|
* the new value.
|
|
* @param newValue the new value to be set.
|
|
* @see getMaximumFractionDigits
|
|
*/
|
|
virtual void setMaximumFractionDigits(int32_t newValue);
|
|
|
|
/**
|
|
* Sets the minimum number of digits allowed in the fraction portion of a
|
|
* number. minimumFractionDigits must be <= maximumFractionDigits. If the
|
|
* new value for minimumFractionDigits exceeds the current value
|
|
* of maximumFractionDigits, then maximumIntegerDigits will also be set to
|
|
* the new value
|
|
* @param newValue the new value to be set.
|
|
* @see getMinimumFractionDigits
|
|
*/
|
|
virtual void setMinimumFractionDigits(int32_t newValue);
|
|
|
|
/**
|
|
* Return the class ID for this class. This is useful only for comparing to
|
|
* a return value from getDynamicClassID(). For example:
|
|
* <pre>
|
|
* . Base* polymorphic_pointer = createPolymorphicObject();
|
|
* . if (polymorphic_pointer->getDynamicClassID() ==
|
|
* . erived::getStaticClassID()) ...
|
|
* </pre>
|
|
* @return The class ID for all objects of this class.
|
|
*/
|
|
U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
|
|
|
|
/**
|
|
* Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This
|
|
* method is to implement a simple version of RTTI, since not all C++
|
|
* compilers support genuine RTTI. Polymorphic operator==() and clone()
|
|
* methods call this method.
|
|
*
|
|
* @return The class ID for this object. All objects of a
|
|
* given class have the same class ID. Objects of
|
|
* other classes have different class IDs.
|
|
*/
|
|
virtual UClassID getDynamicClassID(void) const;
|
|
|
|
private:
|
|
UnicodeString &format(int32_t numDigits, UnicodeString &appendTo, wchar_t *format, ...) const;
|
|
|
|
UBool fCurrency;
|
|
Locale fLocale;
|
|
int32_t fLCID;
|
|
FormatInfo *fFormatInfo;
|
|
UBool fFractionDigitsSet;
|
|
|
|
};
|
|
|
|
U_NAMESPACE_END
|
|
|
|
#endif /* #if !UCONFIG_NO_FORMATTING */
|
|
|
|
#endif // U_PLATFORM_USES_ONLY_WIN32_API
|
|
|
|
#endif // __WINNMFMT
|