PowerPoint7Graph.hxx Source File documentation

PowerPoint7Graph.hxx
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
3/* libmwaw
4* Version: MPL 2.0 / LGPLv2+
5*
6* The contents of this file are subject to the Mozilla Public License Version
7* 2.0 (the "License"); you may not use this file except in compliance with
8* the License or as specified alternatively below. You may obtain a copy of
9* the License at http://www.mozilla.org/MPL/
10*
11* Software distributed under the License is distributed on an "AS IS" basis,
12* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13* for the specific language governing rights and limitations under the
14* License.
15*
16* Major Contributor(s):
17* Copyright (C) 2002 William Lachance (wrlach@gmail.com)
18* Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
19* Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
20* Copyright (C) 2006, 2007 Andrew Ziem
21* Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
22*
23*
24* All Rights Reserved.
25*
26* For minor contributions see the git repository.
27*
28* Alternatively, the contents of this file may be used under the terms of
29* the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
30* in which case the provisions of the LGPLv2+ are applicable
31* instead of those above.
32*/
33
34/*
35 * Parser to PowerPoint 95 document ( graphic part )
36 *
37 */
38#ifndef POWER_POINT7_GRAPH
39# define POWER_POINT7_GRAPH
40
41#include <set>
42#include <string>
43#include <vector>
44
45#include <librevenge/librevenge.h>
46
47#include "libmwaw_internal.hxx"
48
49#include "MWAWDebug.hxx"
50#include "MWAWInputStream.hxx"
51
52namespace PowerPoint7GraphInternal
53{
54struct Frame;
55struct Picture;
56
57struct State;
58class SubDocument;
59}
60
61 namespace PowerPoint7Struct
62{
63struct SlideId;
64}
65
66class PowerPoint7Parser;
67
73 class PowerPoint7Graph
74{
75 friend class PowerPoint7Parser;
76 friend class PowerPoint7GraphInternal::SubDocument;
77public:
79 explicit PowerPoint7Graph(PowerPoint7Parser &parser);
81 virtual ~PowerPoint7Graph();
82
84 int version() const;
86 void setPageSize(MWAWVec2i &pageSize);
88 void setSlideId(PowerPoint7Struct::SlideId const &id);
90 void setColorList(std::vector<MWAWColor> const &colorList);
91protected:
93 bool sendSlide(PowerPoint7Struct::SlideId const &id, bool sendBackground);
95 bool sendFrame(PowerPoint7GraphInternal::Frame const &frame, bool master);
97 bool sendText(int textId);
98
99 //
100 // Intermediate level
101 //
102
104 bool readBitmapContainer(int level, long endPos, PowerPoint7GraphInternal::Picture &picture);
106 bool readPictureList(int level, long endPos);
108 bool readBitmap(int level, long endPos, MWAWEmbeddedObject &object, MWAWBox2i &box);
110 bool readBitmapFlag(int level, long endPos);
111
113 bool readPictureContainer(int level, long endPos, PowerPoint7GraphInternal::Picture &picture);
115 bool readPictureIdContainer(int level, long endPos, int &id);
117 bool readPictureId(int level, long endPos, int &id);
118
120 bool readMetaFile(int level, long endPos, MWAWEmbeddedObject &object);
122 bool readMetaFileContainer(int level, long endPos, PowerPoint7GraphInternal::Picture &picture);
124 bool readMetaFileBox(int level, long endPos, MWAWBox2i &box);
125
127 bool readExternalOleObjectAtom(int level, long endPos);
129 bool readExternalOleEmbed(int level, long endPos, int &id);
131 bool readExternalOleEmbedAtom(int level, long endPos);
132
134 bool readGroup(int level, long endPos);
136 bool readGroupAtom(int level, long endPos);
138 bool readStyle(int level, long endPos);
140 bool readLineArrows(int level, long endPos);
142 bool readRect(int level, long endPos);
144 bool readRectAtom(int level, long endPos);
146 bool readPlaceholderContainer(int level, long endPos);
148 bool readPlaceholderAtom(int level, long endPos);
150 bool readLine(int level, long endPos);
152 bool readLineAtom(int level, long endPos);
154 bool readPolygon(int level, long endPos);
156 bool readPolygonAtom(int level, long endPos);
158 bool readArc(int level, long endPos);
160 bool readArcAtom(int level, long endPos);
161
163 bool readPointList(int level, long endPos, std::vector<MWAWVec2i> &points);
165 bool readZoneFlags(int level, long endPos);
166
168 bool readZone5000(int level, long endPos);
170 bool readZone5000Header(int level, long endPos);
172 bool readZone5000Data(int level, long endPos);
173
174 //
175 // low level
176 //
177
178private:
179 PowerPoint7Graph(PowerPoint7Graph const &orig) = delete;
180 PowerPoint7Graph &operator=(PowerPoint7Graph const &orig) = delete;
181
182protected:
183 //
184 // data
185 //
187 MWAWParserStatePtr m_parserState;
188
190 std::shared_ptr<PowerPoint7GraphInternal::State> m_state;
191
193 PowerPoint7Parser *m_mainParser;
194};
195#endif
196// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWDebug.hxx
MWAWInputStream.hxx
PowerPoint7GraphInternal::SubDocument
Internal: the subdocument of a PowerPoint7Graph.
Definition PowerPoint7Graph.cxx:570
PowerPoint7Graph::readPictureIdContainer
bool readPictureIdContainer(int level, long endPos, int &id)
try to read the picture id container zone 4053
Definition PowerPoint7Graph.cxx:2485
PowerPoint7Graph::m_mainParser
PowerPoint7Parser * m_mainParser
the main parser;
Definition PowerPoint7Graph.hxx:193
PowerPoint7Graph::readZone5000Data
bool readZone5000Data(int level, long endPos)
try to read the zone 5000 data: 5002
Definition PowerPoint7Graph.cxx:2611
PowerPoint7Graph::readZoneFlags
bool readZoneFlags(int level, long endPos)
try to read the graph zone flags zone 3036
Definition PowerPoint7Graph.cxx:1857
PowerPoint7Graph::readExternalOleObjectAtom
bool readExternalOleObjectAtom(int level, long endPos)
try to read the external ole object atom zone: 4035
Definition PowerPoint7Graph.cxx:2283
PowerPoint7Graph::m_parserState
MWAWParserStatePtr m_parserState
the parser state
Definition PowerPoint7Graph.hxx:187
PowerPoint7Graph::readBitmap
bool readBitmap(int level, long endPos, MWAWEmbeddedObject &object, MWAWBox2i &box)
try to read a bitmap zone 2012
Definition PowerPoint7Graph.cxx:2016
PowerPoint7Graph::readLineAtom
bool readLineAtom(int level, long endPos)
try to read the graph line atom zone 3015
Definition PowerPoint7Graph.cxx:1565
PowerPoint7Graph::readPlaceholderAtom
bool readPlaceholderAtom(int level, long endPos)
try to read the place holder atom zone 3011
Definition PowerPoint7Graph.cxx:1479
PowerPoint7Graph::sendText
bool sendText(int textId)
try to send the text content
Definition PowerPoint7Graph.cxx:2822
PowerPoint7Graph::readPictureContainer
bool readPictureContainer(int level, long endPos, PowerPoint7GraphInternal::Picture &picture)
try to read the picture container 4028
Definition PowerPoint7Graph.cxx:2407
PowerPoint7Graph::sendSlide
bool sendSlide(PowerPoint7Struct::SlideId const &id, bool sendBackground)
try to send the slide content
Definition PowerPoint7Graph.cxx:2663
PowerPoint7Graph::readPictureId
bool readPictureId(int level, long endPos, int &id)
try to read the picture id 4036
Definition PowerPoint7Graph.cxx:2452
PowerPoint7Graph::readZone5000
bool readZone5000(int level, long endPos)
try to read the zone 5000: child of GraphRect (only found in 95 an 97 document)
Definition PowerPoint7Graph.cxx:2531
PowerPoint7Graph::readArc
bool readArc(int level, long endPos)
try to read the graph arc zone 3018
Definition PowerPoint7Graph.cxx:1705
PowerPoint7Graph::readPolygonAtom
bool readPolygonAtom(int level, long endPos)
try to read the polygon atom zone 3017
Definition PowerPoint7Graph.cxx:1660
PowerPoint7Graph::readPictureList
bool readPictureList(int level, long endPos)
try to read the font collection 10 zone 2006
Definition PowerPoint7Graph.cxx:1896
PowerPoint7Graph::readPlaceholderContainer
bool readPlaceholderContainer(int level, long endPos)
try to read a place holder container 3010
Definition PowerPoint7Graph.cxx:1410
PowerPoint7Graph::readLine
bool readLine(int level, long endPos)
try to read the line graph zone 3014
Definition PowerPoint7Graph.cxx:1512
PowerPoint7Graph::setPageSize
void setPageSize(MWAWVec2i &pageSize)
sets the page size
Definition PowerPoint7Graph.cxx:656
PowerPoint7Graph::readPointList
bool readPointList(int level, long endPos, std::vector< MWAWVec2i > &points)
try to read the list of point zone 3035
Definition PowerPoint7Graph.cxx:1816
PowerPoint7Graph::readGroup
bool readGroup(int level, long endPos)
try to read the group zone
Definition PowerPoint7Graph.cxx:677
PowerPoint7Graph::setSlideId
void setSlideId(PowerPoint7Struct::SlideId const &id)
sets the slide id
Definition PowerPoint7Graph.cxx:661
PowerPoint7Graph::PowerPoint7Parser
friend class PowerPoint7Parser
Definition PowerPoint7Graph.hxx:75
PowerPoint7Graph::readExternalOleEmbed
bool readExternalOleEmbed(int level, long endPos, int &id)
try to read the external ole embed zone 4044
Definition PowerPoint7Graph.cxx:2316
PowerPoint7Graph::readGroupAtom
bool readGroupAtom(int level, long endPos)
try to read the zone 3002
Definition PowerPoint7Graph.cxx:731
PowerPoint7Graph::readMetaFile
bool readMetaFile(int level, long endPos, MWAWEmbeddedObject &object)
try to read the meta file zone 4033
Definition PowerPoint7Graph.cxx:2202
PowerPoint7Graph::operator=
PowerPoint7Graph & operator=(PowerPoint7Graph const &orig)=delete
PowerPoint7Graph::m_state
std::shared_ptr< PowerPoint7GraphInternal::State > m_state
the state
Definition PowerPoint7Graph.hxx:190
PowerPoint7Graph::readMetaFileBox
bool readMetaFileBox(int level, long endPos, MWAWBox2i &box)
try to read the meta file box zone 4038
Definition PowerPoint7Graph.cxx:2243
PowerPoint7Graph::setColorList
void setColorList(std::vector< MWAWColor > const &colorList)
sets the color list
Definition PowerPoint7Graph.cxx:666
PowerPoint7Graph::version
int version() const
returns the file version
Definition PowerPoint7Graph.cxx:651
PowerPoint7Graph::readLineArrows
bool readLineArrows(int level, long endPos)
try to read the line arrow zone 3007
Definition PowerPoint7Graph.cxx:1184
PowerPoint7Graph::PowerPoint7Graph
PowerPoint7Graph(PowerPoint7Parser &parser)
constructor
Definition PowerPoint7Graph.cxx:641
PowerPoint7Graph::PowerPoint7Graph
PowerPoint7Graph(PowerPoint7Graph const &orig)=delete
PowerPoint7Graph::readRect
bool readRect(int level, long endPos)
try to read the graph rectangle zone 3008
Definition PowerPoint7Graph.cxx:1222
PowerPoint7Graph::readPolygon
bool readPolygon(int level, long endPos)
try to read the polygon zone 3016
Definition PowerPoint7Graph.cxx:1603
PowerPoint7Graph::sendFrame
bool sendFrame(PowerPoint7GraphInternal::Frame const &frame, bool master)
try to send a frame
Definition PowerPoint7Graph.cxx:2701
PowerPoint7Graph::readExternalOleEmbedAtom
bool readExternalOleEmbedAtom(int level, long endPos)
try to read the external ole object atom zone: 4045
Definition PowerPoint7Graph.cxx:2374
PowerPoint7Graph::readZone5000Header
bool readZone5000Header(int level, long endPos)
try to read the zone 5000 header: 5001
Definition PowerPoint7Graph.cxx:2579
PowerPoint7Graph::readBitmapFlag
bool readBitmapFlag(int level, long endPos)
try to read the bitmap type zone 3038
Definition PowerPoint7Graph.cxx:2121
PowerPoint7Graph::readMetaFileContainer
bool readMetaFileContainer(int level, long endPos, PowerPoint7GraphInternal::Picture &picture)
try to read the meta file container zone 4037
Definition PowerPoint7Graph.cxx:2154
PowerPoint7Graph::readBitmapContainer
bool readBitmapContainer(int level, long endPos, PowerPoint7GraphInternal::Picture &picture)
try to read the bitmap container zone 1027
Definition PowerPoint7Graph.cxx:1963
PowerPoint7Graph::~PowerPoint7Graph
virtual ~PowerPoint7Graph()
destructor
Definition PowerPoint7Graph.cxx:648
PowerPoint7Graph::readArcAtom
bool readArcAtom(int level, long endPos)
try to read the graph arc atom 3019
Definition PowerPoint7Graph.cxx:1758
PowerPoint7Graph::readRectAtom
bool readRectAtom(int level, long endPos)
try to read the graph shape zone 3009
Definition PowerPoint7Graph.cxx:1309
PowerPoint7Graph::readStyle
bool readStyle(int level, long endPos)
try to read the graphic style zone 3005
Definition PowerPoint7Graph.cxx:764
PowerPoint7Parser
the main class to read a Microsoft PowerPoint 95 files (Windows)
Definition PowerPoint7Parser.hxx:62
libmwaw_internal.hxx
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition libmwaw_internal.hxx:838
MWAWBox2i
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition libmwaw_internal.hxx:1191
MWAWParserStatePtr
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition libmwaw_internal.hxx:557
PowerPoint7GraphInternal
Internal: the structures of a PowerPoint7Graph.
Definition PowerPoint7Graph.cxx:60
PowerPoint7Struct
namespace used to define basic struct of a Microsoft PowerPoint 95 files (Windows)
Definition PowerPoint7Graph.hxx:62
MWAWEmbeddedObject
small class use to define a embedded object
Definition libmwaw_internal.hxx:467
PowerPoint7GraphInternal::Frame
Internal: a frame of a PowerPoint7Graph.
Definition PowerPoint7Graph.cxx:62
PowerPoint7GraphInternal::Picture
Internal: a picture of a PowerPoint7Graph.
Definition PowerPoint7Graph.cxx:276
PowerPoint7GraphInternal::State
Internal: the state of a PowerPoint7Graph.
Definition PowerPoint7Graph.cxx:299
PowerPoint7Struct::SlideId
a slide id
Definition PowerPoint7Struct.hxx:50