ReadySetGoGraph.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 ReadySetGo 1-6 document ( graphic part )
*
*/
#ifndef READYSETGO_GRAPH
# define READYSETGO_GRAPH
#include <string>
#include <vector>
#include <librevenge/librevenge.h>
#include "libmwaw_internal.hxx"
#include "MWAWDebug.hxx"
#include "MWAWInputStream.hxx"
namespace ReadySetGoGraphInternal
{
struct Layout;
struct Shape;
struct State;
class SubDocument;
}
class ReadySetGoParser;
class ReadySetGoStyleManager;
class ReadySetGoGraph
{
friend class ReadySetGoParser;
friend class ReadySetGoGraphInternal::SubDocument;
public:
explicit ReadySetGoGraph(ReadySetGoParser &parser);
virtual ~ReadySetGoGraph();
protected:
int version() const;
//
// Intermediate level
//
bool readShapes();
bool readShapesInObject();
bool updateTextBoxLinks();
void updatePageSpanList(std::vector<MWAWPageSpan> &spanList) const;
bool sendMasterPages();
bool sendPages();
bool send(ReadySetGoGraphInternal::Layout const &layout);
bool send(ReadySetGoGraphInternal::Shape const &shape);
bool sendText(ReadySetGoGraphInternal::Shape const &shape);
//
// low level
//
bool readLayoutsList(int numLayouts, bool master=false);
bool readShapeV1();
bool readShapeV2(ReadySetGoGraphInternal::Layout &layout);
bool readShapeV3(ReadySetGoGraphInternal::Layout &layout, bool &last);
bool readShapeV6(ReadySetGoGraphInternal::Layout &layout, bool &last);
bool readShapeDSV2(ReadySetGoGraphInternal::Layout &layout, bool &last);
private:
ReadySetGoGraph(ReadySetGoGraph const &orig) = delete;
ReadySetGoGraph &operator=(ReadySetGoGraph const &orig) = delete;
protected:
//
// data
//
std::shared_ptr<ReadySetGoGraphInternal::State> m_state;
ReadySetGoParser &m_parser;
std::shared_ptr<ReadySetGoStyleManager> m_styleManager;
};
#endif
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWDebug.hxx
MWAWInputStream.hxx
ReadySetGoGraphInternal::SubDocument
Internal: the subdocument of a ReadySetGoGraph.
Definition ReadySetGoGraph.cxx:161
ReadySetGoGraph::readShapeV6
bool readShapeV6(ReadySetGoGraphInternal::Layout &layout, bool &last)
try to read a shape: v6
Definition ReadySetGoGraph.cxx:1460
ReadySetGoGraph::readShapeV3
bool readShapeV3(ReadySetGoGraphInternal::Layout &layout, bool &last)
try to read a shape: v3
Definition ReadySetGoGraph.cxx:1040
ReadySetGoGraph::readShapeDSV2
bool readShapeDSV2(ReadySetGoGraphInternal::Layout &layout, bool &last)
try to read a shape: design studio v2
Definition ReadySetGoGraph.cxx:2053
ReadySetGoGraph::updatePageSpanList
void updatePageSpanList(std::vector< MWAWPageSpan > &spanList) const
update the page span list
Definition ReadySetGoGraph.cxx:235
ReadySetGoGraph::send
bool send(ReadySetGoGraphInternal::Layout const &layout)
try to send the shapes of a layout
Definition ReadySetGoGraph.cxx:2734
ReadySetGoGraph::sendMasterPages
bool sendMasterPages()
try to send the master pages
Definition ReadySetGoGraph.cxx:2685
ReadySetGoGraph::m_styleManager
std::shared_ptr< ReadySetGoStyleManager > m_styleManager
the style manager
Definition ReadySetGoGraph.hxx:141
ReadySetGoGraph::m_parser
ReadySetGoParser & m_parser
the main parser;
Definition ReadySetGoGraph.hxx:139
ReadySetGoGraph::readShapesInObject
bool readShapesInObject()
try to read a list of shape corresponding to an object glossary: need in v6
Definition ReadySetGoGraph.cxx:615
ReadySetGoGraph::readShapeV2
bool readShapeV2(ReadySetGoGraphInternal::Layout &layout)
try to read a shape: v2
Definition ReadySetGoGraph.cxx:791
ReadySetGoGraph::m_state
std::shared_ptr< ReadySetGoGraphInternal::State > m_state
the state
Definition ReadySetGoGraph.hxx:136
ReadySetGoGraph::sendPages
bool sendPages()
try to send each main pages
Definition ReadySetGoGraph.cxx:2716
ReadySetGoGraph::~ReadySetGoGraph
virtual ~ReadySetGoGraph()
destructor
Definition ReadySetGoGraph.cxx:224
ReadySetGoGraph::ReadySetGoParser
friend class ReadySetGoParser
Definition ReadySetGoGraph.hxx:69
ReadySetGoGraph::ReadySetGoGraph
ReadySetGoGraph(ReadySetGoGraph const &orig)=delete
ReadySetGoGraph::updateTextBoxLinks
bool updateTextBoxLinks()
try to update the textboxes link: v3
Definition ReadySetGoGraph.cxx:276
ReadySetGoGraph::readShapeV1
bool readShapeV1()
try to read a shape: v1
Definition ReadySetGoGraph.cxx:650
ReadySetGoGraph::version
int version() const
returns the file version
Definition ReadySetGoGraph.cxx:228
ReadySetGoGraph::sendText
bool sendText(ReadySetGoGraphInternal::Shape const &shape)
try to send the text corresponding to a shape
Definition ReadySetGoGraph.cxx:2886
ReadySetGoGraph::ReadySetGoGraph
ReadySetGoGraph(ReadySetGoParser &parser)
constructor
Definition ReadySetGoGraph.cxx:217
ReadySetGoGraph::readShapes
bool readShapes()
try to read a list of shape
Definition ReadySetGoGraph.cxx:498
ReadySetGoGraph::operator=
ReadySetGoGraph & operator=(ReadySetGoGraph const &orig)=delete
ReadySetGoGraph::readLayoutsList
bool readLayoutsList(int numLayouts, bool master=false)
try to read the layout list: v3
Definition ReadySetGoGraph.cxx:405
ReadySetGoParser
the main class to read a ReadySetGo 1.0,2.1,3.0,4.0,4.5,6.0 file
Definition ReadySetGoParser.hxx:61
ReadySetGoStyleManager
class to read/store ReadySetGo v1-v6 styles
Definition ReadySetGoStyleManager.hxx:61
libmwaw_internal.hxx
ReadySetGoGraphInternal
Internal: the structures of a ReadySetGoGraph.
Definition ReadySetGoGraph.cxx:61
ReadySetGoGraphInternal::Layout
Internal: a layout in a ReadySetGoGraph document.
Definition ReadySetGoGraph.cxx:122
ReadySetGoGraphInternal::Shape
Internal: a shape in a ReadySetGoGraph document.
Definition ReadySetGoGraph.cxx:64
ReadySetGoGraphInternal::State
Internal: the state of a ReadySetGoGraph.
Definition ReadySetGoGraph.cxx:141