LotusGraph.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* libwps
3  * Version: MPL 2.0 / LGPLv2.1+
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * Major Contributor(s):
10  * Copyright (C) 2006, 2007 Andrew Ziem
11  * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca)
12  * Copyright (C) 2003 Marc Maurer (uwog@uwog.net)
13  *
14  * For minor contributions see the git repository.
15  *
16  * Alternatively, the contents of this file may be used under the terms
17  * of the GNU Lesser General Public License Version 2.1 or later
18  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
19  * applicable instead of those above.
20  */
21 
22 #ifndef LOTUS_GRAPH_H
23 #define LOTUS_GRAPH_H
24 
25 #include <ostream>
26 #include <vector>
27 
28 #include <librevenge-stream/librevenge-stream.h>
29 
30 #include "libwps_internal.h"
31 
32 #include "WPSDebug.h"
33 #include "WKSContentListener.h"
34 
35 namespace LotusGraphInternal
36 {
37 struct ZoneMac;
38 struct ZoneWK4;
39 struct State;
40 
41 class SubDocument;
42 }
43 
44 class LotusParser;
45 class LotusStyleManager;
46 
52 {
53 public:
54  friend class LotusParser;
56 
58  explicit LotusGraph(LotusParser &parser);
60  ~LotusGraph();
62  void cleanState();
65  {
66  m_listener = listen;
67  }
68 protected:
70  int version() const;
71 
73  bool hasGraphics(int sheetId) const;
75  void sendGraphics(int sheetId);
77  void sendPicture(LotusGraphInternal::ZoneMac const &zone);
79  void sendTextBox(shared_ptr<WPSStream> stream, WPSEntry const &entry);
81  void sendTextBoxWK4(shared_ptr<WPSStream> stream, WPSEntry const &entry, bool isButton);
82 
83  //
84  // low level
85  //
86 
87  // ////////////////////// zone //////////////////////////////
88 
89  // zone 1b
90 
92  bool readZoneBegin(shared_ptr<WPSStream> stream, long endPos);
94  bool readZoneData(shared_ptr<WPSStream> stream, long endPos, int type);
96  bool readTextBoxData(shared_ptr<WPSStream> stream, long endPos);
98  bool readPictureDefinition(shared_ptr<WPSStream> stream, long endPos);
100  bool readPictureData(shared_ptr<WPSStream> stream, long endPos);
101 
102  // fmt
103 
105  bool readZoneBeginC9(shared_ptr<WPSStream> stream);
107  bool readGraphic(shared_ptr<WPSStream> stream);
109  bool readFrame(shared_ptr<WPSStream> stream);
111  bool readTextBoxDataD1(shared_ptr<WPSStream> stream);
112 
113 private:
114  LotusGraph(LotusGraph const &orig);
115  LotusGraph &operator=(LotusGraph const &orig);
116  shared_ptr<WKSContentListener> m_listener;
117  LotusParser &m_mainParser;
120  shared_ptr<LotusStyleManager> m_styleManager;
122  shared_ptr<LotusGraphInternal::State> m_state;
123 };
124 
125 #endif /* LOTUS_GRAPH_H */
126 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
shared_ptr< WKSContentListener > m_listener
Definition: LotusGraph.h:116
Internal: the subdocument of a LotusGraphc.
Definition: LotusGraph.cpp:257
the graphic zone of a LotusGraph for 123 mac
Definition: LotusGraph.cpp:54
WKSSubDocument & operator=(const WKSSubDocument &)
void setListener(WKSContentListenerPtr &listen)
sets the listener
Definition: LotusGraph.h:64
shared_ptr< LotusStyleManager > m_styleManager
the style manager
Definition: LotusGraph.h:120
This class parses Microsoft Works graph file.
Definition: LotusGraph.h:51
This class parses a WK2..WK4 Lotus spreadsheet.
Definition: Lotus.h:66
WKSParser * parser() const
returns the parser
Definition: WKSSubDocument.h:44
shared_ptr< WKSContentListener > WKSContentListenerPtr
shared pointer to WKSContentListener
Definition: libwps_internal.h:115
This class parses the Lotus style.
Definition: LotusStyleManager.h:45
shared_ptr< LotusGraphInternal::State > m_state
the internal state
Definition: LotusGraph.h:122
basic class to store an entry in a file This contained :
Definition: WPSEntry.h:38
Definition: LotusGraph.cpp:51

Generated on Wed Oct 26 2016 16:54:37 for libwps by doxygen 1.8.12