WPSOLE1Parser.h Source File documentation

WPSOLE1Parser.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
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 /*
27 */
28
29 #ifndef WPS_OLE1_PARSER_H
30 #define WPS_OLE1_PARSER_H
31
32 #include <string>
33
34 #include <librevenge-stream/librevenge-stream.h>
35
36 #include "libwps_internal.h"
37 #include "libwps_tools_win.h"
38
39 namespace WPSOLE1ParserInternal
40 {
41 struct State;
42 struct OLEZone;
43 }
44
49 class WPSOLE1Parser
50 {
51 public:
53 explicit WPSOLE1Parser(shared_ptr<WPSStream> fileStream);
54
56 ~WPSOLE1Parser();
57
59 bool createZones();
60
69 shared_ptr<WPSStream> getStreamForName(std::string const &name) const;
71 shared_ptr<WPSStream> getStreamForId(int id) const;
73 bool updateMetaData(librevenge::RVNGPropertyList &list, libwps_tools_win::Font::Type encoding) const;
75 bool updateEmbeddedObject(int id, WPSEmbeddedObject &object) const;
76
77 protected:
79 bool updateZoneNames(WPSOLE1ParserInternal::OLEZone &zone) const;
81 shared_ptr<WPSStream> getStream(WPSOLE1ParserInternal::OLEZone const &zone) const;
83 void checkIfParsed(WPSOLE1ParserInternal::OLEZone const &zone) const;
84
86 bool readPicture(shared_ptr<WPSStream> stream, WPSEmbeddedObject &object) const;
87
88 private:
90 shared_ptr<WPSOLE1ParserInternal::State> m_state;
91 };
92
93 #endif
94 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
libwps_tools_win.h
libwps_tools_win::Font::Type
Type
enum Type
Definition: libwps_tools_win.h:46
WPSOLE1Parser
a class used to parse a container which is used by Lotus123 (and also by RagTime).
Definition: WPSOLE1Parser.h:49
libwps_internal.h
libwps_tools_win::Language::name
std::string name(long id)
returns the name given Windows© id
Definition: libwps_tools_win.cpp:7296
WPSOLE1ParserInternal
Definition: WPSOLE1Parser.cpp:45
WPSEmbeddedObject
small class use to define a embedded object
Definition: libwps_internal.h:433
WPSOLE1Parser::m_state
shared_ptr< WPSOLE1ParserInternal::State > m_state
a smart ptr used to stored the file data
Definition: WPSOLE1Parser.h:90
WPSOLE1ParserInternal::OLEZone
an OLE Zone
Definition: WPSOLE1Parser.cpp:48