Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / tools / tenccvt.hxx
blob496b8e499b559b37330e4eb7fdd9130be3ec7ea3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_TOOLS_TENCCVT_HXX
20 #define INCLUDED_TOOLS_TENCCVT_HXX
22 #include <rtl/textenc.h>
23 #include <tools/toolsdllapi.h>
25 // Functions for handling Import/Export
27 /// return an encoding which has more defined Characters as the given
28 /// encoding, but have the same definition for the defined characters
29 /// e.g.: windows-1252 for iso-8859-1 or windows-1254 for iso-8859-9
30 TOOLS_DLLPUBLIC rtl_TextEncoding GetExtendedCompatibilityTextEncoding( rtl_TextEncoding eEncoding );
32 /// return an encoding which has more defined Characters as the given
33 /// encoding. The encodings could be different.
34 /// e.g.: windows-1251 for iso-8859-5
35 TOOLS_DLLPUBLIC rtl_TextEncoding GetExtendedTextEncoding( rtl_TextEncoding eEncoding );
37 /// if the given encoding is an multi-byte encoding (which allows more than
38 /// one byte per char, e.g. UTF-8 or Shift-JIS), a one-byte encoding
39 /// is returned (normally windows-1252).
40 TOOLS_DLLPUBLIC rtl_TextEncoding GetOneByteTextEncoding( rtl_TextEncoding eEncoding );
42 TOOLS_DLLPUBLIC rtl_TextEncoding GetSOLoadTextEncoding( rtl_TextEncoding eEncoding );
43 TOOLS_DLLPUBLIC rtl_TextEncoding GetSOStoreTextEncoding( rtl_TextEncoding eEncoding );
45 /**
46 * Given a Unicode character, return a legacy Microsoft Encoding which
47 * supports it. Returns RTL_TEXTENCODING_DONTKNOW if there is
48 * no encoding which could support the character
50 * Useful as a utility to categorize unicode characters into the best fit
51 * windows charset range for exporting to ww6 & wmf or as a hint to non \u
52 * unicode token aware rtf readers
54 TOOLS_DLLPUBLIC rtl_TextEncoding getBestMSEncodingByChar(sal_Unicode c);
56 #endif
58 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */