Bump version to 4.1-6
[LibreOffice.git] / l10ntools / inc / helper.hxx
blob936010343f8f6fe59c7e650625be6412b33cf190
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/.
8 */
10 // Helper string methods
12 #ifndef INCLUDED_L10NTOOLS_SOURCE_HELPER_HXX
13 #define INCLUDED_L10NTOOLS_SOURCE_HELPER_HXX
15 #include "sal/config.h"
16 #include "sal/types.h"
18 #include <cassert>
20 #include <libxml/parser.h>
22 #include <rtl/string.hxx>
23 #include <rtl/strbuf.hxx>
26 namespace helper {
28 /// Escape all given character in the text
29 OString escapeAll(
30 const OString& rText, const OString& rUnEscaped, const OString& rEscaped );
31 /// Unescape all given character in the text
32 OString unEscapeAll(
33 const OString& rText, const OString& rEscaped, const OString& rUnEscaped );
35 /// Convert special characters to XML entity references
36 OString QuotHTML( const OString &rString );
37 /// Convert XML entity references to single characters
38 OString UnQuotHTML( const OString& rString );
40 /// Check whether text is a valid XML expression
41 bool isWellFormedXML( OString const & text );
43 /// Convert xmlChar* to OString
44 OString xmlStrToOString( const xmlChar* pString );
48 #endif
50 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */