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 <assert.h>
35 # include <string>
36 
37 # include "libwps_internal.h"
38 
40 namespace libwps_tools_win
41 {
43 class Font
44 {
45 public:
55  };
56 
58  static unsigned long unicode(unsigned char c, Type type);
60  static unsigned long LICSunicode(unsigned char c, Type type);
62  static Type getTypeForOEM(int oem);
68  static Type getFontType(std::string &name);
70  static std::string getTypeName(Type type);
71 protected:
72 };
73 
74 // see http://msdn.microsoft.com/en-us/library/bb213877.aspx (Community Content)
76 namespace Language
77 {
79 std::string name(long id);
81 std::string localeName(long id);
83 void addLocaleName(long id, librevenge::RVNGPropertyList &propList);
85 long getDefault();
86 }
87 
88 }
89 
90 
91 #endif
92 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
long getDefault()
returns the default language: 0x409 : english(US)
Definition: libwps_tools_win.cpp:937
Definition: libwps_tools_win.h:51
Definition: libwps_tools_win.h:48
Definition: libwps_tools_win.h:53
Definition: libwps_tools_win.h:52
Definition: libwps_tools_win.h:50
Definition: libwps_tools_win.h:49
Definition: libwps_tools_win.h:50
Definition: libwps_tools_win.h:49
Definition: libwps_tools_win.h:51
Definition: libwps_tools_win.h:51
Type
enum Type
Definition: libwps_tools_win.h:47
Definition: libwps_tools_win.h:48
static std::string getTypeName(Type type)
return the type name
Definition: libwps_tools_win.cpp:158
static Type getTypeForOEM(int oem)
Definition: libwps_tools_win.cpp:109
Definition: libwps_tools_win.h:47
Definition: libwps_tools_win.h:52
Definition: libwps_tools_win.h:52
Definition: libwps_tools_win.h:49
std::string name(long id)
returns the name given Windows© id
Definition: libwps_tools_win.cpp:942
Definition: libwps_tools_win.h:50
Definition: libwps_tools_win.h:48
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:864
Definition: libwps_tools_win.h:54
Definition: libwps_tools_win.h:47
Definition: libwps_tools_win.h:49
Definition: libwps_tools_win.h:47
a class to convert a DOS© or Windows3© character in unicode
Definition: libwps_tools_win.h:43
static unsigned long LICSunicode(unsigned char c, Type type)
converts a LICS character in unicode, knowing the character and the font type
Definition: libwps_tools_win.cpp:847
Definition: libwps_tools_win.h:48
Definition: libwps_tools_win.h:48
Definition: libwps_tools_win.h:50
void addLocaleName(long id, librevenge::RVNGPropertyList &propList)
add locale name (ie. fo:language,fo:country ) to propList
Definition: libwps_tools_win.cpp:1120
Definition: libwps_tools_win.h:49
Definition: libwps_tools_win.h:51
static Type getFontType(std::string &name)
returns the type of the font using the fontName
Definition: libwps_tools_win.cpp:39
Definition: libwps_tools_win.h:53
Definition: libwps_tools_win.h:47
Definition: libwps_tools_win.h:49
std::string localeName(long id)
returns the simplified locale name
Definition: libwps_tools_win.cpp:1033

Generated on Mon Nov 23 2015 07:09:19 for libwps by doxygen 1.8.5