xref: /aoo4110/main/tools/inc/tools/tenccvt.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _TOOLS_TENCCVT_HXX
24 #define _TOOLS_TENCCVT_HXX
25 
26 #include <rtl/textenc.h>
27 #ifndef _TOOLS_SOLAR_H
28 #include <tools/solar.h>
29 #endif
30 #include "tools/toolsdllapi.h"
31 
32 // ----------------------------------------
33 // - Functions for handling Import/Export -
34 // ----------------------------------------
35 
36 // return an encoding which has more defined Characters as the given
37 // encoding, but have the same definition for the defined characters
38 // e.g.: windows-1252 for iso-8859-1 or windows-1254 for iso-8859-9
39 TOOLS_DLLPUBLIC rtl_TextEncoding GetExtendedCompatibilityTextEncoding( rtl_TextEncoding eEncoding );
40 
41 // return an encoding which has more defined Characters as the given
42 // encoding. The encodings could be different.
43 // e.g.: windows-1251 for iso-8859-5
44 TOOLS_DLLPUBLIC rtl_TextEncoding GetExtendedTextEncoding( rtl_TextEncoding eEncoding );
45 
46 // if the given encoding is an multi-byte encoding (which allows more than
47 // one byte per char, e.g. UTF-8 or Shift-JIS), a one-byte encoding
48 // is returned (normally windows-1252).
49 TOOLS_DLLPUBLIC rtl_TextEncoding GetOneByteTextEncoding( rtl_TextEncoding eEncoding );
50 
51 TOOLS_DLLPUBLIC rtl_TextEncoding GetSOLoadTextEncoding( rtl_TextEncoding eEncoding, sal_uInt16 nVersion = SOFFICE_FILEFORMAT_50 );
52 TOOLS_DLLPUBLIC rtl_TextEncoding GetSOStoreTextEncoding( rtl_TextEncoding eEncoding, sal_uInt16 nVersion = SOFFICE_FILEFORMAT_50 );
53 
54 #endif  // _TOOLS_TENCCVT_HXX
55