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 
52 {
53 struct Layout;
54 struct Shape;
55 struct State;
56 class SubDocument;
57 }
58 
59 class ReadySetGoParser;
61 
68 {
69  friend class ReadySetGoParser;
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();
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 
141  std::shared_ptr<ReadySetGoStyleManager> m_styleManager;
142 
143 };
144 #endif
145 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
Internal: the subdocument of a ReadySetGoGraph.
Definition: ReadySetGoGraph.cxx:161
the main class to read the graphic part of a ReadySetGo 1-6 file
Definition: ReadySetGoGraph.hxx:68
bool readShapeV6(ReadySetGoGraphInternal::Layout &layout, bool &last)
try to read a shape: v6
Definition: ReadySetGoGraph.cxx:1460
bool readShapeV3(ReadySetGoGraphInternal::Layout &layout, bool &last)
try to read a shape: v3
Definition: ReadySetGoGraph.cxx:1040
bool readShapeDSV2(ReadySetGoGraphInternal::Layout &layout, bool &last)
try to read a shape: design studio v2
Definition: ReadySetGoGraph.cxx:2056
void updatePageSpanList(std::vector< MWAWPageSpan > &spanList) const
update the page span list
Definition: ReadySetGoGraph.cxx:235
bool send(ReadySetGoGraphInternal::Layout const &layout)
try to send the shapes of a layout
Definition: ReadySetGoGraph.cxx:2742
bool sendMasterPages()
try to send the master pages
Definition: ReadySetGoGraph.cxx:2693
std::shared_ptr< ReadySetGoStyleManager > m_styleManager
the style manager
Definition: ReadySetGoGraph.hxx:141
ReadySetGoParser & m_parser
the main parser;
Definition: ReadySetGoGraph.hxx:139
bool readShapesInObject()
try to read a list of shape corresponding to an object glossary: need in v6
Definition: ReadySetGoGraph.cxx:615
bool readShapeV2(ReadySetGoGraphInternal::Layout &layout)
try to read a shape: v2
Definition: ReadySetGoGraph.cxx:791
std::shared_ptr< ReadySetGoGraphInternal::State > m_state
the state
Definition: ReadySetGoGraph.hxx:136
bool sendPages()
try to send each main pages
Definition: ReadySetGoGraph.cxx:2724
virtual ~ReadySetGoGraph()
destructor
Definition: ReadySetGoGraph.cxx:224
ReadySetGoGraph(ReadySetGoGraph const &orig)=delete
bool updateTextBoxLinks()
try to update the textboxes link: v3
Definition: ReadySetGoGraph.cxx:276
bool readShapeV1()
try to read a shape: v1
Definition: ReadySetGoGraph.cxx:650
int version() const
returns the file version
Definition: ReadySetGoGraph.cxx:228
ReadySetGoGraph & operator=(ReadySetGoGraph const &orig)=delete
bool sendText(ReadySetGoGraphInternal::Shape const &shape)
try to send the text corresponding to a shape
Definition: ReadySetGoGraph.cxx:2894
ReadySetGoGraph(ReadySetGoParser &parser)
constructor
Definition: ReadySetGoGraph.cxx:217
bool readShapes()
try to read a list of shape
Definition: ReadySetGoGraph.cxx:498
bool readLayoutsList(int numLayouts, bool master=false)
try to read the layout list: v3
Definition: ReadySetGoGraph.cxx:405
the main class to read a ReadySetGo 1.0,2.1,3.0,4.0,4.5,6.0 file
Definition: ReadySetGoParser.hxx:61
class to read/store ReadySetGo v1-v6 styles
Definition: ReadySetGoStyleManager.hxx:59
Internal: the structures of a ReadySetGoGraph.
Definition: ReadySetGoGraph.cxx:61
Internal: a layout in a ReadySetGoGraph document.
Definition: ReadySetGoGraph.cxx:122
Internal: a shape in a ReadySetGoGraph document.
Definition: ReadySetGoGraph.cxx:64

Generated on Mon Mar 6 2023 06:19:05 for libmwaw by doxygen 1.9.1