00001 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */ 00002 /* libwps 00003 * Version: MPL 2.0 / LGPLv2.1+ 00004 * 00005 * This Source Code Form is subject to the terms of the Mozilla Public 00006 * License, v. 2.0. If a copy of the MPL was not distributed with this 00007 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 00008 * 00009 * Major Contributor(s): 00010 * Copyright (C) 2009, 2011 Alonso Laurent (alonso@loria.fr) 00011 * Copyright (C) 2006, 2007 Andrew Ziem 00012 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch) 00013 * Copyright (C) 2004 Marc Maurer (uwog@uwog.net) 00014 * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca) 00015 * 00016 * For minor contributions see the git repository. 00017 * 00018 * Alternatively, the contents of this file may be used under the terms 00019 * of the GNU Lesser General Public License Version 2.1 or later 00020 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are 00021 * applicable instead of those above. 00022 * 00023 * For further information visit http://libwps.sourceforge.net 00024 */ 00025 00026 /* This header contains code specific to windows file : 00027 * - a class used to convert DOS/Win3 font characters in unicode 00028 * - a class used to defined the text Language 00029 */ 00030 00031 #ifndef WPS_WIN 00032 # define WPS_WIN 00033 00034 # include <assert.h> 00035 # include <string> 00036 00037 # include "libwps_internal.h" 00038 00040 namespace libwps_tools_win 00041 { 00043 class Font 00044 { 00045 public: 00047 enum Type { CP_424, CP_437, CP_737, CP_775, 00048 DOS_850, CP_852, CP_855, CP_856, CP_857, 00049 CP_860, CP_861, CP_862, CP_863, CP_864, CP_865, 00050 CP_866, CP_869, CP_874, CP_1006, 00051 WIN3_ARABIC, WIN3_BALTIC, WIN3_CEUROPE, WIN3_CYRILLIC, 00052 WIN3_GREEK, WIN3_HEBREW, WIN3_TURKISH, 00053 WIN3_VIETNAMESE, WIN3_WEUROPE, 00054 UNKNOWN 00055 }; 00056 00058 static unsigned long unicode(unsigned char c, Type type); 00060 static Type getTypeForOEM(int oem); 00066 static Type getFontType(std::string &name); 00068 static std::string getTypeName(Type type); 00069 protected: 00070 }; 00071 00072 // see http://msdn.microsoft.com/en-us/library/bb213877.aspx (Community Content) 00074 namespace Language 00075 { 00077 std::string name(long id); 00079 std::string localeName(long id); 00081 void addLocaleName(long id, librevenge::RVNGPropertyList &propList); 00083 long getDefault(); 00084 } 00085 00086 } 00087 00088 00089 #endif 00090 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab: