diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-01-06 10:26:50 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-01-06 15:00:43 +0100 |
commit | 9c015c0bd1df0ab4be999fe244ced998002cb0f6 (patch) | |
tree | bd68ff99ba8ebc659b41ee9cf012fef192a5afeb /sal/textenc/tcvtutf8.cxx | |
parent | 2e15fcf9240abd80be770e74634068fe12b79741 (diff) |
Further clean up.
Diffstat (limited to 'sal/textenc/tcvtutf8.cxx')
-rw-r--r-- | sal/textenc/tcvtutf8.cxx | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/sal/textenc/tcvtutf8.cxx b/sal/textenc/tcvtutf8.cxx index 18c6c62dacce..1e41da2e398d 100644 --- a/sal/textenc/tcvtutf8.cxx +++ b/sal/textenc/tcvtutf8.cxx @@ -32,6 +32,7 @@ #include "rtl/textcvt.h" #include "converter.hxx" +#include "tcvtutf8.hxx" #include "tenchelp.hxx" #include "unichars.hxx" @@ -63,11 +64,15 @@ void ImplResetUtf8ToUnicodeContext(void * pContext) } } -sal_Size ImplConvertUtf8ToUnicode(ImplTextConverterData const * pData, - void * pContext, char const * pSrcBuf, - sal_Size nSrcBytes, sal_Unicode * pDestBuf, - sal_Size nDestChars, sal_uInt32 nFlags, - sal_uInt32 * pInfo, sal_Size * pSrcCvtBytes) +void ImplDestroyUtf8ToUnicodeContext(void * pContext) +{ + delete static_cast< ImplUtf8ToUnicodeContext * >(pContext); +} + +sal_Size ImplConvertUtf8ToUnicode( + void const * pData, void * pContext, char const * pSrcBuf, + sal_Size nSrcBytes, sal_Unicode * pDestBuf, sal_Size nDestChars, + sal_uInt32 nFlags, sal_uInt32 * pInfo, sal_Size * pSrcCvtBytes) { /* This function is very liberal with the UTF-8 input. Accepted are: @@ -265,11 +270,15 @@ void ImplResetUnicodeToUtf8Context(void * pContext) static_cast< ImplUnicodeToUtf8Context * >(pContext)->nHighSurrogate = 0xFFFF; } -sal_Size ImplConvertUnicodeToUtf8(ImplTextConverterData const * pData, - void * pContext, sal_Unicode const * pSrcBuf, - sal_Size nSrcChars, char * pDestBuf, - sal_Size nDestBytes, sal_uInt32 nFlags, - sal_uInt32 * pInfo, sal_Size* pSrcCvtChars) +void ImplDestroyUnicodeToUtf8Context(void * pContext) +{ + delete static_cast< ImplUnicodeToUtf8Context * >(pContext); +} + +sal_Size ImplConvertUnicodeToUtf8( + void const * pData, void * pContext, sal_Unicode const * pSrcBuf, + sal_Size nSrcChars, char * pDestBuf, sal_Size nDestBytes, sal_uInt32 nFlags, + sal_uInt32 * pInfo, sal_Size * pSrcCvtChars) { int bJavaUtf8 = pData != NULL; sal_Unicode nHighSurrogate = 0xFFFF; |