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
39namespace WPSOLE1ParserInternal
40{
41struct State;
42struct OLEZone;
43}
44
49 class WPSOLE1Parser
50{
51public:
53 explicit WPSOLE1Parser(std::shared_ptr<WPSStream> const &fileStream);
54
56 ~WPSOLE1Parser();
57
59 bool createZones();
60
69 std::shared_ptr<WPSStream> getStreamForName(std::string const &name) const;
71 std::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
77protected:
79 bool updateZoneNames(WPSOLE1ParserInternal::OLEZone &zone) const;
81 std::shared_ptr<WPSStream> getStream(WPSOLE1ParserInternal::OLEZone const &zone) const;
83 void checkIfParsed(WPSOLE1ParserInternal::OLEZone const &zone) const;
84
85private:
87 std::shared_ptr<WPSOLE1ParserInternal::State> m_state;
88};
89
90#endif
91/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WPSOLE1Parser
a class used to parse a container which is used by Lotus123 (and also by RagTime).
Definition WPSOLE1Parser.h:50
WPSOLE1Parser::updateMetaData
bool updateMetaData(librevenge::RVNGPropertyList &list, libwps_tools_win::Font::Type encoding) const
try to retrieve the meta data
Definition WPSOLE1Parser.cpp:482
WPSOLE1Parser::createZones
bool createZones()
try to find the different zones
Definition WPSOLE1Parser.cpp:140
WPSOLE1Parser::getStream
std::shared_ptr< WPSStream > getStream(WPSOLE1ParserInternal::OLEZone const &zone) const
try to return a stream correponding to a zone
Definition WPSOLE1Parser.cpp:401
WPSOLE1Parser::checkIfParsed
void checkIfParsed(WPSOLE1ParserInternal::OLEZone const &zone) const
check for unparsed zone
Definition WPSOLE1Parser.cpp:624
WPSOLE1Parser::getStreamForId
std::shared_ptr< WPSStream > getStreamForId(int id) const
try to return a string corresponding to some id
Definition WPSOLE1Parser.cpp:358
WPSOLE1Parser::getStreamForName
std::shared_ptr< WPSStream > getStreamForName(std::string const &name) const
try to return a string corresponding to a name:
Definition WPSOLE1Parser.cpp:346
WPSOLE1Parser::updateEmbeddedObject
bool updateEmbeddedObject(int id, WPSEmbeddedObject &object) const
try to retrieve the content of a graphic, knowing it local id
Definition WPSOLE1Parser.cpp:442
WPSOLE1Parser::WPSOLE1Parser
WPSOLE1Parser(std::shared_ptr< WPSStream > const &fileStream)
constructor knowing the file stream
Definition WPSOLE1Parser.cpp:122
WPSOLE1Parser::~WPSOLE1Parser
~WPSOLE1Parser()
destructor
Definition WPSOLE1Parser.cpp:127
WPSOLE1Parser::m_state
std::shared_ptr< WPSOLE1ParserInternal::State > m_state
a smart ptr used to stored the file data
Definition WPSOLE1Parser.h:87
WPSOLE1Parser::updateZoneNames
bool updateZoneNames(WPSOLE1ParserInternal::OLEZone &zone) const
try to update the zone name
Definition WPSOLE1Parser.cpp:368
libwps_tools_win::Font::Type
Type
enum Type
Definition libwps_tools_win.h:46
libwps_internal.h
libwps_tools_win.h
WPSOLE1ParserInternal
Definition WPSOLE1Parser.cpp:47
WPSEmbeddedObject
small class use to define a embedded object
Definition libwps_internal.h:1077
WPSOLE1ParserInternal::OLEZone
an OLE Zone
Definition WPSOLE1Parser.cpp:50