summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-06 10:26:50 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-06 15:00:43 +0100
commit9c015c0bd1df0ab4be999fe244ced998002cb0f6 (patch)
treebd68ff99ba8ebc659b41ee9cf012fef192a5afeb /sal
parent2e15fcf9240abd80be770e74634068fe12b79741 (diff)
Further clean up.
Diffstat (limited to 'sal')
-rw-r--r--sal/textenc/context.cxx2
-rw-r--r--sal/textenc/context.hxx2
-rw-r--r--sal/textenc/convertadobe.tab6
-rw-r--r--sal/textenc/convertbig5hkscs.cxx9
-rw-r--r--sal/textenc/convertbig5hkscs.hxx6
-rw-r--r--sal/textenc/convertbig5hkscs.tab4
-rw-r--r--sal/textenc/converteuctw.cxx9
-rw-r--r--sal/textenc/converteuctw.hxx8
-rw-r--r--sal/textenc/converteuctw.tab4
-rw-r--r--sal/textenc/convertgb18030.cxx9
-rw-r--r--sal/textenc/convertgb18030.hxx8
-rw-r--r--sal/textenc/convertgb18030.tab4
-rw-r--r--sal/textenc/convertiso2022cn.cxx14
-rw-r--r--sal/textenc/convertiso2022cn.hxx8
-rw-r--r--sal/textenc/convertiso2022cn.tab5
-rw-r--r--sal/textenc/convertiso2022jp.cxx14
-rw-r--r--sal/textenc/convertiso2022jp.hxx8
-rw-r--r--sal/textenc/convertiso2022jp.tab5
-rw-r--r--sal/textenc/convertiso2022kr.cxx14
-rw-r--r--sal/textenc/convertiso2022kr.hxx8
-rw-r--r--sal/textenc/convertiso2022kr.tab5
-rw-r--r--sal/textenc/convertsinglebytetobmpunicode.cxx4
-rw-r--r--sal/textenc/convertsinglebytetobmpunicode.hxx8
-rw-r--r--sal/textenc/tcvtbyte.cxx10
-rw-r--r--sal/textenc/tcvtmb.cxx8
-rw-r--r--sal/textenc/tcvtutf7.cxx4
-rw-r--r--sal/textenc/tcvtutf8.cxx29
-rw-r--r--sal/textenc/tcvtutf8.hxx61
-rw-r--r--sal/textenc/tenchelp.cxx2
-rw-r--r--sal/textenc/tenchelp.hxx55
-rw-r--r--sal/textenc/textenc.cxx16
31 files changed, 227 insertions, 122 deletions
diff --git a/sal/textenc/context.cxx b/sal/textenc/context.cxx
index 4770727b45e6..5faf813a1526 100644
--- a/sal/textenc/context.cxx
+++ b/sal/textenc/context.cxx
@@ -44,7 +44,7 @@ void ImplResetUnicodeToTextContext(void * pContext)
0;
}
-void ImplDestroyContext(void * pContext)
+void ImplDestroyUnicodeToTextContext(void * pContext)
{
delete static_cast< ImplUnicodeToTextContext * >(pContext);
}
diff --git a/sal/textenc/context.hxx b/sal/textenc/context.hxx
index a83006ee3548..74da8738a2c6 100644
--- a/sal/textenc/context.hxx
+++ b/sal/textenc/context.hxx
@@ -42,7 +42,7 @@ void * ImplCreateUnicodeToTextContext();
void ImplResetUnicodeToTextContext(void * pContext);
-void ImplDestroyContext(void * pContext);
+void ImplDestroyUnicodeToTextContext(void * pContext);
#endif
diff --git a/sal/textenc/convertadobe.tab b/sal/textenc/convertadobe.tab
index 98633bb55588..873ad603e80d 100644
--- a/sal/textenc/convertadobe.tab
+++ b/sal/textenc/convertadobe.tab
@@ -298,7 +298,7 @@ ImplTextEncodingData const adobeStandardEncodingData
&rtl_textenc_convertSingleByteToBmpUnicode,
&rtl_textenc_convertBmpUnicodeToSingleByte,
0, 0, 0,
- ImplCreateUnicodeToTextContext, ImplDestroyContext,
+ ImplCreateUnicodeToTextContext, ImplDestroyUnicodeToTextContext,
ImplResetUnicodeToTextContext },
1, 1, 1,
0, 0, "Adobe-Standard-Encoding",
@@ -309,7 +309,7 @@ ImplTextEncodingData const adobeSymbolEncodingData
&rtl_textenc_convertSingleByteToBmpUnicode,
&rtl_textenc_convertBmpUnicodeToSingleByte,
0, 0, 0,
- ImplCreateUnicodeToTextContext, ImplDestroyContext,
+ ImplCreateUnicodeToTextContext, ImplDestroyUnicodeToTextContext,
ImplResetUnicodeToTextContext },
1, 1, 1,
0, 0, "Adobe-Symbol-Encoding",
@@ -320,7 +320,7 @@ ImplTextEncodingData const adobeDingbatsEncodingData
&rtl_textenc_convertSingleByteToBmpUnicode,
&rtl_textenc_convertBmpUnicodeToSingleByte,
0, 0, 0,
- ImplCreateUnicodeToTextContext, ImplDestroyContext,
+ ImplCreateUnicodeToTextContext, ImplDestroyUnicodeToTextContext,
ImplResetUnicodeToTextContext },
1, 1, 1,
0, 0, "Adobe-ZapfDingbats-Encoding",
diff --git a/sal/textenc/convertbig5hkscs.cxx b/sal/textenc/convertbig5hkscs.cxx
index 113a90e2dccb..f1e1275b6690 100644
--- a/sal/textenc/convertbig5hkscs.cxx
+++ b/sal/textenc/convertbig5hkscs.cxx
@@ -62,7 +62,12 @@ void ImplResetBig5HkscsToUnicodeContext(void * pContext)
static_cast< ImplBig5HkscsToUnicodeContext * >(pContext)->m_nRow = 0;
}
-sal_Size ImplConvertBig5HkscsToUnicode(ImplTextConverterData const * pData,
+void ImplDestroyBig5HkscsToUnicodeContext(void * pContext)
+{
+ delete static_cast< ImplBig5HkscsToUnicodeContext * >(pContext);
+}
+
+sal_Size ImplConvertBig5HkscsToUnicode(void const * pData,
void * pContext,
char const * pSrcBuf,
sal_Size nSrcBytes,
@@ -280,7 +285,7 @@ sal_Size ImplConvertBig5HkscsToUnicode(ImplTextConverterData const * pData,
return pDestBufPtr - pDestBuf;
}
-sal_Size ImplConvertUnicodeToBig5Hkscs(ImplTextConverterData const * pData,
+sal_Size ImplConvertUnicodeToBig5Hkscs(void const * pData,
void * pContext,
sal_Unicode const * pSrcBuf,
sal_Size nSrcChars,
diff --git a/sal/textenc/convertbig5hkscs.hxx b/sal/textenc/convertbig5hkscs.hxx
index 92fc3724d07e..f7eb4e185f50 100644
--- a/sal/textenc/convertbig5hkscs.hxx
+++ b/sal/textenc/convertbig5hkscs.hxx
@@ -50,7 +50,9 @@ void * ImplCreateBig5HkscsToUnicodeContext();
void ImplResetBig5HkscsToUnicodeContext(void * pContext);
-sal_Size ImplConvertBig5HkscsToUnicode(ImplTextConverterData const * pData,
+void ImplDestroyBig5HkscsToUnicodeContext(void * pContext);
+
+sal_Size ImplConvertBig5HkscsToUnicode(void const * pData,
void * pContext,
char const * pSrcBuf,
sal_Size nSrcBytes,
@@ -60,7 +62,7 @@ sal_Size ImplConvertBig5HkscsToUnicode(ImplTextConverterData const * pData,
sal_uInt32 * pInfo,
sal_Size * pSrcCvtBytes);
-sal_Size ImplConvertUnicodeToBig5Hkscs(ImplTextConverterData const * pData,
+sal_Size ImplConvertUnicodeToBig5Hkscs(void const * pData,
void * pContext,
sal_Unicode const * pSrcBuf,
sal_Size nSrcChars,
diff --git a/sal/textenc/convertbig5hkscs.tab b/sal/textenc/convertbig5hkscs.tab
index 29720a842b59..bcd4748ddd9f 100644
--- a/sal/textenc/convertbig5hkscs.tab
+++ b/sal/textenc/convertbig5hkscs.tab
@@ -51,10 +51,10 @@ static ImplTextEncodingData const aImplBig5HkscsTextEncodingData
&ImplConvertBig5HkscsToUnicode,
&ImplConvertUnicodeToBig5Hkscs,
&ImplCreateBig5HkscsToUnicodeContext,
- &ImplDestroyContext,
+ &ImplDestroyBig5HkscsToUnicodeContext,
&ImplResetBig5HkscsToUnicodeContext,
&ImplCreateUnicodeToTextContext,
- &ImplDestroyContext,
+ &ImplDestroyUnicodeToTextContext,
&ImplResetUnicodeToTextContext },
1,
2,
diff --git a/sal/textenc/converteuctw.cxx b/sal/textenc/converteuctw.cxx
index 0b6b41bb52d4..09e01d8704ed 100644
--- a/sal/textenc/converteuctw.cxx
+++ b/sal/textenc/converteuctw.cxx
@@ -71,7 +71,12 @@ void ImplResetEucTwToUnicodeContext(void * pContext)
= IMPL_EUC_TW_TO_UNICODE_STATE_0;
}
-sal_Size ImplConvertEucTwToUnicode(ImplTextConverterData const * pData,
+void ImplDestroyEucTwToUnicodeContext(void * pContext)
+{
+ delete static_cast< ImplEucTwToUnicodeContext * >(pContext);
+}
+
+sal_Size ImplConvertEucTwToUnicode(void const * pData,
void * pContext,
char const * pSrcBuf,
sal_Size nSrcBytes,
@@ -293,7 +298,7 @@ sal_Size ImplConvertEucTwToUnicode(ImplTextConverterData const * pData,
return pDestBufPtr - pDestBuf;
}
-sal_Size ImplConvertUnicodeToEucTw(ImplTextConverterData const * pData,
+sal_Size ImplConvertUnicodeToEucTw(void const * pData,
void * pContext,
sal_Unicode const * pSrcBuf,
sal_Size nSrcChars,
diff --git a/sal/textenc/converteuctw.hxx b/sal/textenc/converteuctw.hxx
index 72c24953ba32..b1ab9732a3f4 100644
--- a/sal/textenc/converteuctw.hxx
+++ b/sal/textenc/converteuctw.hxx
@@ -33,8 +33,6 @@
#include "sal/types.h"
-#include "tenchelp.hxx"
-
struct ImplEucTwConverterData
{
sal_uInt16 const * m_pCns116431992ToUnicodeData;
@@ -49,7 +47,9 @@ void * ImplCreateEucTwToUnicodeContext();
void ImplResetEucTwToUnicodeContext(void * pContext);
-sal_Size ImplConvertEucTwToUnicode(ImplTextConverterData const * pData,
+void ImplDestroyEucTwToUnicodeContext(void * pContext);
+
+sal_Size ImplConvertEucTwToUnicode(void const * pData,
void * pContext,
char const * pSrcBuf,
sal_Size nSrcBytes,
@@ -59,7 +59,7 @@ sal_Size ImplConvertEucTwToUnicode(ImplTextConverterData const * pData,
sal_uInt32 * pInfo,
sal_Size * pSrcCvtBytes);
-sal_Size ImplConvertUnicodeToEucTw(ImplTextConverterData const * pData,
+sal_Size ImplConvertUnicodeToEucTw(void const * pData,
void * pContext,
sal_Unicode const * pSrcBuf,
sal_Size nSrcChars,
diff --git a/sal/textenc/converteuctw.tab b/sal/textenc/converteuctw.tab
index 398120bd0696..7e84c2e34a1b 100644
--- a/sal/textenc/converteuctw.tab
+++ b/sal/textenc/converteuctw.tab
@@ -48,10 +48,10 @@ static ImplTextEncodingData const aImplEucTwTextEncodingData
&ImplConvertEucTwToUnicode,
&ImplConvertUnicodeToEucTw,
&ImplCreateEucTwToUnicodeContext,
- &ImplDestroyContext,
+ &ImplDestroyEucTwToUnicodeContext,
&ImplResetEucTwToUnicodeContext,
&ImplCreateUnicodeToTextContext,
- &ImplDestroyContext,
+ &ImplDestroyUnicodeToTextContext,
&ImplResetUnicodeToTextContext },
1,
4,
diff --git a/sal/textenc/convertgb18030.cxx b/sal/textenc/convertgb18030.cxx
index 61daa30c5295..c2bbdc9197c9 100644
--- a/sal/textenc/convertgb18030.cxx
+++ b/sal/textenc/convertgb18030.cxx
@@ -69,7 +69,12 @@ void ImplResetGb18030ToUnicodeContext(void * pContext)
= IMPL_GB_18030_TO_UNICODE_STATE_0;
}
-sal_Size ImplConvertGb18030ToUnicode(ImplTextConverterData const * pData,
+void ImplDestroyGb18030ToUnicodeContext(void * pContext)
+{
+ delete static_cast< ImplGb18030ToUnicodeContext * >(pContext);
+}
+
+sal_Size ImplConvertGb18030ToUnicode(void const * pData,
void * pContext,
char const * pSrcBuf,
sal_Size nSrcBytes,
@@ -284,7 +289,7 @@ sal_Size ImplConvertGb18030ToUnicode(ImplTextConverterData const * pData,
return pDestBufPtr - pDestBuf;
}
-sal_Size ImplConvertUnicodeToGb18030(ImplTextConverterData const * pData,
+sal_Size ImplConvertUnicodeToGb18030(void const * pData,
void * pContext,
sal_Unicode const * pSrcBuf,
sal_Size nSrcChars,
diff --git a/sal/textenc/convertgb18030.hxx b/sal/textenc/convertgb18030.hxx
index cbdc4f3430ce..47f80e898d07 100644
--- a/sal/textenc/convertgb18030.hxx
+++ b/sal/textenc/convertgb18030.hxx
@@ -33,8 +33,6 @@
#include "sal/types.h"
-#include "tenchelp.hxx"
-
struct ImplGb180302000ToUnicodeRange
{
sal_Int32 m_nNonRangeDataIndex;
@@ -63,7 +61,9 @@ void * ImplCreateGb18030ToUnicodeContext();
void ImplResetGb18030ToUnicodeContext(void * pContext);
-sal_Size ImplConvertGb18030ToUnicode(ImplTextConverterData const * pData,
+void ImplDestroyGb18030ToUnicodeContext(void * pContext);
+
+sal_Size ImplConvertGb18030ToUnicode(void const * pData,
void * pContext,
char const * pSrcBuf,
sal_Size nSrcBytes,
@@ -73,7 +73,7 @@ sal_Size ImplConvertGb18030ToUnicode(ImplTextConverterData const * pData,
sal_uInt32 * pInfo,
sal_Size * pSrcCvtBytes);
-sal_Size ImplConvertUnicodeToGb18030(ImplTextConverterData const * pData,
+sal_Size ImplConvertUnicodeToGb18030(void const * pData,
void * pContext,
sal_Unicode const * pSrcBuf,
sal_Size nSrcChars,
diff --git a/sal/textenc/convertgb18030.tab b/sal/textenc/convertgb18030.tab
index 2bc290c69578..fe6719b5f323 100644
--- a/sal/textenc/convertgb18030.tab
+++ b/sal/textenc/convertgb18030.tab
@@ -45,10 +45,10 @@ static ImplTextEncodingData const aImplGb18030TextEncodingData
&ImplConvertGb18030ToUnicode,
&ImplConvertUnicodeToGb18030,
&ImplCreateGb18030ToUnicodeContext,
- &ImplDestroyContext,
+ &ImplDestroyGb18030ToUnicodeContext,
&ImplResetGb18030ToUnicodeContext,
&ImplCreateUnicodeToTextContext,
- &ImplDestroyContext,
+ &ImplDestroyUnicodeToTextContext,
&ImplResetUnicodeToTextContext },
1,
4,
diff --git a/sal/textenc/convertiso2022cn.cxx b/sal/textenc/convertiso2022cn.cxx
index 6c317225ae67..98b9aa1721fb 100644
--- a/sal/textenc/convertiso2022cn.cxx
+++ b/sal/textenc/convertiso2022cn.cxx
@@ -98,7 +98,12 @@ void ImplResetIso2022CnToUnicodeContext(void * pContext)
}
}
-sal_Size ImplConvertIso2022CnToUnicode(ImplTextConverterData const * pData,
+void ImplDestroyIso2022CnToUnicodeContext(void * pContext)
+{
+ delete static_cast< ImplIso2022CnToUnicodeContext * >(pContext);
+}
+
+sal_Size ImplConvertIso2022CnToUnicode(void const * pData,
void * pContext,
char const * pSrcBuf,
sal_Size nSrcBytes,
@@ -445,6 +450,11 @@ void ImplResetUnicodeToIso2022CnContext(void * pContext)
}
}
+void ImplDestroyUnicodeToIso2022CnContext(void * pContext)
+{
+ delete static_cast< ImplUnicodeToIso2022CnContext * >(pContext);
+}
+
static sal_uInt32 ImplIso2022CnTranslateTo2312(ImplUniToDBCSHighTab const *
pGb2312Data,
sal_uInt32 nChar)
@@ -489,7 +499,7 @@ ImplIso2022CnTranslateTo116431(sal_uInt8 const * pCns116431992Data,
| (0x20 + pCns116431992Data[nOffset + 1]);
}
-sal_Size ImplConvertUnicodeToIso2022Cn(ImplTextConverterData const * pData,
+sal_Size ImplConvertUnicodeToIso2022Cn(void const * pData,
void * pContext,
sal_Unicode const * pSrcBuf,
sal_Size nSrcChars,
diff --git a/sal/textenc/convertiso2022cn.hxx b/sal/textenc/convertiso2022cn.hxx
index dc2cccf62d3d..c612e413045a 100644
--- a/sal/textenc/convertiso2022cn.hxx
+++ b/sal/textenc/convertiso2022cn.hxx
@@ -51,7 +51,9 @@ void * ImplCreateIso2022CnToUnicodeContext();
void ImplResetIso2022CnToUnicodeContext(void * pContext);
-sal_Size ImplConvertIso2022CnToUnicode(ImplTextConverterData const * pData,
+void ImplDestroyIso2022CnToUnicodeContext(void * pContext);
+
+sal_Size ImplConvertIso2022CnToUnicode(void const * pData,
void * pContext,
char const * pSrcBuf,
sal_Size nSrcBytes,
@@ -65,7 +67,9 @@ void * ImplCreateUnicodeToIso2022CnContext();
void ImplResetUnicodeToIso2022CnContext(void * pContext);
-sal_Size ImplConvertUnicodeToIso2022Cn(ImplTextConverterData const * pData,
+void ImplDestroyUnicodeToIso2022CnContext(void * pContext);
+
+sal_Size ImplConvertUnicodeToIso2022Cn(void const * pData,
void * pContext,
sal_Unicode const * pSrcBuf,
sal_Size nSrcChars,
diff --git a/sal/textenc/convertiso2022cn.tab b/sal/textenc/convertiso2022cn.tab
index 319325f3a243..13d6d972e77a 100644
--- a/sal/textenc/convertiso2022cn.tab
+++ b/sal/textenc/convertiso2022cn.tab
@@ -30,7 +30,6 @@
#include "rtl/tencinfo.h"
#include "rtl/textenc.h"
-#include "context.hxx"
#include "convertiso2022cn.hxx"
#include "tenchelp.hxx"
@@ -53,10 +52,10 @@ static ImplTextEncodingData const aImplIso2022CnTextEncodingData
&ImplConvertIso2022CnToUnicode,
&ImplConvertUnicodeToIso2022Cn,
&ImplCreateIso2022CnToUnicodeContext,
- &ImplDestroyContext,
+ &ImplDestroyIso2022CnToUnicodeContext,
&ImplResetIso2022CnToUnicodeContext,
&ImplCreateUnicodeToIso2022CnContext,
- &ImplDestroyContext,
+ &ImplDestroyUnicodeToIso2022CnContext,
&ImplResetUnicodeToIso2022CnContext },
1,
8,
diff --git a/sal/textenc/convertiso2022jp.cxx b/sal/textenc/convertiso2022jp.cxx
index 7961f150e124..f40d6ada70ec 100644
--- a/sal/textenc/convertiso2022jp.cxx
+++ b/sal/textenc/convertiso2022jp.cxx
@@ -79,7 +79,12 @@ void ImplResetIso2022JpToUnicodeContext(void * pContext)
= IMPL_ISO_2022_JP_TO_UNICODE_STATE_ASCII;
}
-sal_Size ImplConvertIso2022JpToUnicode(ImplTextConverterData const * pData,
+void ImplDestroyIso2022JpToUnicodeContext(void * pContext)
+{
+ delete static_cast< ImplIso2022JpToUnicodeContext * >(pContext);
+}
+
+sal_Size ImplConvertIso2022JpToUnicode(void const * pData,
void * pContext,
char const * pSrcBuf,
sal_Size nSrcBytes,
@@ -324,7 +329,12 @@ void ImplResetUnicodeToIso2022JpContext(void * pContext)
}
}
-sal_Size ImplConvertUnicodeToIso2022Jp(ImplTextConverterData const * pData,
+void ImplDestroyUnicodeToIso2022JpContext(void * pContext)
+{
+ delete static_cast< ImplUnicodeToIso2022JpContext * >(pContext);
+}
+
+sal_Size ImplConvertUnicodeToIso2022Jp(void const * pData,
void * pContext,
sal_Unicode const * pSrcBuf,
sal_Size nSrcChars,
diff --git a/sal/textenc/convertiso2022jp.hxx b/sal/textenc/convertiso2022jp.hxx
index e7f05e8dd517..4ecce9ee69e8 100644
--- a/sal/textenc/convertiso2022jp.hxx
+++ b/sal/textenc/convertiso2022jp.hxx
@@ -45,7 +45,9 @@ void * ImplCreateIso2022JpToUnicodeContext();
void ImplResetIso2022JpToUnicodeContext(void * pContext);
-sal_Size ImplConvertIso2022JpToUnicode(ImplTextConverterData const * pData,
+void ImplDestroyIso2022JpToUnicodeContext(void * pContext);
+
+sal_Size ImplConvertIso2022JpToUnicode(void const * pData,
void * pContext,
char const * pSrcBuf,
sal_Size nSrcBytes,
@@ -59,7 +61,9 @@ void * ImplCreateUnicodeToIso2022JpContext();
void ImplResetUnicodeToIso2022JpContext(void * pContext);
-sal_Size ImplConvertUnicodeToIso2022Jp(ImplTextConverterData const * pData,
+void ImplDestroyUnicodeToIso2022JpContext(void * pContext);
+
+sal_Size ImplConvertUnicodeToIso2022Jp(void const * pData,
void * pContext,
sal_Unicode const * pSrcBuf,
sal_Size nSrcChars,
diff --git a/sal/textenc/convertiso2022jp.tab b/sal/textenc/convertiso2022jp.tab
index a3c97fa7e9fa..c87ac6ca9e97 100644
--- a/sal/textenc/convertiso2022jp.tab
+++ b/sal/textenc/convertiso2022jp.tab
@@ -30,7 +30,6 @@
#include "rtl/tencinfo.h"
#include "rtl/textenc.h"
-#include "context.hxx"
#include "convertiso2022jp.hxx"
#include "tenchelp.hxx"
@@ -43,10 +42,10 @@ static ImplTextEncodingData const aImplIso2022JpTextEncodingData
&ImplConvertIso2022JpToUnicode,
&ImplConvertUnicodeToIso2022Jp,
&ImplCreateIso2022JpToUnicodeContext,
- &ImplDestroyContext,
+ &ImplDestroyIso2022JpToUnicodeContext,
&ImplResetIso2022JpToUnicodeContext,
&ImplCreateUnicodeToIso2022JpContext,
- &ImplDestroyContext,
+ &ImplDestroyUnicodeToIso2022JpContext,
&ImplResetUnicodeToIso2022JpContext },
1,
8,
diff --git a/sal/textenc/convertiso2022kr.cxx b/sal/textenc/convertiso2022kr.cxx
index d2b2e8731bbf..2e796645b1c1 100644
--- a/sal/textenc/convertiso2022kr.cxx
+++ b/sal/textenc/convertiso2022kr.cxx
@@ -85,7 +85,12 @@ void ImplResetIso2022KrToUnicodeContext(void * pContext)
= IMPL_ISO_2022_KR_TO_UNICODE_STATE_ASCII;
}
-sal_Size ImplConvertIso2022KrToUnicode(ImplTextConverterData const * pData,
+void ImplDestroyIso2022KrToUnicodeContext(void * pContext)
+{
+ delete static_cast< ImplIso2022KrToUnicodeContext * >(pContext);
+}
+
+sal_Size ImplConvertIso2022KrToUnicode(void const * pData,
void * pContext,
char const * pSrcBuf,
sal_Size nSrcBytes,
@@ -288,7 +293,12 @@ void ImplResetUnicodeToIso2022KrContext(void * pContext)
}
}
-sal_Size ImplConvertUnicodeToIso2022Kr(ImplTextConverterData const * pData,
+void ImplDestroyUnicodeToIso2022KrContext(void * pContext)
+{
+ delete static_cast< ImplUnicodeToIso2022KrContext * >(pContext);
+}
+
+sal_Size ImplConvertUnicodeToIso2022Kr(void const * pData,
void * pContext,
sal_Unicode const * pSrcBuf,
sal_Size nSrcChars,
diff --git a/sal/textenc/convertiso2022kr.hxx b/sal/textenc/convertiso2022kr.hxx
index c4a93c63786a..0719798ba3f9 100644
--- a/sal/textenc/convertiso2022kr.hxx
+++ b/sal/textenc/convertiso2022kr.hxx
@@ -45,7 +45,9 @@ void * ImplCreateIso2022KrToUnicodeContext();
void ImplResetIso2022KrToUnicodeContext(void * pContext);
-sal_Size ImplConvertIso2022KrToUnicode(ImplTextConverterData const * pData,
+void ImplDestroyIso2022KrToUnicodeContext(void * pContext);
+
+sal_Size ImplConvertIso2022KrToUnicode(void const * pData,
void * pContext,
char const * pSrcBuf,
sal_Size nSrcBytes,
@@ -59,7 +61,9 @@ void * ImplCreateUnicodeToIso2022KrContext();
void ImplResetUnicodeToIso2022KrContext(void * pContext);
-sal_Size ImplConvertUnicodeToIso2022Kr(ImplTextConverterData const * pData,
+void ImplDestroyUnicodeToIso2022KrContext(void * pContext);
+
+sal_Size ImplConvertUnicodeToIso2022Kr(void const * pData,
void * pContext,
sal_Unicode const * pSrcBuf,
sal_Size nSrcChars,
diff --git a/sal/textenc/convertiso2022kr.tab b/sal/textenc/convertiso2022kr.tab
index 86cf889c7bf7..848b8cc40354 100644
--- a/sal/textenc/convertiso2022kr.tab
+++ b/sal/textenc/convertiso2022kr.tab
@@ -30,7 +30,6 @@
#include "rtl/tencinfo.h"
#include "rtl/textenc.h"
-#include "context.hxx"
#include "convertiso2022kr.hxx"
#include "tenchelp.hxx"
@@ -43,10 +42,10 @@ static ImplTextEncodingData const aImplIso2022KrTextEncodingData
&ImplConvertIso2022KrToUnicode,
&ImplConvertUnicodeToIso2022Kr,
&ImplCreateIso2022KrToUnicodeContext,
- &ImplDestroyContext,
+ &ImplDestroyIso2022KrToUnicodeContext,
&ImplResetIso2022KrToUnicodeContext,
&ImplCreateUnicodeToIso2022KrContext,
- &ImplDestroyContext,
+ &ImplDestroyUnicodeToIso2022KrContext,
&ImplResetUnicodeToIso2022KrContext },
1,
8,
diff --git a/sal/textenc/convertsinglebytetobmpunicode.cxx b/sal/textenc/convertsinglebytetobmpunicode.cxx
index b485f88c7899..f94eed26d100 100644
--- a/sal/textenc/convertsinglebytetobmpunicode.cxx
+++ b/sal/textenc/convertsinglebytetobmpunicode.cxx
@@ -40,7 +40,7 @@
#include "unichars.hxx"
sal_Size rtl_textenc_convertSingleByteToBmpUnicode(
- ImplTextConverterData const * data, void *, sal_Char const * srcBuf,
+ void const * data, void *, sal_Char const * srcBuf,
sal_Size srcBytes, sal_Unicode * destBuf, sal_Size destChars,
sal_uInt32 flags, sal_uInt32 * info, sal_Size * srcCvtBytes)
{
@@ -93,7 +93,7 @@ sal_Size rtl_textenc_convertSingleByteToBmpUnicode(
}
sal_Size rtl_textenc_convertBmpUnicodeToSingleByte(
- ImplTextConverterData const * data, void * context,
+ void const * data, void * context,
sal_Unicode const * srcBuf, sal_Size srcChars, sal_Char * destBuf,
sal_Size destBytes, sal_uInt32 flags, sal_uInt32 * info,
sal_Size * srcCvtChars)
diff --git a/sal/textenc/convertsinglebytetobmpunicode.hxx b/sal/textenc/convertsinglebytetobmpunicode.hxx
index a55ca53c8b20..81a2653c952c 100644
--- a/sal/textenc/convertsinglebytetobmpunicode.hxx
+++ b/sal/textenc/convertsinglebytetobmpunicode.hxx
@@ -110,8 +110,8 @@ struct BmpUnicodeToSingleByteConverterData {
@see ImplConvertToUnicodeProc
*/
-extern "C" sal_Size rtl_textenc_convertSingleByteToBmpUnicode(
- ImplTextConverterData const * data, void * context, sal_Char const * srcBuf,
+sal_Size rtl_textenc_convertSingleByteToBmpUnicode(
+ void const * data, void * context, sal_Char const * srcBuf,
sal_Size srcBytes, sal_Unicode * destBuf, sal_Size destChars,
sal_uInt32 flags, sal_uInt32 * info, sal_Size * srcCvtBytes);
@@ -120,8 +120,8 @@ extern "C" sal_Size rtl_textenc_convertSingleByteToBmpUnicode(
@see ImplConvertToTextProc
*/
-extern "C" sal_Size rtl_textenc_convertBmpUnicodeToSingleByte(
- ImplTextConverterData const * data, void * context,
+sal_Size rtl_textenc_convertBmpUnicodeToSingleByte(
+ void const * data, void * context,
sal_Unicode const * srcBuf, sal_Size srcChars, sal_Char * destBuf,
sal_Size destBytes, sal_uInt32 flags, sal_uInt32 * info,
sal_Size * srcCvtChars);
diff --git a/sal/textenc/tcvtbyte.cxx b/sal/textenc/tcvtbyte.cxx
index 9296d68f2c0d..b1d5b4a92fe3 100644
--- a/sal/textenc/tcvtbyte.cxx
+++ b/sal/textenc/tcvtbyte.cxx
@@ -469,7 +469,7 @@ const sal_uInt16* ImplGetReplaceString( sal_Unicode c )
/* ======================================================================= */
-sal_Size ImplSymbolToUnicode( const ImplTextConverterData*,
+sal_Size ImplSymbolToUnicode( const void*,
void*,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
@@ -507,7 +507,7 @@ sal_Size ImplSymbolToUnicode( const ImplTextConverterData*,
/* ----------------------------------------------------------------------- */
-sal_Size ImplUnicodeToSymbol( const ImplTextConverterData* pData,
+sal_Size ImplUnicodeToSymbol( const void* pData,
void*,
const sal_Unicode* pSrcBuf, sal_Size nSrcChars,
char* pDestBuf, sal_Size nDestBytes,
@@ -572,7 +572,7 @@ sal_Size ImplUnicodeToSymbol( const ImplTextConverterData* pData,
/* ======================================================================= */
-sal_Size ImplCharToUnicode( const ImplTextConverterData* pData,
+sal_Size ImplCharToUnicode( const void* pData,
void*,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
@@ -636,7 +636,7 @@ sal_Size ImplCharToUnicode( const ImplTextConverterData* pData,
/* ----------------------------------------------------------------------- */
-sal_Size ImplUpperCharToUnicode( const ImplTextConverterData* pData,
+sal_Size ImplUpperCharToUnicode( const void* pData,
void*,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
@@ -747,7 +747,7 @@ static int ImplConvertUnicodeCharToChar(
/* ----------------------------------------------------------------------- */
-sal_Size ImplUnicodeToChar( const ImplTextConverterData* pData,
+sal_Size ImplUnicodeToChar( const void* pData,
void*,
const sal_Unicode* pSrcBuf, sal_Size nSrcChars,
char* pDestBuf, sal_Size nDestBytes,
diff --git a/sal/textenc/tcvtmb.cxx b/sal/textenc/tcvtmb.cxx
index fcaba0914ec2..e968beeb0062 100644
--- a/sal/textenc/tcvtmb.cxx
+++ b/sal/textenc/tcvtmb.cxx
@@ -42,7 +42,7 @@
/* ======================================================================= */
-sal_Size ImplDBCSToUnicode( const ImplTextConverterData* pData, void*,
+sal_Size ImplDBCSToUnicode( const void* pData, void*,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
sal_uInt32 nFlags, sal_uInt32* pInfo,
@@ -222,7 +222,7 @@ sal_Size ImplDBCSToUnicode( const ImplTextConverterData* pData, void*,
/* ----------------------------------------------------------------------- */
-sal_Size ImplUnicodeToDBCS( const ImplTextConverterData* pData, void*,
+sal_Size ImplUnicodeToDBCS( const void* pData, void*,
const sal_Unicode* pSrcBuf, sal_Size nSrcChars,
char* pDestBuf, sal_Size nDestBytes,
sal_uInt32 nFlags, sal_uInt32* pInfo,
@@ -388,7 +388,7 @@ sal_Size ImplUnicodeToDBCS( const ImplTextConverterData* pData, void*,
/* ----------------------------------------------------------------------- */
-sal_Size ImplEUCJPToUnicode( const ImplTextConverterData* pData,
+sal_Size ImplEUCJPToUnicode( const void* pData,
void*,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
@@ -551,7 +551,7 @@ sal_Size ImplEUCJPToUnicode( const ImplTextConverterData* pData,
/* ----------------------------------------------------------------------- */
-sal_Size ImplUnicodeToEUCJP( const ImplTextConverterData* pData,
+sal_Size ImplUnicodeToEUCJP( const void* pData,
void*,
const sal_Unicode* pSrcBuf, sal_Size nSrcChars,
char* pDestBuf, sal_Size nDestBytes,
diff --git a/sal/textenc/tcvtutf7.cxx b/sal/textenc/tcvtutf7.cxx
index c01e20240eeb..79dc5522d971 100644
--- a/sal/textenc/tcvtutf7.cxx
+++ b/sal/textenc/tcvtutf7.cxx
@@ -143,7 +143,7 @@ void ImplUTF7ResetTextToUnicodeContext( void* pContext )
/* ----------------------------------------------------------------------- */
-sal_Size ImplUTF7ToUnicode( const ImplTextConverterData*, void* pContext,
+sal_Size ImplUTF7ToUnicode( const void*, void* pContext,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
sal_uInt32 nFlags, sal_uInt32* pInfo,
@@ -436,7 +436,7 @@ void ImplUTF7ResetUnicodeToTextContext( void* pContext )
/* ----------------------------------------------------------------------- */
-sal_Size ImplUnicodeToUTF7( const ImplTextConverterData*, void* pContext,
+sal_Size ImplUnicodeToUTF7( const void*, void* pContext,
const sal_Unicode* pSrcBuf, sal_Size nSrcChars,
char* pDestBuf, sal_Size nDestBytes,
sal_uInt32, sal_uInt32* pInfo,
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;
diff --git a/sal/textenc/tcvtutf8.hxx b/sal/textenc/tcvtutf8.hxx
new file mode 100644
index 000000000000..35e54d34e496
--- /dev/null
+++ b/sal/textenc/tcvtutf8.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * [ Copyright (C) 2012 Red Hat, Inc., Stephan Bergmann <sbergman@redhat.com>
+ * (initial developer) ]
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#ifndef INCLUDED_SAL_TEXTENC_TCVTUTF8_HXX
+#define INCLUDED_SAL_TEXTENC_TCVTUTF8_HXX
+
+#include "sal/config.h"
+
+#include "sal/types.h"
+
+void * ImplCreateUtf8ToUnicodeContext();
+
+void ImplResetUtf8ToUnicodeContext(void * pContext);
+
+void ImplDestroyUtf8ToUnicodeContext(void * 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);
+
+void * ImplCreateUnicodeToUtf8Context();
+
+void ImplResetUnicodeToUtf8Context(void * pContext);
+
+void ImplDestroyUnicodeToUtf8Context(void * 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);
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/textenc/tenchelp.cxx b/sal/textenc/tenchelp.cxx
index ddc84dc18d70..c76d03db658f 100644
--- a/sal/textenc/tenchelp.cxx
+++ b/sal/textenc/tenchelp.cxx
@@ -116,7 +116,7 @@ sal_Unicode ImplGetUndefinedUnicodeChar(sal_uChar cChar, sal_uInt32 nFlags)
/* ----------------------------------------------------------------------- */
bool
-ImplHandleUndefinedUnicodeToTextChar(ImplTextConverterData const *,
+ImplHandleUndefinedUnicodeToTextChar(void const *,
sal_Unicode const ** ppSrcBuf,
sal_Unicode const * pEndSrcBuf,
char ** ppDestBuf,
diff --git a/sal/textenc/tenchelp.hxx b/sal/textenc/tenchelp.hxx
index 5c069f90a7ea..60cd61018a4c 100644
--- a/sal/textenc/tenchelp.hxx
+++ b/sal/textenc/tenchelp.hxx
@@ -42,10 +42,8 @@
/* - TextConverter - */
/* ----------------- */
-typedef void ImplTextConverterData;
-
typedef
-sal_Size (* ImplConvertToUnicodeProc)(ImplTextConverterData const * pData,
+sal_Size (* ImplConvertToUnicodeProc)(void const * pData,
void * pContext,
char const * pSrcBuf,
sal_Size nSrcBytes,
@@ -56,7 +54,7 @@ sal_Size (* ImplConvertToUnicodeProc)(ImplTextConverterData const * pData,
sal_Size * pSrcCvtBytes);
typedef
-sal_Size (* ImplConvertToTextProc)(ImplTextConverterData const * pData,
+sal_Size (* ImplConvertToTextProc)(void const * pData,
void * pContext,
sal_Unicode const * pSrcBuf,
sal_Size nSrcChars,
@@ -66,13 +64,13 @@ sal_Size (* ImplConvertToTextProc)(ImplTextConverterData const * pData,
sal_uInt32 * pInfo,
sal_Size * pSrcCvtChars);
-typedef void * (* ImplCreateTextContextProc)(void);
+typedef void * (* ImplCreateTextContextProc)();
typedef void (* ImplDestroyTextContextProc)(void * pContext);
typedef void (* ImplResetTextContextProc)(void * pContext);
-typedef void * (* ImplCreateUnicodeContextProc)(void);
+typedef void * (* ImplCreateUnicodeContextProc)();
typedef void (* ImplDestroyUnicodeContextProc)(void * pContext);
@@ -80,7 +78,7 @@ typedef void (* ImplResetUnicodeContextProc)(void * pContext);
struct ImplTextConverter
{
- ImplTextConverterData const * mpConvertData;
+ void const * mpConvertData;
ImplConvertToUnicodeProc mpConvertTextToUnicodeProc;
ImplConvertToTextProc mpConvertUnicodeToTextProc;
ImplCreateTextContextProc mpCreateTextToUnicodeContext;
@@ -204,7 +202,7 @@ struct ImplEUCJPConvertData
sal_Unicode ImplGetUndefinedUnicodeChar(sal_uChar cChar, sal_uInt32 nFlags);
bool
-ImplHandleUndefinedUnicodeToTextChar(ImplTextConverterData const * pData,
+ImplHandleUndefinedUnicodeToTextChar(void const * pData,
sal_Unicode const ** ppSrcBuf,
sal_Unicode const * pEndSrcBuf,
char ** ppDestBuf,
@@ -217,81 +215,66 @@ ImplHandleUndefinedUnicodeToTextChar(ImplTextConverterData const * pData,
/* - TextConverter - Functions - */
/* ----------------------------- */
-sal_Size ImplSymbolToUnicode( const ImplTextConverterData* pData, void* pContext,
+sal_Size ImplSymbolToUnicode( const void* pData, void* pContext,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
sal_uInt32 nFlags, sal_uInt32* pInfo, sal_Size* pSrcCvtBytes );
-sal_Size ImplUnicodeToSymbol( const ImplTextConverterData* pData, void* pContext,
+sal_Size ImplUnicodeToSymbol( const void* pData, void* pContext,
const sal_Unicode* pSrcBuf, sal_Size nSrcChars,
char* pDestBuf, sal_Size nDestBytes,
sal_uInt32 nFlags, sal_uInt32* pInfo, sal_Size* pSrcCvtChars );
-sal_Size ImplCharToUnicode( const ImplTextConverterData* pData, void* pContext,
+sal_Size ImplCharToUnicode( const void* pData, void* pContext,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
sal_uInt32 nFlags, sal_uInt32* pInfo, sal_Size* pSrcCvtBytes );
/** For those encodings only with unicode range of 0x80 to 0xFF. */
-sal_Size ImplUpperCharToUnicode( const ImplTextConverterData* pData, void* pContext,
+sal_Size ImplUpperCharToUnicode( const void* pData, void* pContext,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
sal_uInt32 nFlags, sal_uInt32* pInfo, sal_Size* pSrcCvtBytes );
-sal_Size ImplUnicodeToChar( const ImplTextConverterData* pData, void* pContext,
+sal_Size ImplUnicodeToChar( const void* pData, void* pContext,
const sal_Unicode* pSrcBuf, sal_Size nSrcChars,
char* pDestBuf, sal_Size nDestBytes,
sal_uInt32 nFlags, sal_uInt32* pInfo, sal_Size* pSrcCvtChars );
-sal_Size ImplDBCSToUnicode( const ImplTextConverterData* pData, void* pContext,
+sal_Size ImplDBCSToUnicode( const void* pData, void* pContext,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
sal_uInt32 nFlags, sal_uInt32* pInfo,
sal_Size* pSrcCvtBytes );
-sal_Size ImplUnicodeToDBCS( const ImplTextConverterData* pData, void* pContext,
+sal_Size ImplUnicodeToDBCS( const void* pData, void* pContext,
const sal_Unicode* pSrcBuf, sal_Size nSrcChars,
char* pDestBuf, sal_Size nDestBytes,
sal_uInt32 nFlags, sal_uInt32* pInfo,
sal_Size* pSrcCvtChars );
-sal_Size ImplEUCJPToUnicode( const ImplTextConverterData* pData,
+sal_Size ImplEUCJPToUnicode( const void* pData,
void* pContext,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
sal_uInt32 nFlags, sal_uInt32* pInfo,
sal_Size* pSrcCvtBytes );
-sal_Size ImplUnicodeToEUCJP( const ImplTextConverterData* pData,
+sal_Size ImplUnicodeToEUCJP( const void* pData,
void* pContext,
const sal_Unicode* pSrcBuf, sal_Size nSrcChars,
char* pDestBuf, sal_Size nDestBytes,
sal_uInt32 nFlags, sal_uInt32* pInfo,
sal_Size* pSrcCvtChars );
-void* ImplUTF7CreateUTF7TextToUnicodeContext( void );
+void* ImplUTF7CreateUTF7TextToUnicodeContext();
void ImplUTF7DestroyTextToUnicodeContext( void* pContext );
void ImplUTF7ResetTextToUnicodeContext( void* pContext );
-sal_Size ImplUTF7ToUnicode( const ImplTextConverterData* pData, void* pContext,
+sal_Size ImplUTF7ToUnicode( const void* pData, void* pContext,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
sal_uInt32 nFlags, sal_uInt32* pInfo,
sal_Size* pSrcCvtBytes );
-void* ImplUTF7CreateUnicodeToTextContext( void );
+void* ImplUTF7CreateUnicodeToTextContext();
void ImplUTF7DestroyUnicodeToTextContext( void* pContext );
void ImplUTF7ResetUnicodeToTextContext( void* pContext );
-sal_Size ImplUnicodeToUTF7( const ImplTextConverterData* pData, void* pContext,
+sal_Size ImplUnicodeToUTF7( const void* pData, void* pContext,
const sal_Unicode* pSrcBuf, sal_Size nSrcChars,
char* pDestBuf, sal_Size nDestBytes,
sal_uInt32 nFlags, sal_uInt32* pInfo,
sal_Size* pSrcCvtChars );
-void * ImplCreateUtf8ToUnicodeContext(void);
-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 * ImplCreateUnicodeToUtf8Context(void);
-void ImplResetUnicodeToUtf8Context(void * pContext);
-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);
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/textenc/textenc.cxx b/sal/textenc/textenc.cxx
index cc226100e58e..164aab22f356 100644
--- a/sal/textenc/textenc.cxx
+++ b/sal/textenc/textenc.cxx
@@ -32,6 +32,7 @@
#include "sal/config.h"
+#include <cstddef>
#include <cstdlib>
#include "boost/noncopyable.hpp"
@@ -44,15 +45,10 @@
#include "sal/macros.h"
#include "sal/types.h"
-#include "context.hxx"
#include "gettextencodingdata.hxx"
+#include "tcvtutf8.hxx"
#include "tenchelp.hxx"
-#ifndef INCLUDED_STDDEF_H
-#include <stddef.h>
-#define INCLUDED_STDDEF_H
-#endif
-
#define NOTABUNI_START 0xFF
#define NOTABUNI_END 0x00
@@ -324,10 +320,10 @@ static ImplTextEncodingData const aImplUTF8TextEncodingData
&ImplConvertUtf8ToUnicode,
&ImplConvertUnicodeToUtf8,
&ImplCreateUtf8ToUnicodeContext,
- &ImplDestroyContext,
+ &ImplDestroyUtf8ToUnicodeContext,
&ImplResetUtf8ToUnicodeContext,
&ImplCreateUnicodeToUtf8Context,
- &ImplDestroyContext,
+ &ImplDestroyUnicodeToUtf8Context,
&ImplResetUnicodeToUtf8Context },
1,
6,
@@ -351,10 +347,10 @@ static ImplTextEncodingData const aImplJavaUtf8TextEncodingData
&ImplConvertUtf8ToUnicode,
&ImplConvertUnicodeToUtf8,
&ImplCreateUtf8ToUnicodeContext,
- &ImplDestroyContext,
+ &ImplDestroyUtf8ToUnicodeContext,
&ImplResetUtf8ToUnicodeContext,
&ImplCreateUnicodeToUtf8Context,
- &ImplDestroyContext,
+ &ImplDestroyUnicodeToUtf8Context,
&ImplResetUnicodeToUtf8Context },
1,
3,