Canvas5BMParser.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 CANVAS5_BM_PARSER
# define CANVAS5_BM_PARSER
#include <functional>
#include <map>
#include <string>
#include <utility>
#include <vector>
#include <librevenge/librevenge.h>
#include "MWAWDebug.hxx"
#include "MWAWInputStream.hxx"
#include "MWAWPosition.hxx"
#include "MWAWParser.hxx"
namespace Canvas5BMParserInternal
{
struct Layer;
struct Slide;
struct State;
}
class Canvas5Graph;
class Canvas5Image;
class Canvas5StyleManager;
namespace Canvas5Structure
{
struct Stream;
}
class Canvas5BMParser final : public MWAWGraphicParser
{
friend class Canvas5Graph;
friend class Canvas5Image;
friend class Canvas5StyleManager;
public:
Canvas5BMParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
~Canvas5BMParser() final;
bool checkHeader(MWAWHeader *header, bool strict=false) final;
// the main parse function
void parse(librevenge::RVNGDrawingInterface *documentInterface) final;
protected:
bool createDocument(librevenge::RVNGDrawingInterface *documentInterface);
//
// interface
//
bool isWindowsFile() const;
protected:
bool createZones();
// Intermediate level
bool readFileHeader(Canvas5Structure::Stream &stream);
//
// send data to the listener
//
//
// low level
//
//
// data
//
std::shared_ptr<Canvas5BMParserInternal::State> m_state;
};
#endif
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWDebug.hxx
MWAWInputStream.hxx
MWAWParser.hxx
MWAWPosition.hxx
Canvas5BMParser::isWindowsFile
bool isWindowsFile() const
returns true if the file is a windows file
Definition Canvas5BMParser.cxx:116
Canvas5BMParser::readFileHeader
bool readFileHeader(Canvas5Structure::Stream &stream)
try to read the file header
Definition Canvas5BMParser.cxx:235
Canvas5BMParser::Canvas5Graph
friend class Canvas5Graph
Definition Canvas5BMParser.hxx:73
Canvas5BMParser::createDocument
bool createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition Canvas5BMParser.cxx:154
Canvas5BMParser::~Canvas5BMParser
~Canvas5BMParser() final
destructor
Definition Canvas5BMParser.cxx:112
Canvas5BMParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition Canvas5BMParser.cxx:214
Canvas5BMParser::Canvas5BMParser
Canvas5BMParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition Canvas5BMParser.cxx:100
Canvas5BMParser::parse
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
virtual function used to parse the input
Definition Canvas5BMParser.cxx:124
Canvas5BMParser::m_state
std::shared_ptr< Canvas5BMParserInternal::State > m_state
the state
Definition Canvas5BMParser.hxx:121
Canvas5BMParser::createZones
bool createZones()
finds the different objects zones
Definition Canvas5BMParser.cxx:188
Canvas5BMParser::Canvas5StyleManager
friend class Canvas5StyleManager
Definition Canvas5BMParser.hxx:75
Canvas5BMParser::Canvas5Image
friend class Canvas5Image
Definition Canvas5BMParser.hxx:74
Canvas5Graph
the main class to read the graphic part of Canvas v5-v11 file
Definition Canvas5Graph.hxx:85
Canvas5Image
the main class to read/convert the image or movie inside of Canvas 5-11 files
Definition Canvas5Image.hxx:78
Canvas5StyleManager
the main class to read the style part of Canvas 5 file
Definition Canvas5StyleManager.hxx:86
MWAWGraphicParser::MWAWGraphicParser
MWAWGraphicParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor (protected)
Definition MWAWParser.hxx:259
MWAWHeader
a function used by MWAWDocument to store the version of document
Definition MWAWHeader.hxx:57
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
Canvas5BMParserInternal
Internal: the structures of a Canvas5BMParser.
Definition Canvas5BMParser.cxx:71
Canvas5Structure
a namespace used to define basic function or structure to read a Canvas v5-v11 file
Definition Canvas5BMParser.hxx:64
librevenge
Definition MWAWDocument.hxx:57
Canvas5BMParserInternal::State
Internal: the state of a Canvas5BMParser.
Definition Canvas5BMParser.cxx:74
Canvas5Structure::Stream
a sub stream of Canvas5Structure
Definition Canvas5Structure.hxx:49