summaryrefslogtreecommitdiff
path: root/sal/textenc/tcvtutf8.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-06 12:09:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-06 15:00:44 +0100
commit353bed10cf7d41881654b82b0a833da8dff36a69 (patch)
tree0d1a287f9bb243fa7f2d155d125ef65beaeca67b /sal/textenc/tcvtutf8.cxx
parent5689b61ac9eac4d4be2d6aa378b732a5eae4784a (diff)
Made textenc/converter cleanly usable by both sal and sal_textenc.
Diffstat (limited to 'sal/textenc/tcvtutf8.cxx')
-rw-r--r--sal/textenc/tcvtutf8.cxx43
1 files changed, 20 insertions, 23 deletions
diff --git a/sal/textenc/tcvtutf8.cxx b/sal/textenc/tcvtutf8.cxx
index 1e41da2e398d..efa0e8dc0097 100644
--- a/sal/textenc/tcvtutf8.cxx
+++ b/sal/textenc/tcvtutf8.cxx
@@ -191,25 +191,25 @@ sal_Size ImplConvertUtf8ToUnicode(
continue;
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:
nShift = -1;
bCheckBom = false;
if (!bConsume)
--pSrcBufPtr;
break;
- case IMPL_BAD_INPUT_CONTINUE:
+ case sal::detail::textenc::BAD_INPUT_CONTINUE:
nShift = -1;
bCheckBom = false;
if (!bConsume)
--pSrcBufPtr;
continue;
- case IMPL_BAD_INPUT_NO_OUTPUT:
+ case sal::detail::textenc::BAD_INPUT_NO_OUTPUT:
goto no_output;
}
break;
@@ -228,17 +228,17 @@ sal_Size ImplConvertUtf8ToUnicode(
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:
nShift = -1;
bCheckBom = false;
break;
- case IMPL_BAD_INPUT_NO_OUTPUT:
+ case sal::detail::textenc::BAD_INPUT_NO_OUTPUT:
nInfo |= RTL_TEXTTOUNICODE_INFO_DESTBUFFERTOSMALL;
break;
}
@@ -368,20 +368,19 @@ sal_Size ImplConvertUnicodeToUtf8(
continue;
bad_input:
- switch (ImplHandleBadInputUnicodeToTextConversion(false, 0, nFlags,
- &pDestBufPtr,
- pDestBufEnd, &nInfo,
- NULL, 0, NULL))
+ switch (sal::detail::textenc::handleBadInputUnicodeToTextConversion(
+ false, 0, nFlags, &pDestBufPtr, pDestBufEnd, &nInfo, NULL,
+ 0, NULL))
{
- 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:
nHighSurrogate = 0;
continue;
- case IMPL_BAD_INPUT_NO_OUTPUT:
+ case sal::detail::textenc::BAD_INPUT_NO_OUTPUT:
goto no_output;
}
break;
@@ -400,18 +399,16 @@ sal_Size ImplConvertUnicodeToUtf8(
if ((nFlags & RTL_UNICODETOTEXT_FLAGS_FLUSH) != 0)
nInfo |= RTL_UNICODETOTEXT_INFO_SRCBUFFERTOSMALL;
else
- switch (ImplHandleBadInputUnicodeToTextConversion(false, 0, nFlags,
- &pDestBufPtr,
- pDestBufEnd,
- &nInfo, NULL, 0,
- NULL))
+ switch (sal::detail::textenc::handleBadInputUnicodeToTextConversion(
+ false, 0, nFlags, &pDestBufPtr, pDestBufEnd, &nInfo,
+ NULL, 0, NULL))
{
- case IMPL_BAD_INPUT_STOP:
- case IMPL_BAD_INPUT_CONTINUE:
+ case sal::detail::textenc::BAD_INPUT_STOP:
+ case sal::detail::textenc::BAD_INPUT_CONTINUE:
nHighSurrogate = 0;
break;
- case IMPL_BAD_INPUT_NO_OUTPUT:
+ case sal::detail::textenc::BAD_INPUT_NO_OUTPUT:
nInfo |= RTL_UNICODETOTEXT_INFO_DESTBUFFERTOSMALL;
break;
}