Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 308699 | Differences between
and this patch

Collapse All | Expand All

(-)webkit-1.1.15.4-orig//WebCore/platform/text/TextBoundariesICU.cpp (-2 / +2 lines)
Lines 36-42 Link Here
36
36
37
int findNextWordFromIndex(const UChar* chars, int len, int position, bool forward)
37
int findNextWordFromIndex(const UChar* chars, int len, int position, bool forward)
38
{
38
{
39
    UBreakIterator* it = wordBreakIterator(chars, len);
39
    UBreakIterator* it = reinterpret_cast<UBreakIterator*>(wordBreakIterator(chars, len));
40
40
41
    if (forward) {
41
    if (forward) {
42
        position = ubrk_following(it, position);
42
        position = ubrk_following(it, position);
Lines 67-73 Link Here
67
67
68
void findWordBoundary(const UChar* chars, int len, int position, int* start, int* end)
68
void findWordBoundary(const UChar* chars, int len, int position, int* start, int* end)
69
{
69
{
70
    UBreakIterator* it = wordBreakIterator(chars, len);
70
    UBreakIterator* it = reinterpret_cast<UBreakIterator*>(wordBreakIterator(chars, len));
71
    *end = ubrk_following(it, position);
71
    *end = ubrk_following(it, position);
72
    if (*end < 0)
72
    if (*end < 0)
73
        *end = ubrk_last(it);
73
        *end = ubrk_last(it);
(-)webkit-1.1.15.4-orig//WebCore/platform/text/TextBreakIteratorICU.cpp (-16 / +16 lines)
Lines 38-44 Link Here
38
38
39
    if (!createdIterator) {
39
    if (!createdIterator) {
40
        UErrorCode openStatus = U_ZERO_ERROR;
40
        UErrorCode openStatus = U_ZERO_ERROR;
41
        iterator = static_cast<TextBreakIterator*>(ubrk_open(type, currentTextBreakLocaleID(), 0, 0, &openStatus));
41
        iterator = reinterpret_cast<TextBreakIterator*>(ubrk_open(type, currentTextBreakLocaleID(), 0, 0, &openStatus));
42
        createdIterator = true;
42
        createdIterator = true;
43
        ASSERT_WITH_MESSAGE(U_SUCCESS(openStatus), "ICU could not open a break iterator: %s (%d)", u_errorName(openStatus), openStatus);
43
        ASSERT_WITH_MESSAGE(U_SUCCESS(openStatus), "ICU could not open a break iterator: %s (%d)", u_errorName(openStatus), openStatus);
44
    }
44
    }
Lines 46-52 Link Here
46
        return 0;
46
        return 0;
47
47
48
    UErrorCode setTextStatus = U_ZERO_ERROR;
48
    UErrorCode setTextStatus = U_ZERO_ERROR;
49
    ubrk_setText(iterator, string, length, &setTextStatus);
49
    ubrk_setText(reinterpret_cast<UBreakIterator*>(iterator), string, length, &setTextStatus);
50
    if (U_FAILURE(setTextStatus))
50
    if (U_FAILURE(setTextStatus))
51
        return 0;
51
        return 0;
52
52
Lines 85-118 Link Here
85
        staticSentenceBreakIterator, UBRK_SENTENCE, string, length);
85
        staticSentenceBreakIterator, UBRK_SENTENCE, string, length);
86
}
86
}
87
87
88
int textBreakFirst(TextBreakIterator* bi)
88
int textBreakFirst(TextBreakIterator* iterator)
89
{
89
{
90
    return ubrk_first(bi);
90
    return ubrk_first(reinterpret_cast<UBreakIterator*>(iterator));
91
}
91
}
92
92
93
int textBreakNext(TextBreakIterator* bi)
93
int textBreakNext(TextBreakIterator* iterator)
94
{
94
{
95
    return ubrk_next(bi);
95
    return ubrk_next(reinterpret_cast<UBreakIterator*>(iterator));
96
}
96
}
97
97
98
int textBreakPreceding(TextBreakIterator* bi, int pos)
98
int textBreakPreceding(TextBreakIterator* iterator, int pos)
99
{
99
{
100
    return ubrk_preceding(bi, pos);
100
    return ubrk_preceding(reinterpret_cast<UBreakIterator*>(iterator), pos);
101
}
101
}
102
102
103
int textBreakFollowing(TextBreakIterator* bi, int pos)
103
int textBreakFollowing(TextBreakIterator* iterator, int pos)
104
{
104
{
105
    return ubrk_following(bi, pos);
105
    return ubrk_following(reinterpret_cast<UBreakIterator*>(iterator), pos);
106
}
106
}
107
107
108
int textBreakCurrent(TextBreakIterator* bi)
108
int textBreakCurrent(TextBreakIterator* iterator)
109
{
109
{
110
    return ubrk_current(bi);
110
    return ubrk_current(reinterpret_cast<UBreakIterator*>(iterator));
111
}
111
}
112
112
113
bool isTextBreak(TextBreakIterator* bi, int pos)
113
bool isTextBreak(TextBreakIterator* iterator, int position)
114
{
114
{
115
    return ubrk_isBoundary(bi, pos);
115
    return ubrk_isBoundary(reinterpret_cast<UBreakIterator*>(iterator), position);
116
}
116
}
117
117
118
#ifndef BUILDING_ON_TIGER
118
#ifndef BUILDING_ON_TIGER
Lines 126-132 Link Here
126
        UParseError parseStatus;
126
        UParseError parseStatus;
127
        UErrorCode openStatus = U_ZERO_ERROR;
127
        UErrorCode openStatus = U_ZERO_ERROR;
128
        String rules(breakRules);
128
        String rules(breakRules);
129
        iterator = static_cast<TextBreakIterator*>(ubrk_openRules(rules.characters(), rules.length(), 0, 0, &parseStatus, &openStatus));
129
        iterator = reinterpret_cast<TextBreakIterator*>(ubrk_openRules(rules.characters(), rules.length(), 0, 0, &parseStatus, &openStatus));
130
        createdIterator = true;
130
        createdIterator = true;
131
        ASSERT_WITH_MESSAGE(U_SUCCESS(openStatus), "ICU could not open a break iterator: %s (%d)", u_errorName(openStatus), openStatus);
131
        ASSERT_WITH_MESSAGE(U_SUCCESS(openStatus), "ICU could not open a break iterator: %s (%d)", u_errorName(openStatus), openStatus);
132
    }
132
    }
Lines 134-140 Link Here
134
        return 0;
134
        return 0;
135
135
136
    UErrorCode setTextStatus = U_ZERO_ERROR;
136
    UErrorCode setTextStatus = U_ZERO_ERROR;
137
    ubrk_setText(iterator, string, length, &setTextStatus);
137
    ubrk_setText(reinterpret_cast<UBreakIterator*>(iterator), string, length, &setTextStatus);
138
    if (U_FAILURE(setTextStatus))
138
    if (U_FAILURE(setTextStatus))
139
        return 0;
139
        return 0;
140
140

Return to bug 308699