merge the formfield patch from ooo-build
[ooovba.git] / sal / textenc / convertgb18030.h
blobd77fdf8db09bdd4f2ba917323979ee70ae999679
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: convertgb18030.h,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef INCLUDED_RTL_TEXTENC_CONVERTGB18030_H
32 #define INCLUDED_RTL_TEXTENC_CONVERTGB18030_H
34 #include "tenchelp.h"
35 #include "sal/types.h"
37 #if defined __cplusplus
38 extern "C" {
39 #endif /* __cpluscplus */
41 typedef struct
43 sal_Int32 m_nNonRangeDataIndex;
44 sal_uInt32 m_nFirstLinear;
45 sal_uInt32 m_nPastLinear;
46 sal_Unicode m_nFirstUnicode;
47 } ImplGb180302000ToUnicodeRange;
49 typedef struct
51 sal_Int32 m_nNonRangeDataIndex;
52 sal_Unicode m_nFirstUnicode;
53 sal_Unicode m_nLastUnicode;
54 sal_uInt32 m_nFirstLinear;
55 } ImplUnicodeToGb180302000Range;
57 typedef struct
59 sal_Unicode const * m_pGb18030ToUnicodeData;
60 ImplGb180302000ToUnicodeRange const * m_pGb18030ToUnicodeRanges;
61 sal_uInt32 const * m_pUnicodeToGb18030Data;
62 ImplUnicodeToGb180302000Range const * m_pUnicodeToGb18030Ranges;
63 } ImplGb18030ConverterData;
65 void * ImplCreateGb18030ToUnicodeContext(void) SAL_THROW_EXTERN_C();
67 void ImplResetGb18030ToUnicodeContext(void * pContext) SAL_THROW_EXTERN_C();
69 sal_Size ImplConvertGb18030ToUnicode(ImplTextConverterData const * pData,
70 void * pContext,
71 sal_Char const * pSrcBuf,
72 sal_Size nSrcBytes,
73 sal_Unicode * pDestBuf,
74 sal_Size nDestChars,
75 sal_uInt32 nFlags,
76 sal_uInt32 * pInfo,
77 sal_Size * pSrcCvtBytes)
78 SAL_THROW_EXTERN_C();
80 sal_Size ImplConvertUnicodeToGb18030(ImplTextConverterData const * pData,
81 void * pContext,
82 sal_Unicode const * pSrcBuf,
83 sal_Size nSrcChars,
84 sal_Char * pDestBuf,
85 sal_Size nDestBytes,
86 sal_uInt32 nFlags,
87 sal_uInt32 * pInfo,
88 sal_Size * pSrcCvtChars)
89 SAL_THROW_EXTERN_C();
91 #if defined __cplusplus
93 #endif /* __cpluscplus */
95 #endif /* INCLUDED_RTL_TEXTENC_CONVERTGB18030_H */