UDK 3.2.7 C/C++ API Reference
|
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 00002 /************************************************************************* 00003 * 00004 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 00005 * 00006 * Copyright 2000, 2010 Oracle and/or its affiliates. 00007 * 00008 * OpenOffice.org - a multi-platform office productivity suite 00009 * 00010 * This file is part of OpenOffice.org. 00011 * 00012 * OpenOffice.org is free software: you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License version 3 00014 * only, as published by the Free Software Foundation. 00015 * 00016 * OpenOffice.org is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Lesser General Public License version 3 for more details 00020 * (a copy is included in the LICENSE file that accompanied this code). 00021 * 00022 * You should have received a copy of the GNU Lesser General Public License 00023 * version 3 along with OpenOffice.org. If not, see 00024 * <http://www.openoffice.org/license.html> 00025 * for a copy of the LGPLv3 License. 00026 * 00027 ************************************************************************/ 00028 00029 #ifndef _RTL_TENCINFO_H 00030 #define _RTL_TENCINFO_H 00031 00032 #ifndef _SAL_TYPES_H 00033 #include <sal/types.h> 00034 #endif 00035 #include <rtl/textenc.h> 00036 00037 #ifdef __cplusplus 00038 extern "C" { 00039 #endif 00040 00041 // See rtl_TextEncodingInfo.Flags below for documentation on these values: 00042 #define RTL_TEXTENCODING_INFO_CONTEXT ((sal_uInt32)0x00000001) 00043 #define RTL_TEXTENCODING_INFO_ASCII ((sal_uInt32)0x00000002) 00044 #define RTL_TEXTENCODING_INFO_UNICODE ((sal_uInt32)0x00000004) 00045 #define RTL_TEXTENCODING_INFO_MULTIBYTE ((sal_uInt32)0x00000008) 00046 #define RTL_TEXTENCODING_INFO_R2L ((sal_uInt32)0x00000010) 00047 #define RTL_TEXTENCODING_INFO_7BIT ((sal_uInt32)0x00000020) 00048 #define RTL_TEXTENCODING_INFO_SYMBOL ((sal_uInt32)0x00000040) 00049 #define RTL_TEXTENCODING_INFO_MIME ((sal_uInt32)0x00000080) 00050 00053 typedef struct _rtl_TextEncodingInfo 00054 { 00057 sal_uInt32 StructSize; 00058 00065 sal_uInt8 MinimumCharSize; 00066 00073 sal_uInt8 MaximumCharSize; 00074 00078 sal_uInt8 AverageCharSize; 00079 00082 sal_uInt8 Reserved; 00083 00141 sal_uInt32 Flags; 00142 } rtl_TextEncodingInfo; 00143 00155 SAL_DLLPUBLIC sal_Bool SAL_CALL rtl_isOctetTextEncoding(rtl_TextEncoding nEncoding); 00156 00170 SAL_DLLPUBLIC sal_Bool SAL_CALL rtl_getTextEncodingInfo( 00171 rtl_TextEncoding eTextEncoding, rtl_TextEncodingInfo* pEncInfo ); 00172 00182 SAL_DLLPUBLIC rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromWindowsCharset( 00183 sal_uInt8 nWinCharset ); 00184 00194 SAL_DLLPUBLIC rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromMimeCharset( 00195 const sal_Char* pMimeCharset ); 00196 00206 SAL_DLLPUBLIC rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromUnixCharset( 00207 const sal_Char* pUnixCharset ); 00208 00217 SAL_DLLPUBLIC sal_uInt8 SAL_CALL rtl_getBestWindowsCharsetFromTextEncoding( 00218 rtl_TextEncoding eTextEncoding ); 00219 00230 SAL_DLLPUBLIC char const * SAL_CALL rtl_getMimeCharsetFromTextEncoding( 00231 rtl_TextEncoding nEncoding ); 00232 00241 SAL_DLLPUBLIC const sal_Char* SAL_CALL rtl_getBestMimeCharsetFromTextEncoding( 00242 rtl_TextEncoding eTextEncoding ); 00243 00252 SAL_DLLPUBLIC const sal_Char* SAL_CALL rtl_getBestUnixCharsetFromTextEncoding( 00253 rtl_TextEncoding eTextEncoding ); 00254 00265 SAL_DLLPUBLIC rtl_TextEncoding SAL_CALL 00266 rtl_getTextEncodingFromWindowsCodePage(sal_uInt32 nCodePage); 00267 00277 SAL_DLLPUBLIC sal_uInt32 SAL_CALL 00278 rtl_getWindowsCodePageFromTextEncoding(rtl_TextEncoding nEncoding); 00279 00280 #ifdef __cplusplus 00281 } 00282 #endif 00283 00284 #endif /* _RTL_TENCINFO_H */ 00285 00286 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */