NSGraph.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 NS_GRAPH
# define NS_GRAPH
#include <string>
#include <vector>
#include <libwpd/libwpd.h>
#include "libmwaw_internal.hxx"
#include "MWAWDebug.hxx"
#include "MWAWInputStream.hxx"
#include "NSStruct.hxx"
namespace NSGraphInternal
{
struct RSSOEntry;
struct State;
class SubDocument;
}
class NSParser;
class NSGraph
{
friend class NSParser;
friend class NSGraphInternal::SubDocument;
public:
NSGraph(NSParser &parser);
virtual ~NSGraph();
int version() const;
int numPages() const;
protected:
bool createZones();
void flushExtra();
bool sendPicture(int pictId, bool inPictRsrc, MWAWPosition pictPos,
WPXPropertyList extras = WPXPropertyList());
bool sendPageGraphics();
//
// Intermediate level
//
bool readPLAC(MWAWEntry const &entry);
bool readPLDT(NSStruct::RecursifData const &data);
bool readPGRA(MWAWEntry const &entry);
//
// low level
//
std::vector<NSGraphInternal::RSSOEntry> findRSSOEntry(MWAWInputStreamPtr inp) const;
private:
NSGraph(NSGraph const &orig);
NSGraph &operator=(NSGraph const &orig);
protected:
//
// data
//
MWAWParserStatePtr m_parserState;
shared_ptr<NSGraphInternal::State> m_state;
NSParser *m_mainParser;
};
#endif
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
NSGraph::m_parserState
MWAWParserStatePtr m_parserState
the parser state
Definition: NSGraph.hxx:125
libmwaw_internal.hxx
NSGraph::readPLDT
bool readPLDT(NSStruct::RecursifData const &data)
parse the PLDT resource: a unknown resource
Definition: NSGraph.cxx:268
NSGraph::operator=
NSGraph & operator=(NSGraph const &orig)
NSGraph::NSGraph
NSGraph(NSParser &parser)
constructor
Definition: NSGraph.cxx:153
NSGraph::readPLAC
bool readPLAC(MWAWEntry const &entry)
read the PLAC resource: a list of picture placements ?
Definition: NSGraph.cxx:235
NSGraph::m_mainParser
NSParser * m_mainParser
the main parser;
Definition: NSGraph.hxx:131
NSGraph::sendPicture
bool sendPicture(int pictId, bool inPictRsrc, MWAWPosition pictPos, WPXPropertyList extras=WPXPropertyList())
try to send a picture
Definition: NSGraph.cxx:421
NSParser
the main class to read a Nisus Writer file
Definition: NSParser.hxx:59
NSGraph::readPGRA
bool readPGRA(MWAWEntry const &entry)
read the PGRA resource: the number of page? graphics
Definition: NSGraph.cxx:330
NSStruct.hxx
NSGraph
the main class to read the graphic part of a Nisus file
Definition: NSGraph.hxx:67
MWAWInputStreamPtr
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:336
NSGraph::flushExtra
void flushExtra()
sends the data which have not yet been sent to the listener
Definition: NSGraph.cxx:517
MWAWInputStream.hxx
MWAWDebug.hxx
NSGraph::createZones
bool createZones()
finds the different graphic zones
Definition: NSGraph.cxx:177
MWAWParserStatePtr
shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:342
NSGraph::numPages
int numPages() const
returns the number of pages
Definition: NSGraph.cxx:167
NSGraph::sendPageGraphics
bool sendPageGraphics()
try to send the page graphic
Definition: NSGraph.cxx:483
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document. ...
Definition: MWAWPosition.hxx:47
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
NSGraph::m_state
shared_ptr< NSGraphInternal::State > m_state
the state
Definition: NSGraph.hxx:128
NSStruct::RecursifData
Internal: low level a structure helping to read recursifList.
Definition: NSStruct.hxx:130
NSGraph::~NSGraph
virtual ~NSGraph()
destructor
Definition: NSGraph.cxx:159
NSGraphInternal::SubDocument
Internal: the subdocument of a NSGraph.
Definition: NSGraph.cxx:92
NSGraph::version
int version() const
returns the file version
Definition: NSGraph.cxx:162
NSGraph::findRSSOEntry
std::vector< NSGraphInternal::RSSOEntry > findRSSOEntry(MWAWInputStreamPtr inp) const
try to find a RSSO entry in a picture file
Definition: NSGraph.cxx:365