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
40{
41struct State;
42struct OLEZone;
43}
44
50{
51public:
53 explicit WPSOLE1Parser(std::shared_ptr<WPSStream> const &fileStream);
54
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:
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: */
bool updateMetaData(librevenge::RVNGPropertyList &list, libwps_tools_win::Font::Type encoding) const
try to retrieve the meta data
Definition WPSOLE1Parser.cpp:482
bool createZones()
try to find the different zones
Definition WPSOLE1Parser.cpp:140
std::shared_ptr< WPSStream > getStream(WPSOLE1ParserInternal::OLEZone const &zone) const
try to return a stream correponding to a zone
Definition WPSOLE1Parser.cpp:401
void checkIfParsed(WPSOLE1ParserInternal::OLEZone const &zone) const
check for unparsed zone
Definition WPSOLE1Parser.cpp:624
std::shared_ptr< WPSStream > getStreamForId(int id) const
try to return a string corresponding to some id
Definition WPSOLE1Parser.cpp:358
std::shared_ptr< WPSStream > getStreamForName(std::string const &name) const
try to return a string corresponding to a name:
Definition WPSOLE1Parser.cpp:346
bool updateEmbeddedObject(int id, WPSEmbeddedObject &object) const
try to retrieve the content of a graphic, knowing it local id
Definition WPSOLE1Parser.cpp:442
WPSOLE1Parser(std::shared_ptr< WPSStream > const &fileStream)
constructor knowing the file stream
Definition WPSOLE1Parser.cpp:122
~WPSOLE1Parser()
destructor
Definition WPSOLE1Parser.cpp:127
std::shared_ptr< WPSOLE1ParserInternal::State > m_state
a smart ptr used to stored the file data
Definition WPSOLE1Parser.h:87
bool updateZoneNames(WPSOLE1ParserInternal::OLEZone &zone) const
try to update the zone name
Definition WPSOLE1Parser.cpp:368
Type
enum Type
Definition libwps_tools_win.h:46
Definition WPSOLE1Parser.cpp:47
small class use to define a embedded object
Definition libwps_internal.h:1077
an OLE Zone
Definition WPSOLE1Parser.cpp:50
Internal: internal method to keep ole1 state.
Definition WPSOLE1Parser.cpp:85

Generated on Sat Jul 19 2025 05:24:40 for libwps by doxygen 1.14.0