NisusWrtGraph.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.
*/
/*
* Parser to Nisus Writer document ( graphic part )
*
*/
#ifndef NISUS_WRT_GRAPH
# define NISUS_WRT_GRAPH
#include <string>
#include <vector>
#include <librevenge/librevenge.h>
#include "libmwaw_internal.hxx"
#include "MWAWDebug.hxx"
#include "MWAWInputStream.hxx"
#include "NisusWrtStruct.hxx"
namespace NisusWrtGraphInternal
{
struct RSSOEntry;
struct State;
class SubDocument;
}
class NisusWrtParser;
class NisusWrtGraph
{
friend class NisusWrtParser;
friend class NisusWrtGraphInternal::SubDocument;
public:
explicit NisusWrtGraph(NisusWrtParser &parser);
virtual ~NisusWrtGraph();
int version() const;
int numPages() const;
protected:
bool createZones();
void flushExtra();
bool sendPicture(int pictId, bool inPictRsrc, MWAWPosition pictPos);
bool sendPageGraphics();
//
// Intermediate level
//
bool readPLAC(MWAWEntry const &entry);
bool readPLDT(NisusWrtStruct::RecursifData const &data);
bool readPGRA(MWAWEntry const &entry);
//
// low level
//
std::vector<NisusWrtGraphInternal::RSSOEntry> findRSSOEntry(MWAWInputStreamPtr inp) const;
private:
NisusWrtGraph(NisusWrtGraph const &orig) = delete;
NisusWrtGraph &operator=(NisusWrtGraph const &orig) = delete;
protected:
//
// data
//
MWAWParserStatePtr m_parserState;
std::shared_ptr<NisusWrtGraphInternal::State> m_state;
NisusWrtParser *m_mainParser;
};
#endif
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWDebug.hxx
MWAWInputStream.hxx
NisusWrtStruct.hxx
MWAWEntry
basic class to store an entry in a file This contained :
Definition MWAWEntry.hxx:47
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition MWAWPosition.hxx:48
NisusWrtGraphInternal::SubDocument
Internal: the subdocument of a NisusWrtGraph.
Definition NisusWrtGraph.cxx:103
NisusWrtGraph::m_parserState
MWAWParserStatePtr m_parserState
the parser state
Definition NisusWrtGraph.hxx:124
NisusWrtGraph::createZones
bool createZones()
finds the different graphic zones
Definition NisusWrtGraph.cxx:189
NisusWrtGraph::flushExtra
void flushExtra()
sends the data which have not yet been sent to the listener
Definition NisusWrtGraph.cxx:526
NisusWrtGraph::numPages
int numPages() const
returns the number of pages
Definition NisusWrtGraph.cxx:179
NisusWrtGraph::m_state
std::shared_ptr< NisusWrtGraphInternal::State > m_state
the state
Definition NisusWrtGraph.hxx:127
NisusWrtGraph::sendPageGraphics
bool sendPageGraphics()
try to send the page graphic
Definition NisusWrtGraph.cxx:492
NisusWrtGraph::NisusWrtGraph
NisusWrtGraph(NisusWrtGraph const &orig)=delete
NisusWrtGraph::NisusWrtParser
friend class NisusWrtParser
Definition NisusWrtGraph.hxx:69
NisusWrtGraph::~NisusWrtGraph
virtual ~NisusWrtGraph()
destructor
Definition NisusWrtGraph.cxx:171
NisusWrtGraph::operator=
NisusWrtGraph & operator=(NisusWrtGraph const &orig)=delete
NisusWrtGraph::NisusWrtGraph
NisusWrtGraph(NisusWrtParser &parser)
constructor
Definition NisusWrtGraph.cxx:164
NisusWrtGraph::version
int version() const
returns the file version
Definition NisusWrtGraph.cxx:174
NisusWrtGraph::m_mainParser
NisusWrtParser * m_mainParser
the main parser;
Definition NisusWrtGraph.hxx:130
NisusWrtGraph::readPLAC
bool readPLAC(MWAWEntry const &entry)
read the PLAC resource: a list of picture placements ?
Definition NisusWrtGraph.cxx:246
NisusWrtGraph::readPGRA
bool readPGRA(MWAWEntry const &entry)
read the PGRA resource: the number of page? graphics
Definition NisusWrtGraph.cxx:340
NisusWrtGraph::findRSSOEntry
std::vector< NisusWrtGraphInternal::RSSOEntry > findRSSOEntry(MWAWInputStreamPtr inp) const
try to find a RSSO entry in a picture file
Definition NisusWrtGraph.cxx:375
NisusWrtGraph::sendPicture
bool sendPicture(int pictId, bool inPictRsrc, MWAWPosition pictPos)
try to send a picture
Definition NisusWrtGraph.cxx:432
NisusWrtGraph::readPLDT
bool readPLDT(NisusWrtStruct::RecursifData const &data)
parse the PLDT resource: a unknown resource
Definition NisusWrtGraph.cxx:279
NisusWrtParser
the main class to read a Nisus Writer file
Definition NisusWrtParser.hxx:60
libmwaw_internal.hxx
MWAWParserStatePtr
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition libmwaw_internal.hxx:557
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition libmwaw_internal.hxx:551
NisusWrtGraphInternal
Internal: the structures of a NisusWrtGraph.
Definition NisusWrtGraph.cxx:58
NisusWrtGraphInternal::RSSOEntry
a RSSO entry in a pict file
Definition NisusWrtGraph.cxx:60
NisusWrtGraphInternal::State
Internal: the state of a NisusWrtGraph.
Definition NisusWrtGraph.cxx:81
NisusWrtStruct::RecursifData
Internal: low level a structure helping to read recursifList.
Definition NisusWrtStruct.hxx:145