PowerPoint7Parser.hxx
Go to the documentation of this file.
/* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
/* libmwaw
* Version: MPL 2.0 / LGPLv2+
*
* The contents of this file are subject to the Mozilla Public License Version
* 2.0 (the "License"); you may not use this file except in compliance with
* the License or as specified alternatively below. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Major Contributor(s):
* Copyright (C) 2002 William Lachance (wrlach@gmail.com)
* Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
* Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
* Copyright (C) 2006, 2007 Andrew Ziem
* Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
*
*
* All Rights Reserved.
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms of
* the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
* in which case the provisions of the LGPLv2+ are applicable
* instead of those above.
*/
#ifndef POWER_POINT7_PARSER
# define POWER_POINT7_PARSER
#include <map>
#include <set>
#include <vector>
#include "MWAWDebug.hxx"
#include "MWAWInputStream.hxx"
#include "MWAWParser.hxx"
namespace PowerPoint7ParserInternal
{
struct State;
}
namespace PowerPoint7Struct
{
struct SlideId;
}
class PowerPoint7Graph;
class PowerPoint7Text;
class PowerPoint7Parser final : public MWAWPresentationParser
{
friend class PowerPoint7Graph;
friend class PowerPoint7Text;
public:
PowerPoint7Parser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
~PowerPoint7Parser() final;
bool checkHeader(MWAWHeader *header, bool strict=false) final;
// the main parse function
void parse(librevenge::RVNGPresentationInterface *documentInterface) final;
protected:
void createDocument(librevenge::RVNGPresentationInterface *documentInterface);
bool createZones();
void sendSlides();
//
// send data
//
// interface with the text parser
bool getColor(int cId, MWAWColor &col) const;
bool sendText(int textId);
//
// low level
//
bool readDocRoot();
bool readMainSub10(long endPos);
bool readDocument(long endPos);
bool readDocAtom(int level, long endPos);
bool readSlideInformation(int level, long endPos);
bool readSlides(int level, long endPos, bool master);
bool readSlideAtom(int level, long endPos,
PowerPoint7Struct::SlideId &sId, PowerPoint7Struct::SlideId &mId);
bool readNotes(int level, long endPos);
bool readNoteAtom(int level, long endPos, PowerPoint7Struct::SlideId &sId);
bool readEnvironment(int level, long endPos);
bool readColorScheme(int level, long endPos, std::vector<MWAWColor> &colors);
bool readZone1015(int level, long endPos);
bool readSlideShowInfo(int level, long endPos);
bool readSlideViewInfo(int level, long endPos);
bool readGuideAtom(int level, long endPos);
bool readViewInfoAtom(int level, long endPos);
bool readSlideViewInfoAtom(int level, long endPos);
bool readVbaInfo(int level, long endPos);
bool readVbaInfoAtom(int level, long endPos);
bool readSSDocInfoAtom(int level, long endPos);
bool readSummary(int level, long endPos);
bool readZone1028(int level, long endPos);
bool readZone1028Atom(int level, long endPos);
bool readOutlineViewInfo(int level, long endPos);
bool readSorterViewInfo(int level, long endPos);
bool readContainerList(int level, long endPos);
bool readContainerAtom(int level, long endPos, int &N);
bool readIdentifier(int level, long endPos, int &id, std::string const &wh);
bool readBookmarkCollection(int level, long endPos);
bool readSoundCollection(int level, long endPos);
bool readBookmarkSeedAtom(int level, long endPos);
bool readZone2026(int level, long endPos);
bool readColorList(int level, long endPos, std::vector<MWAWColor> &colors);
bool readZone3000(int level, long endPos);
bool readZone3012(int level, long endPos);
bool readZone3012Atom(int level, long endPos);
bool readTextCharsAtom(int level, long endPos);
bool readStyleTextPropAtom(int level, long endPos, int &textId);
bool readOutlineTextProps9Atom(int level, long endPos,
int &pId, PowerPoint7Struct::SlideId &sId);
bool readOutlineTextPropsHeader9Atom(int level, long endPos);
bool readString(int level, long endPos, std::string &string, int &zId, std::string const &what="");
bool readSlideIdentifier(int level, long endPos, PowerPoint7Struct::SlideId &sId);
bool readZone4039(int level, long endPos);
bool readKinsoku(int level, long endPos);
bool readHandout(int level, long endPos);
bool readZone4042(int level, long endPos);
bool readKinsokuAtom(int level, long endPos);
bool readZone1028Data(int level, long endPos);
bool readSlideIdentifierContainer(int level, long endPos, PowerPoint7Struct::SlideId &sId);
bool readHeaderFooters(int level, long endPos);
bool readHeaderFooterAtom(int level, long endPos);
bool readZone4072(int level, long endPos);
bool readZone(int level, long endPos);
bool readZoneNoData(int level, long endPos, std::string const &name, std::string const &wh="");
bool parseTextContent(MWAWInputStreamPtr input);
void checkForUnparsedZones();
protected:
//
// data
//
std::shared_ptr<PowerPoint7ParserInternal::State> m_state;
};
#endif
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWDebug.hxx
MWAWInputStream.hxx
MWAWParser.hxx
MWAWHeader
a function used by MWAWDocument to store the version of document
Definition MWAWHeader.hxx:57
MWAWPresentationParser::MWAWPresentationParser
MWAWPresentationParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor (protected)
Definition MWAWParser.hxx:275
PowerPoint7Graph
the main class to read the graphic part of a PowerPoint 95 file
Definition PowerPoint7Graph.hxx:74
PowerPoint7Parser::readZone3000
bool readZone3000(int level, long endPos)
try to read the zone 3000: child of Handout/Notes/Slides/Zone3001
Definition PowerPoint7Parser.cxx:1881
PowerPoint7Parser::readZone4072
bool readZone4072(int level, long endPos)
try to read the zone 4072: child of Zone3008
Definition PowerPoint7Parser.cxx:2642
PowerPoint7Parser::readBookmarkCollection
bool readBookmarkCollection(int level, long endPos)
try to read the bookmark collection zone 2019
Definition PowerPoint7Parser.cxx:1667
PowerPoint7Parser::readZoneNoData
bool readZoneNoData(int level, long endPos, std::string const &name, std::string const &wh="")
try to read a zone with no data
Definition PowerPoint7Parser.cxx:2692
PowerPoint7Parser::readSlides
bool readSlides(int level, long endPos, bool master)
try to read the slides zone 1006(slides) or 1016(master)
Definition PowerPoint7Parser.cxx:595
PowerPoint7Parser::readZone4039
bool readZone4039(int level, long endPos)
try to read the zone 4039: child of Zone4072
Definition PowerPoint7Parser.cxx:2338
PowerPoint7Parser::readVbaInfoAtom
bool readVbaInfoAtom(int level, long endPos)
try to read the vba info zone 1024
Definition PowerPoint7Parser.cxx:1230
PowerPoint7Parser::readZone4042
bool readZone4042(int level, long endPos)
try to read the zone 4042: child of FontCollection
PowerPoint7Parser::readHandout
bool readHandout(int level, long endPos)
try to read the handout zone 4041
Definition PowerPoint7Parser.cxx:2373
PowerPoint7Parser::readSlideViewInfoAtom
bool readSlideViewInfoAtom(int level, long endPos)
try to read the slide view info zone 1022
Definition PowerPoint7Parser.cxx:1150
PowerPoint7Parser::~PowerPoint7Parser
~PowerPoint7Parser() final
destructor
Definition PowerPoint7Parser.cxx:187
PowerPoint7Parser::readColorScheme
bool readColorScheme(int level, long endPos, std::vector< MWAWColor > &colors)
try to read the color scheme 1012
Definition PowerPoint7Parser.cxx:910
PowerPoint7Parser::readSlideInformation
bool readSlideInformation(int level, long endPos)
try to read the slide information 1005: dimension, has background, ...
Definition PowerPoint7Parser.cxx:526
PowerPoint7Parser::readSlideAtom
bool readSlideAtom(int level, long endPos, PowerPoint7Struct::SlideId &sId, PowerPoint7Struct::SlideId &mId)
try to read the slide zone 1007
Definition PowerPoint7Parser.cxx:694
PowerPoint7Parser::readKinsoku
bool readKinsoku(int level, long endPos)
try to read the Kinsoku zone 4040
Definition PowerPoint7Parser.cxx:2288
PowerPoint7Parser::m_state
std::shared_ptr< PowerPoint7ParserInternal::State > m_state
the state
Definition PowerPoint7Parser.hxx:225
PowerPoint7Parser::readSlideIdentifierContainer
bool readSlideIdentifierContainer(int level, long endPos, PowerPoint7Struct::SlideId &sId)
try to read a container of a slide identifier 4054
Definition PowerPoint7Parser.cxx:2510
PowerPoint7Parser::readTextCharsAtom
bool readTextCharsAtom(int level, long endPos)
try to read the text chars atom zone 4000
Definition PowerPoint7Parser.cxx:2030
PowerPoint7Parser::readSlideViewInfo
bool readSlideViewInfo(int level, long endPos)
try to read the slide view info zone 1018
Definition PowerPoint7Parser.cxx:1027
PowerPoint7Parser::readViewInfoAtom
bool readViewInfoAtom(int level, long endPos)
try to read the view info zone 1021
Definition PowerPoint7Parser.cxx:1108
PowerPoint7Parser::readEnvironment
bool readEnvironment(int level, long endPos)
try to read the environment zone 1010
Definition PowerPoint7Parser.cxx:840
PowerPoint7Parser::readZone1028
bool readZone1028(int level, long endPos)
try to read the zone 1028: child of Environment
Definition PowerPoint7Parser.cxx:1340
PowerPoint7Parser::parse
void parse(librevenge::RVNGPresentationInterface *documentInterface) final
virtual function used to parse the input
Definition PowerPoint7Parser.cxx:210
PowerPoint7Parser::readIdentifier
bool readIdentifier(int level, long endPos, int &id, std::string const &wh)
try to read an identifier zone 2017
Definition PowerPoint7Parser.cxx:1639
PowerPoint7Parser::readNotes
bool readNotes(int level, long endPos)
try to read the notes zone 1008
Definition PowerPoint7Parser.cxx:733
PowerPoint7Parser::readZone1028Atom
bool readZone1028Atom(int level, long endPos)
try to read the zone 1029
Definition PowerPoint7Parser.cxx:1387
PowerPoint7Parser::readSoundCollection
bool readSoundCollection(int level, long endPos)
try to read the sound collection zone 2020
Definition PowerPoint7Parser.cxx:1719
PowerPoint7Parser::PowerPoint7Parser
PowerPoint7Parser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition PowerPoint7Parser.cxx:178
PowerPoint7Parser::readSlideShowInfo
bool readSlideShowInfo(int level, long endPos)
try to read the slide show info zone 1017
Definition PowerPoint7Parser.cxx:994
PowerPoint7Parser::readSSDocInfoAtom
bool readSSDocInfoAtom(int level, long endPos)
try to read the slide show doc info atom 1025: child of Document
Definition PowerPoint7Parser.cxx:1263
PowerPoint7Parser::readGuideAtom
bool readGuideAtom(int level, long endPos)
try to read the guide atom zone 1019
Definition PowerPoint7Parser.cxx:1077
PowerPoint7Parser::readStyleTextPropAtom
bool readStyleTextPropAtom(int level, long endPos, int &textId)
try to read the style text prop atom zone 4001
Definition PowerPoint7Parser.cxx:2080
PowerPoint7Parser::readOutlineViewInfo
bool readOutlineViewInfo(int level, long endPos)
try to read the outline view info zone 1031
Definition PowerPoint7Parser.cxx:1421
PowerPoint7Parser::parseTextContent
bool parseTextContent(MWAWInputStreamPtr input)
try to read the "Text_Content" stream
Definition PowerPoint7Parser.cxx:2779
PowerPoint7Parser::readBookmarkSeedAtom
bool readBookmarkSeedAtom(int level, long endPos)
try to read the bookmark seed atom zone 2025
Definition PowerPoint7Parser.cxx:1760
PowerPoint7Parser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition PowerPoint7Parser.cxx:2854
PowerPoint7Parser::readString
bool readString(int level, long endPos, std::string &string, int &zId, std::string const &what="")
try to read the string zone 4026
Definition PowerPoint7Parser.cxx:2232
PowerPoint7Parser::readOutlineTextProps9Atom
bool readOutlineTextProps9Atom(int level, long endPos, int &pId, PowerPoint7Struct::SlideId &sId)
try to read the outline text props9 atom zone 4009
Definition PowerPoint7Parser.cxx:2137
PowerPoint7Parser::readMainSub10
bool readMainSub10(long endPos)
try to read the main sub zone: the zone 10: child of Root
Definition PowerPoint7Parser.cxx:370
PowerPoint7Parser::readDocument
bool readDocument(long endPos)
try to read the document's zone 1000: child of Root
Definition PowerPoint7Parser.cxx:404
PowerPoint7Parser::checkForUnparsedZones
void checkForUnparsedZones()
check for unparsed zone
Definition PowerPoint7Parser.cxx:2771
PowerPoint7Parser::readColorList
bool readColorList(int level, long endPos, std::vector< MWAWColor > &colors)
try to read the color list zone 2031
Definition PowerPoint7Parser.cxx:1835
PowerPoint7Parser::sendText
bool sendText(int textId)
try to send the text content
Definition PowerPoint7Parser.cxx:191
PowerPoint7Parser::readDocAtom
bool readDocAtom(int level, long endPos)
try to read the document atom's zone 1001: child of Document
Definition PowerPoint7Parser.cxx:469
PowerPoint7Parser::readZone3012
bool readZone3012(int level, long endPos)
try to read the zone 3012: child of Environment
Definition PowerPoint7Parser.cxx:1944
PowerPoint7Parser::readNoteAtom
bool readNoteAtom(int level, long endPos, PowerPoint7Struct::SlideId &sId)
try to read the note atom zone 1009
Definition PowerPoint7Parser.cxx:809
PowerPoint7Parser::createDocument
void createDocument(librevenge::RVNGPresentationInterface *documentInterface)
creates the listener which will be associated to the document
Definition PowerPoint7Parser.cxx:240
PowerPoint7Parser::readDocRoot
bool readDocRoot()
try to read the main zone: the zone 3
Definition PowerPoint7Parser.cxx:322
PowerPoint7Parser::readSorterViewInfo
bool readSorterViewInfo(int level, long endPos)
try to read the sorter view info zone 1032
Definition PowerPoint7Parser.cxx:1465
PowerPoint7Parser::readHeaderFooterAtom
bool readHeaderFooterAtom(int level, long endPos)
try to read the header footer atom zone: 4058
Definition PowerPoint7Parser.cxx:2604
PowerPoint7Parser::readOutlineTextPropsHeader9Atom
bool readOutlineTextPropsHeader9Atom(int level, long endPos)
try to read the outline text props header9 atom zone 4015
Definition PowerPoint7Parser.cxx:2201
PowerPoint7Parser::readKinsokuAtom
bool readKinsokuAtom(int level, long endPos)
try to read the Kinsoku atom zone 4050
Definition PowerPoint7Parser.cxx:2442
PowerPoint7Parser::readZone1015
bool readZone1015(int level, long endPos)
try to read the zone 1015: child of Slides
Definition PowerPoint7Parser.cxx:954
PowerPoint7Parser::readZone1028Data
bool readZone1028Data(int level, long endPos)
try to read the zone 4052: child of Zone1028
Definition PowerPoint7Parser.cxx:2470
PowerPoint7Parser::readSummary
bool readSummary(int level, long endPos)
try to read the summary zone 1026: child of Document
Definition PowerPoint7Parser.cxx:1296
PowerPoint7Parser::readHeaderFooters
bool readHeaderFooters(int level, long endPos)
try to read the header footer zone: 4057
Definition PowerPoint7Parser.cxx:2554
PowerPoint7Parser::getColor
bool getColor(int cId, MWAWColor &col) const
returns the color corresponding to an id
Definition PowerPoint7Parser.cxx:196
PowerPoint7Parser::readContainerAtom
bool readContainerAtom(int level, long endPos, int &N)
try to read the container atom zone 2001
Definition PowerPoint7Parser.cxx:1609
PowerPoint7Parser::readZone2026
bool readZone2026(int level, long endPos)
try to read the zone 2026: child of SlideViewInfo
Definition PowerPoint7Parser.cxx:1791
PowerPoint7Parser::createZones
bool createZones()
finds the different zones
Definition PowerPoint7Parser.cxx:280
PowerPoint7Parser::sendSlides
void sendSlides()
try to send all slides
Definition PowerPoint7Parser.cxx:2816
PowerPoint7Parser::readContainerList
bool readContainerList(int level, long endPos)
try to read the container list zone 2000: child of Document
Definition PowerPoint7Parser.cxx:1509
PowerPoint7Parser::readZone3012Atom
bool readZone3012Atom(int level, long endPos)
try to read the zone 3013: child of Zone3012
Definition PowerPoint7Parser.cxx:2000
PowerPoint7Parser::readZone
bool readZone(int level, long endPos)
try to read a zone
Definition PowerPoint7Parser.cxx:2720
PowerPoint7Parser::readVbaInfo
bool readVbaInfo(int level, long endPos)
try to read the vba info zone 1023
Definition PowerPoint7Parser.cxx:1180
PowerPoint7Parser::readSlideIdentifier
bool readSlideIdentifier(int level, long endPos, PowerPoint7Struct::SlideId &sId)
try to read a slide identifier zone 4032
Definition PowerPoint7Parser.cxx:2257
PowerPoint7Parser::PowerPoint7Graph
friend class PowerPoint7Graph
Definition PowerPoint7Parser.hxx:63
PowerPoint7Parser::PowerPoint7Text
friend class PowerPoint7Text
Definition PowerPoint7Parser.hxx:64
PowerPoint7Text
the main class to read the text part of a PowerPoint 95 file
Definition PowerPoint7Text.hxx:68
MWAWRSRCParserPtr
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition libmwaw_internal.hxx:561
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition libmwaw_internal.hxx:551
PowerPoint7ParserInternal
Internal: the structures of a PowerPoint7Parser.
Definition PowerPoint7Parser.cxx:61
PowerPoint7Struct
namespace used to define basic struct of a Microsoft PowerPoint 95 files (Windows)
Definition PowerPoint7Graph.hxx:62
librevenge
Definition MWAWDocument.hxx:57
MWAWColor
the class to store a color
Definition libmwaw_internal.hxx:192
PowerPoint7ParserInternal::State
Internal: the state of a PowerPoint7Parser.
Definition PowerPoint7Parser.cxx:82
PowerPoint7Struct::SlideId
a slide id
Definition PowerPoint7Struct.hxx:50