/*
*******************************************************************************
*
-* Copyright (C) 2001-2004, International Business Machines
+* Copyright (C) 2001-2005, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
/**
* Constructs a transliterator.
*/
-CaseMapTransliterator::CaseMapTransliterator(const Locale &loc, const UnicodeString &id, UCaseMapFull *map) :
+CaseMapTransliterator::CaseMapTransliterator(const UnicodeString &id, UCaseMapFull *map) :
Transliterator(id, 0),
- fLoc(loc), fLocName(NULL),
fCsp(NULL),
fMap(map)
{
UErrorCode errorCode = U_ZERO_ERROR;
fCsp = ucase_getSingleton(&errorCode); // expect to get NULL if failure
- fLocName=fLoc.getName();
// TODO test incremental mode with context-sensitive text (e.g. greek sigma)
// TODO need to call setMaximumContextLength()?!
*/
CaseMapTransliterator::CaseMapTransliterator(const CaseMapTransliterator& o) :
Transliterator(o),
- fLoc(o.fLoc), fLocName(NULL), fCsp(o.fCsp), fMap(o.fMap)
+ fCsp(o.fCsp), fMap(o.fMap)
{
- fLocName=fLoc.getName();
}
/**
*/
CaseMapTransliterator& CaseMapTransliterator::operator=(const CaseMapTransliterator& o) {
Transliterator::operator=(o);
- fLoc = o.fLoc;
- fLocName = fLoc.getName();
fCsp = o.fCsp;
fMap = o.fMap;
return *this;
c=text.char32At(textPos);
csc.cpLimit=textPos+=U16_LENGTH(c);
- result=fMap(fCsp, c, utrans_rep_caseContextIterator, &csc, &s, fLocName, &locCache);
+ result=fMap(fCsp, c, utrans_rep_caseContextIterator, &csc, &s, "", &locCache);
if(csc.b1 && isIncremental) {
// fMap() tried to look beyond the context limit
// wait for more input
- break;
+ offsets.start=csc.cpStart;
+ return;
}
if(result>=0) {