libwps_tools_win.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
2 /* libwps
3  * Version: MPL 2.0 / LGPLv2.1+
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  * Major Contributor(s):
10  * Copyright (C) 2009, 2011 Alonso Laurent (alonso@loria.fr)
11  * Copyright (C) 2006, 2007 Andrew Ziem
12  * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
13  * Copyright (C) 2004 Marc Maurer (uwog@uwog.net)
14  * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca)
15  *
16  * For minor contributions see the git repository.
17  *
18  * Alternatively, the contents of this file may be used under the terms
19  * of the GNU Lesser General Public License Version 2.1 or later
20  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
21  * applicable instead of those above.
22  *
23  * For further information visit http://libwps.sourceforge.net
24  */
25 
26 /* This header contains code specific to windows file :
27  * - a class used to convert DOS/Win3 font characters in unicode
28  * - a class used to defined the text Language
29  */
30 
31 #ifndef WPS_WIN
32 # define WPS_WIN
33 
34 # include <string>
35 
36 # include "libwps_internal.h"
37 
39 namespace libwps_tools_win
40 {
42 class Font
43 {
44 public:
53 
55 
61 
64  };
65  // CP_10006, CP_10007, CP_10029, CP_10079, CP_10081
67  static unsigned long unicode(unsigned char c, Type type);
69  static librevenge::RVNGString unicodeString(const unsigned char *p, unsigned long size, Type type, bool skipUnknown=true);
71  static librevenge::RVNGString unicodeString(std::string const &text, Type type);
73  static librevenge::RVNGString unicodeString(librevenge::RVNGInputStream *stream, unsigned long size, Type type);
75  static Type getTypeForOEM(int oem);
77  static Type getTypeForString(char const *encoding);
83  static Type getFontType(librevenge::RVNGString &name);
85  static librevenge::RVNGString getTypeName(Type type);
86 protected:
87 };
88 
89 // see http://msdn.microsoft.com/en-us/library/bb213877.aspx (Community Content)
91 namespace Language
92 {
94 std::string name(long id);
96 std::string localeName(long id);
98 void addLocaleName(long id, librevenge::RVNGPropertyList &propList);
100 long getDefault();
101 }
102 
103 }
104 
105 
106 #endif
107 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
static Type getFontType(librevenge::RVNGString &name)
returns the type of the font using the fontName
Definition: libwps_tools_win.cpp:39
Definition: libwps_tools_win.h:62
long getDefault()
returns the default language: 0x409 : english(US)
Definition: libwps_tools_win.cpp:7327
Definition: libwps_tools_win.h:50
Definition: libwps_tools_win.h:47
Definition: libwps_tools_win.h:59
Definition: libwps_tools_win.h:52
Definition: libwps_tools_win.h:57
Definition: libwps_tools_win.h:58
Definition: libwps_tools_win.h:51
Definition: libwps_tools_win.h:49
Definition: libwps_tools_win.h:48
Definition: libwps_tools_win.h:49
Definition: libwps_tools_win.h:58
Definition: libwps_tools_win.h:48
Definition: libwps_tools_win.h:50
Definition: libwps_tools_win.h:51
Definition: libwps_tools_win.h:49
Type
enum Type
Definition: libwps_tools_win.h:46
Definition: libwps_tools_win.h:49
Definition: libwps_tools_win.h:57
Definition: libwps_tools_win.h:62
Definition: libwps_tools_win.h:59
Definition: libwps_tools_win.h:47
Definition: libwps_tools_win.h:49
Definition: libwps_tools_win.h:56
static librevenge::RVNGString unicodeString(const unsigned char *p, unsigned long size, Type type, bool skipUnknown=true)
converts a list of character in unicode
Definition: libwps_tools_win.cpp:7283
static Type getTypeForOEM(int oem)
Definition: libwps_tools_win.cpp:112
Definition: libwps_tools_win.h:60
Definition: libwps_tools_win.h:46
Definition: libwps_tools_win.h:51
Definition: libwps_tools_win.h:51
Definition: libwps_tools_win.h:48
std::string name(long id)
returns the name given Windows© id
Definition: libwps_tools_win.cpp:7332
Definition: libwps_tools_win.h:46
Definition: libwps_tools_win.h:48
Definition: libwps_tools_win.h:47
static unsigned long unicode(unsigned char c, Type type)
converts a character in unicode, knowing the character and the font type
Definition: libwps_tools_win.cpp:7160
Definition: libwps_tools_win.h:63
Definition: libwps_tools_win.h:46
Definition: libwps_tools_win.h:47
static librevenge::RVNGString getTypeName(Type type)
return the type name
Definition: libwps_tools_win.cpp:259
Definition: libwps_tools_win.h:57
Definition: libwps_tools_win.h:57
Definition: libwps_tools_win.h:46
Definition: libwps_tools_win.h:58
a class to convert a DOS© or Windows3© character in unicode
Definition: libwps_tools_win.h:42
Definition: libwps_tools_win.h:56
static Type getTypeForString(char const *encoding)
Definition: libwps_tools_win.cpp:195
Definition: libwps_tools_win.h:46
Definition: libwps_tools_win.h:47
Definition: libwps_tools_win.h:50
Definition: libwps_tools_win.h:59
Definition: libwps_tools_win.h:47
some Windows© classes and tools
Definition: libwps_tools_win.cpp:31
Definition: libwps_tools_win.h:59
Definition: libwps_tools_win.h:49
Definition: libwps_tools_win.h:56
void addLocaleName(long id, librevenge::RVNGPropertyList &propList)
add locale name (ie. fo:language,fo:country ) to propList
Definition: libwps_tools_win.cpp:7510
Definition: libwps_tools_win.h:54
Definition: libwps_tools_win.h:48
Definition: libwps_tools_win.h:50
Definition: libwps_tools_win.h:60
Definition: libwps_tools_win.h:52
Definition: libwps_tools_win.h:46
Definition: libwps_tools_win.h:56
Definition: libwps_tools_win.h:48
std::string localeName(long id)
returns the simplified locale name
Definition: libwps_tools_win.cpp:7423
Definition: libwps_tools_win.h:58

Generated on Sun Oct 18 2020 20:49:29 for libwps by doxygen 1.8.9.1