ReadySetGoGraph.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
2
3/* libmwaw
4* Version: MPL 2.0 / LGPLv2+
5*
6* The contents of this file are subject to the Mozilla Public License Version
7* 2.0 (the "License"); you may not use this file except in compliance with
8* the License or as specified alternatively below. You may obtain a copy of
9* the License at http://www.mozilla.org/MPL/
10*
11* Software distributed under the License is distributed on an "AS IS" basis,
12* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13* for the specific language governing rights and limitations under the
14* License.
15*
16* Major Contributor(s):
17* Copyright (C) 2002 William Lachance (wrlach@gmail.com)
18* Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
19* Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
20* Copyright (C) 2006, 2007 Andrew Ziem
21* Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
22*
23*
24* All Rights Reserved.
25*
26* For minor contributions see the git repository.
27*
28* Alternatively, the contents of this file may be used under the terms of
29* the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
30* in which case the provisions of the LGPLv2+ are applicable
31* instead of those above.
32*/
33
34/*
35 * Parser to ReadySetGo 1-6 document ( graphic part )
36 *
37 */
38#ifndef READYSETGO_GRAPH
39# define READYSETGO_GRAPH
40
41#include <string>
42#include <vector>
43
44#include <librevenge/librevenge.h>
45
46#include "libmwaw_internal.hxx"
47
48#include "MWAWDebug.hxx"
49#include "MWAWInputStream.hxx"
50
51 namespace ReadySetGoGraphInternal
52{
53 struct Layout;
54 struct Shape;
55 struct State;
56 class SubDocument;
57}
58
59 class ReadySetGoParser;
60 class ReadySetGoStyleManager;
61
67 class ReadySetGoGraph
68{
69 friend class ReadySetGoParser;
70 friend class ReadySetGoGraphInternal::SubDocument;
71
72 public:
74 explicit ReadySetGoGraph(ReadySetGoParser &parser);
76 virtual ~ReadySetGoGraph();
77
78 protected:
79
81 int version() const;
82
83 //
84 // Intermediate level
85 //
86
88 bool readShapes();
90 bool readShapesInObject();
91
93 bool updateTextBoxLinks();
95 void updatePageSpanList(std::vector<MWAWPageSpan> &spanList) const;
96
98 bool sendMasterPages();
100 bool sendPages();
102 bool send(ReadySetGoGraphInternal::Layout const &layout);
103
105 bool send(ReadySetGoGraphInternal::Shape const &shape);
107 bool sendText(ReadySetGoGraphInternal::Shape const &shape);
108
109 //
110 // low level
111 //
112
114 bool readLayoutsList(int numLayouts, bool master=false);
116 bool readShapeV1();
118 bool readShapeV2(ReadySetGoGraphInternal::Layout &layout);
120 bool readShapeV3(ReadySetGoGraphInternal::Layout &layout, bool &last);
122 bool readShapeV6(ReadySetGoGraphInternal::Layout &layout, bool &last);
124 bool readShapeDSV2(ReadySetGoGraphInternal::Layout &layout, bool &last);
125
126 private:
127 ReadySetGoGraph(ReadySetGoGraph const &orig) = delete;
128 ReadySetGoGraph &operator=(ReadySetGoGraph const &orig) = delete;
129
130 protected:
131 //
132 // data
133 //
134
136 std::shared_ptr<ReadySetGoGraphInternal::State> m_state;
137
139 ReadySetGoParser &m_parser;
141 std::shared_ptr<ReadySetGoStyleManager> m_styleManager;
142
143};
144#endif
145// 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