1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #ifndef INCLUDED_MSFILTER_RTFUTIL_HXX
11 #define INCLUDED_MSFILTER_RTFUTIL_HXX
13 #include "filter/msfilter/msfilterdllapi.h"
14 #include <rtl/string.hxx>
15 #include <rtl/textenc.h>
16 #include <tools/string.hxx>
21 /// Outputs a single character in hex form.
22 MSFILTER_DLLPUBLIC OString
OutHex(sal_uLong nHex
, sal_uInt8 nLen
);
24 /// Handles correct unicode and legacy export of a single character.
25 MSFILTER_DLLPUBLIC OString
OutChar(sal_Unicode c
, int *pUCMode
, rtl_TextEncoding eDestEnc
, bool* pSuccess
= 0, bool bUnicode
= true);
28 * Handles correct unicode and legacy export of a string.
30 * @param rStr the string to export
31 * @param eDestEnc the legacy encoding to use
32 * @param bUnicode if unicode output is wanted as well, or just legacy
34 MSFILTER_DLLPUBLIC OString
OutString(const String
&rStr
, rtl_TextEncoding eDestEnc
, bool bUnicode
= true);
37 * Handles correct unicode and legacy export of a string, when a
38 * '{' \upr '{' keyword ansi_text '}{\*' \ud '{' keyword Unicode_text '}}}'
39 * construct should be used.
41 * @param pToken the keyword
42 * @param rStr the text to export
43 * @param eDestEnc the legacy encoding to use
45 MSFILTER_DLLPUBLIC OString
OutStringUpr(const sal_Char
*pToken
, const String
&rStr
, rtl_TextEncoding eDestEnc
);
52 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */