LibreOffice Module lingucomponent (master) 1
lingutil.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_LINGUCOMPONENT_SOURCE_LINGUTIL_LINGUTIL_HXX
21#define INCLUDED_LINGUCOMPONENT_SOURCE_LINGUTIL_LINGUTIL_HXX
22
23#include <rtl/string.hxx>
24
25#include <vector>
26
27#define OU2ENC(rtlOUString, rtlEncoding) \
28 OString((rtlOUString).getStr(), (rtlOUString).getLength(), \
29 rtlEncoding, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK)
30
32
33#if defined(_WIN32)
34
35// to be use to get a path name with long path prefix
36// under Windows for Hunspell, Hyphen and MyThes libraries
37OString Win_AddLongPathPrefix( const OString &rPathName );
38#endif
39
40
41// temporary function, to be removed when new style dictionaries
42// using configuration entries are fully implemented and provided
43std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char * pDicType );
44void MergeNewStyleDicsAndOldStyleDics( std::vector< SvtLinguConfigDictionaryEntry > &rNewStyleDics, const std::vector< SvtLinguConfigDictionaryEntry > &rOldStyleDics );
45
46//Find an encoding from a charset string, using
47//rtl_getTextEncodingFromMimeCharset and falling back to
48//rtl_getTextEncodingFromUnixCharset with the addition of
49//ISCII-DEVANAGARI. On failure will return final fallback of
50//RTL_TEXTENCODING_ISO_8859_1
51rtl_TextEncoding getTextEncodingFromCharset(const char* pCharset);
52
53#endif
54
55/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics(const char *pDicType)
Definition: lingutil.cxx:146
void MergeNewStyleDicsAndOldStyleDics(std::vector< SvtLinguConfigDictionaryEntry > &rNewStyleDics, const std::vector< SvtLinguConfigDictionaryEntry > &rOldStyleDics)
Definition: lingutil.cxx:252
rtl_TextEncoding getTextEncodingFromCharset(const char *pCharset)
Definition: lingutil.cxx:295