diff options
Diffstat (limited to 'sal/textenc/convertiso2022cn.cxx')
-rw-r--r-- | sal/textenc/convertiso2022cn.cxx | 53 |
1 files changed, 20 insertions, 33 deletions
diff --git a/sal/textenc/convertiso2022cn.cxx b/sal/textenc/convertiso2022cn.cxx index 98b9aa1721fb..8241c5b55198 100644 --- a/sal/textenc/convertiso2022cn.cxx +++ b/sal/textenc/convertiso2022cn.cxx @@ -362,21 +362,21 @@ sal_Size ImplConvertIso2022CnToUnicode(void const * pData, } bad_input: - switch (ImplHandleBadInputTextToUnicodeConversion( + switch (sal::detail::textenc::handleBadInputTextToUnicodeConversion( bUndefined, true, 0, nFlags, &pDestBufPtr, pDestBufEnd, &nInfo)) { - case IMPL_BAD_INPUT_STOP: + case sal::detail::textenc::BAD_INPUT_STOP: eState = IMPL_ISO_2022_CN_TO_UNICODE_STATE_ASCII; b116431 = false; break; - case IMPL_BAD_INPUT_CONTINUE: + case sal::detail::textenc::BAD_INPUT_CONTINUE: eState = IMPL_ISO_2022_CN_TO_UNICODE_STATE_ASCII; b116431 = false; continue; - case IMPL_BAD_INPUT_NO_OUTPUT: + case sal::detail::textenc::BAD_INPUT_NO_OUTPUT: goto no_output; } break; @@ -395,17 +395,17 @@ sal_Size ImplConvertIso2022CnToUnicode(void const * pData, if ((nFlags & RTL_TEXTTOUNICODE_FLAGS_FLUSH) == 0) nInfo |= RTL_TEXTTOUNICODE_INFO_SRCBUFFERTOSMALL; else - switch (ImplHandleBadInputTextToUnicodeConversion( + switch (sal::detail::textenc::handleBadInputTextToUnicodeConversion( false, true, 0, nFlags, &pDestBufPtr, pDestBufEnd, &nInfo)) { - case IMPL_BAD_INPUT_STOP: - case IMPL_BAD_INPUT_CONTINUE: + case sal::detail::textenc::BAD_INPUT_STOP: + case sal::detail::textenc::BAD_INPUT_CONTINUE: eState = IMPL_ISO_2022_CN_TO_UNICODE_STATE_ASCII; b116431 = false; break; - case IMPL_BAD_INPUT_NO_OUTPUT: + case sal::detail::textenc::BAD_INPUT_NO_OUTPUT: nInfo |= RTL_TEXTTOUNICODE_INFO_DESTBUFFERTOSMALL; break; } @@ -777,27 +777,21 @@ sal_Size ImplConvertUnicodeToIso2022Cn(void const * pData, continue; bad_input: - switch (ImplHandleBadInputUnicodeToTextConversion(bUndefined, - nChar, - nFlags, - &pDestBufPtr, - pDestBufEnd, - &nInfo, - "\x0F", // SI - bSo ? 1 : 0, - &bWritten)) + switch (sal::detail::textenc::handleBadInputUnicodeToTextConversion( + bUndefined, nChar, nFlags, &pDestBufPtr, pDestBufEnd, + &nInfo, "\x0F" /* SI */, bSo ? 1 : 0, &bWritten)) { - case IMPL_BAD_INPUT_STOP: + case sal::detail::textenc::BAD_INPUT_STOP: nHighSurrogate = 0; break; - case IMPL_BAD_INPUT_CONTINUE: + case sal::detail::textenc::BAD_INPUT_CONTINUE: if (bWritten) bSo = false; nHighSurrogate = 0; continue; - case IMPL_BAD_INPUT_NO_OUTPUT: + case sal::detail::textenc::BAD_INPUT_NO_OUTPUT: goto no_output; } break; @@ -818,29 +812,22 @@ sal_Size ImplConvertUnicodeToIso2022Cn(void const * pData, if ((nFlags & RTL_UNICODETOTEXT_FLAGS_FLUSH) != 0) nInfo |= RTL_UNICODETOTEXT_INFO_SRCBUFFERTOSMALL; else - switch (ImplHandleBadInputUnicodeToTextConversion( - false, - 0, - nFlags, - &pDestBufPtr, - pDestBufEnd, - &nInfo, - "\x0F", // SI - bSo ? 1 : 0, - &bWritten)) + switch (sal::detail::textenc::handleBadInputUnicodeToTextConversion( + false, 0, nFlags, &pDestBufPtr, pDestBufEnd, &nInfo, + "\x0F" /* SI */, bSo ? 1 : 0, &bWritten)) { - case IMPL_BAD_INPUT_STOP: + case sal::detail::textenc::BAD_INPUT_STOP: nHighSurrogate = 0; bFlush = false; break; - case IMPL_BAD_INPUT_CONTINUE: + case sal::detail::textenc::BAD_INPUT_CONTINUE: if (bWritten) bSo = false; nHighSurrogate = 0; break; - case IMPL_BAD_INPUT_NO_OUTPUT: + case sal::detail::textenc::BAD_INPUT_NO_OUTPUT: nInfo |= RTL_UNICODETOTEXT_INFO_DESTBUFFERTOSMALL; break; } |