mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-12738 ICU4C BRS, fixes from testing uconfig.h variations
X-SVN-Rev: 39378
This commit is contained in:
parent
6ef22595ed
commit
11c0df4f7b
6 changed files with 22 additions and 7 deletions
|
@ -420,6 +420,7 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
|
|||
break;
|
||||
case UBRK_SENTENCE:
|
||||
result = BreakIterator::buildInstance(loc, "sentence", kind, status);
|
||||
#if !UCONFIG_NO_FILTERED_BREAK_ITERATION
|
||||
{
|
||||
char ssKeyValue[kKeyValueLenMax] = {0};
|
||||
UErrorCode kvStatus = U_ZERO_ERROR;
|
||||
|
@ -432,6 +433,7 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case UBRK_TITLE:
|
||||
result = BreakIterator::buildInstance(loc, "title", kind, status);
|
||||
|
|
|
@ -280,7 +280,11 @@ class LocaleDisplayNamesImpl : public LocaleDisplayNames {
|
|||
SimpleFormatter format;
|
||||
SimpleFormatter keyTypeFormat;
|
||||
UDisplayContext capitalizationContext;
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
BreakIterator* capitalizationBrkIter;
|
||||
#else
|
||||
UObject* capitalizationBrkIter;
|
||||
#endif
|
||||
static UMutex capitalizationBrkIterLock;
|
||||
UnicodeString formatOpenParen;
|
||||
UnicodeString formatReplaceOpenParen;
|
||||
|
@ -509,8 +513,10 @@ LocaleDisplayNamesImpl::initialize(void) {
|
|||
}
|
||||
|
||||
LocaleDisplayNamesImpl::~LocaleDisplayNamesImpl() {
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
delete capitalizationBrkIter;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
const Locale&
|
||||
LocaleDisplayNamesImpl::getLocale() const {
|
||||
|
|
|
@ -76,7 +76,9 @@ UStringCaseMapper(const UCaseMap *csm,
|
|||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
class BreakIterator; // unicode/brkiter.h
|
||||
#endif
|
||||
class Locale; // unicode/locid.h
|
||||
class StringCharacterIterator;
|
||||
class UnicodeStringAppendable; // unicode/appendable.h
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "reldtfmt.h"
|
||||
#include "unicode/datefmt.h"
|
||||
#include "unicode/reldatefmt.h"
|
||||
#include "unicode/simpleformatter.h"
|
||||
|
@ -22,6 +21,7 @@
|
|||
#include "unicode/uchar.h"
|
||||
#include "unicode/brkiter.h"
|
||||
|
||||
#include "reldtfmt.h"
|
||||
#include "cmemory.h"
|
||||
#include "uresimp.h"
|
||||
|
||||
|
@ -592,4 +592,4 @@ int32_t RelativeDateFormat::dayDifference(Calendar &cal, UErrorCode &status) {
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
#endif /* !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -264,7 +264,11 @@ private:
|
|||
UBool fCapitalizationInfoSet;
|
||||
UBool fCapitalizationOfRelativeUnitsForUIListMenu;
|
||||
UBool fCapitalizationOfRelativeUnitsForStandAlone;
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
BreakIterator* fCapitalizationBrkIter;
|
||||
#else
|
||||
UObject* fCapitalizationBrkIter;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Get the string at a specific offset.
|
||||
|
@ -333,4 +337,3 @@ U_NAMESPACE_END
|
|||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
||||
#endif // RELDTFMT_H
|
||||
//eof
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* \brief C++ API: Formats relative dates such as "1 day ago" or "tomorrow"
|
||||
*/
|
||||
|
||||
#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION
|
||||
#if !UCONFIG_NO_FORMATTING
|
||||
|
||||
/**
|
||||
* Represents the unit for formatting a relative date. e.g "in 5 days"
|
||||
|
@ -226,6 +226,7 @@ typedef enum UDateDirection {
|
|||
#endif // U_HIDE_DEPRECATED_API
|
||||
} UDateDirection;
|
||||
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
|
@ -517,5 +518,6 @@ private:
|
|||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION*/
|
||||
#endif
|
||||
#endif /* !UCONFIG_NO_BREAK_ITERATION */
|
||||
#endif /* !UCONFIG_NO_FORMATTING */
|
||||
#endif /* __RELDATEFMT_H */
|
||||
|
|
Loading…
Add table
Reference in a new issue