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 <map>
27 #include <string>
28 #include <vector>
29 
30 #include <librevenge-stream/librevenge-stream.h>
31 
32 #include "libwps_internal.h"
33 
34 #include "WPSDebug.h"
35 #include "WKSContentListener.h"
36 
37 namespace LotusGraphInternal
38 {
39 struct ZoneMac; // 123 mac
40 struct ZonePc; // 123 pc
41 struct ZonePcList; // 123 pc
42 struct ZoneWK4; // lotus 4
43 struct State;
44 
45 class SubDocument;
46 }
47 
48 class LotusParser;
49 class LotusStyleManager;
50 
56 {
57 public:
58  friend class LotusParser;
60 
62  explicit LotusGraph(LotusParser &parser);
64  ~LotusGraph();
66  void cleanState();
69  {
70  m_listener = listen;
71  }
78  void updateState(std::map<int,int> const &zIdToSheetIdMap,
79  std::map<std::string,int> const &nameToChartIdMap);
80 protected:
82  int version() const;
83 
85  bool hasGraphics(int sheetId) const;
87  void sendGraphics(int sheetId);
89  void sendZone(LotusGraphInternal::ZonePcList const &zoneList, size_t id, WPSTransformation &transf);
91  void sendPicture(LotusGraphInternal::ZoneMac const &zone);
93  void sendTextBox(std::shared_ptr<WPSStream> stream, WPSEntry const &entry);
95  void sendTextBoxWK4(std::shared_ptr<WPSStream> stream, WPSEntry const &entry, bool isButton);
96 
98  bool setChartId(int chartId);
99 
100  //
101  // low level
102  //
103 
104  // ////////////////////// zone //////////////////////////////
105 
106  // zone 1b
107 
109  bool readZoneBegin(std::shared_ptr<WPSStream> stream, long endPos);
111  bool readZoneData(std::shared_ptr<WPSStream> stream, long endPos, int type);
113  bool readTextBoxData(std::shared_ptr<WPSStream> stream, long endPos);
115  bool readPictureDefinition(std::shared_ptr<WPSStream> stream, long endPos);
117  bool readPictureData(std::shared_ptr<WPSStream> stream, long endPos);
118 
119  // fmt
120 
122  bool readFMTPictName(std::shared_ptr<WPSStream> stream);
124  bool readZoneBeginC9(std::shared_ptr<WPSStream> stream);
126  bool readGraphic(std::shared_ptr<WPSStream> stream);
128  bool readFrame(std::shared_ptr<WPSStream> stream);
130  bool readTextBoxDataD1(std::shared_ptr<WPSStream> stream);
131 
132  // 123 zone 3XX
133 
135  bool readGraphZone(std::shared_ptr<WPSStream> stream, int zId);
137  bool readGraphDataZone(std::shared_ptr<WPSStream> stream, long endPos);
138 
139 private:
140  LotusGraph(LotusGraph const &orig) = delete;
141  LotusGraph &operator=(LotusGraph const &orig) = delete;
142  std::shared_ptr<WKSContentListener> m_listener;
146  std::shared_ptr<LotusStyleManager> m_styleManager;
148  std::shared_ptr<LotusGraphInternal::State> m_state;
149 };
150 
151 #endif /* LOTUS_GRAPH_H */
152 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WPSGraphicShape::m_vertices
std::vector< Vec2f > m_vertices
the list of vertices for lines or polygons
Definition: WPSGraphicShape.h:211
WPSBox2::center
Vec2< T > center() const
the box center
Definition: libwps_internal.h:759
LotusGraphInternal::ZoneWK4::m_id
int m_id
the zone id
Definition: LotusGraph.cpp:233
LotusGraphInternal::ZoneMac
the graphic zone of a LotusGraph for 123 mac
Definition: LotusGraph.cpp:54
LotusGraph::updateState
void updateState(std::map< int, int > const &zIdToSheetIdMap, std::map< std::string, int > const &nameToChartIdMap)
update the state (need to be called before sending data)
Definition: LotusGraph.cpp:605
LotusGraphInternal::ZonePc
the graphic zone of a LotusGraph for 123 pc
Definition: LotusGraph.cpp:257
WPSParagraph.h
WKSSubDocument::parser
WKSParser * parser() const
returns the parser
Definition: WKSSubDocument.h:44
WPSGraphicShape::rectangle
static WPSGraphicShape rectangle(WPSBox2f const &box, Vec2f const &corners=Vec2f(0, 0))
static constructor to create a rectangle
Definition: WPSGraphicShape.h:109
WPSParagraph::m_justify
libwps::Justification m_justify
the justification
Definition: WPSParagraph.h:116
LotusGraph::readGraphic
bool readGraphic(std::shared_ptr< WPSStream > stream)
try to read a graphic: 0xca (wk4)
Definition: LotusGraph.cpp:1472
LotusGraphInternal::State::m_actualZoneWK4
std::shared_ptr< ZoneWK4 > m_actualZoneWK4
a pointer to the actual zone
Definition: LotusGraph.cpp:512
LotusGraphInternal::ZoneWK4::m_hasShadow
bool m_hasShadow
a flag to know if we need to add shadow
Definition: LotusGraph.cpp:249
libwps::DebugStream::str
static std::string str()
Definition: WPSDebug.h:200
WPSTransformation
a transformation which stored the first row of a 3x3 perspective matrix
Definition: libwps_internal.h:1130
LotusGraphInternal::State::m_actualZonePc
std::shared_ptr< ZonePc > m_actualZonePc
a pointer to the actual zone
Definition: LotusGraph.cpp:516
WPS_BOLD_BIT
#define WPS_BOLD_BIT
Definition: libwps_internal.h:506
LotusGraph::m_mainParser
LotusParser & m_mainParser
the listener (if set)
Definition: LotusGraph.h:144
libwps::DebugFile::addPos
static void addPos(long)
Definition: WPSDebug.h:220
LotusGraphInternal::ZonePc::Rect
Definition: LotusGraph.cpp:260
LotusGraphInternal::ZonePc::Unknown
Definition: LotusGraph.cpp:260
WPSBox2f
WPSBox2< float > WPSBox2f
WPSBox2 of float.
Definition: libwps_internal.h:890
WPSEntry::end
long end() const
returns the end offset
Definition: WPSEntry.h:76
LotusGraphInternal::SubDocument::m_version
int m_version
the textbox version
Definition: LotusGraph.cpp:559
libwps::Debug::dumpFile
bool dumpFile(librevenge::RVNGBinaryData &, char const *)
Definition: WPSDebug.h:180
LotusGraph::setListener
void setListener(WKSContentListenerPtr &listen)
sets the listener
Definition: LotusGraph.h:68
WPSGraphicShape::PathData
a simple path component
Definition: WPSGraphicShape.h:42
LotusGraphInternal::ZonePc::ZonePc
ZonePc(std::shared_ptr< WPSStream > const &stream)
constructor
Definition: LotusGraph.cpp:262
LotusGraphInternal::ZoneMac::m_hasShadow
bool m_hasShadow
a flag to know if we need to add shadow
Definition: LotusGraph.cpp:142
LotusGraphInternal::ZonePc::m_rotate
float m_rotate
the rotation
Definition: LotusGraph.cpp:378
LotusGraphInternal::ZonePc::m_stream
std::shared_ptr< WPSStream > m_stream
the stream
Definition: LotusGraph.cpp:372
LotusGraphInternal::ZoneWK4::m_subType
int m_subType
the sub type
Definition: LotusGraph.cpp:231
LotusGraphInternal::ZoneMac::m_subType
int m_subType
the file modifier type
Definition: LotusGraph.cpp:128
WPS_UNDERLINE_BIT
#define WPS_UNDERLINE_BIT
Definition: libwps_internal.h:508
LotusParser::updateEmbeddedObject
bool updateEmbeddedObject(int id, WPSEmbeddedObject &object) const
try to retrieve the content of a graphic, knowing it local id
Definition: Lotus.cpp:328
LotusGraphInternal::ZonePc::m_isRoundRect
bool m_isRoundRect
true if the rect is a round rect
Definition: LotusGraph.cpp:370
WKSSubDocument.h
LotusGraphInternal::SubDocument::m_entry
WPSEntry m_entry
a flag to known if we need to send the entry or the footer
Definition: LotusGraph.cpp:557
LotusGraphInternal::SubDocument::SubDocument
SubDocument(std::shared_ptr< WPSStream > const &stream, LotusGraph &graphParser, WPSEntry &entry, int version)
constructor for a text entry
Definition: LotusGraph.cpp:528
LotusGraphInternal::ZoneMac::Frame
Definition: LotusGraph.cpp:57
LotusGraphInternal::ZonePc::Line
Definition: LotusGraph.cpp:260
LotusGraphInternal::ZoneMac::m_box
WPSBox2i m_box
the bdbox
Definition: LotusGraph.cpp:132
LotusGraphInternal::ZoneMac::m_surfaceId
int m_surfaceId
the surface color style id
Definition: LotusGraph.cpp:140
LotusGraph::readFrame
bool readFrame(std::shared_ptr< WPSStream > stream)
try to read a graph's frame: 0xcc (wk4)
Definition: LotusGraph.cpp:1917
LotusGraphInternal
Definition: LotusGraph.cpp:51
LotusGraphInternal::State::m_actualZoneMac
std::shared_ptr< ZoneMac > m_actualZoneMac
a pointer to the actual zone
Definition: LotusGraph.cpp:508
LotusGraphInternal::ZonePc::Set
Definition: LotusGraph.cpp:260
LotusGraphInternal::ZoneMac::Unknown
Definition: LotusGraph.cpp:57
LotusGraphInternal::ZoneMac::getGraphicShape
bool getGraphicShape(WPSGraphicShape &shape, WPSPosition &pos) const
returns a graphic shape corresponding to the main form (and the origin)
Definition: LotusGraph.cpp:155
WPSGraphicShape::circle
static WPSGraphicShape circle(WPSBox2f const &box)
static constructor to create a circle
Definition: WPSGraphicShape.h:118
libwps::DebugFile::skipZone
static void skipZone(long, long)
Definition: WPSDebug.h:226
LotusStyleManager
This class parses the Lotus style.
Definition: LotusStyleManager.h:47
LotusGraph::LotusGraph
LotusGraph(LotusParser &parser)
constructor
Definition: LotusGraph.cpp:588
libwps_tools_win::Font::unicodeString
static librevenge::RVNGString unicodeString(const unsigned char *p, unsigned long size, Type type, bool skipUnknown=true)
converts a list of character in unicode
Definition: libwps_tools_win.cpp:7283
LotusGraphInternal::ZonePc::Polygon
Definition: LotusGraph.cpp:260
WPSPosition::origin
const Vec2f & origin() const
return the frame origin
Definition: WPSPosition.h:116
LotusParser::getDefaultFontType
libwps_tools_win::Font::Type getDefaultFontType() const
returns the default font type, ie.
Definition: Lotus.cpp:273
LotusGraphInternal::ZonePcList::m_zones
std::vector< std::shared_ptr< ZonePc > > m_zones
the list of zones
Definition: LotusGraph.cpp:478
LotusGraphInternal::ZoneWK4::m_textEntry
WPSEntry m_textEntry
the text entry (for textbox and button)
Definition: LotusGraph.cpp:251
WPS_OUTLINE_BIT
#define WPS_OUTLINE_BIT
Definition: libwps_internal.h:501
LotusGraphInternal::SubDocument::m_graphParser
LotusGraph & m_graphParser
the graph parser
Definition: LotusGraph.cpp:555
LotusGraphInternal::ZoneWK4::m_shape
WPSGraphicShape m_shape
the graphic shape
Definition: LotusGraph.cpp:245
LotusGraph::readTextBoxData
bool readTextBoxData(std::shared_ptr< WPSStream > stream, long endPos)
reads a graphic textbox data: 23f0 (wk3mac)
Definition: LotusGraph.cpp:867
WPSFont
define the font properties
Definition: WPSFont.h:36
LotusGraph::sendTextBoxWK4
void sendTextBoxWK4(std::shared_ptr< WPSStream > stream, WPSEntry const &entry, bool isButton)
try to send a textbox content's
Definition: LotusGraph.cpp:2031
LotusGraphInternal::SubDocument
Internal: the subdocument of a LotusGraphc.
Definition: LotusGraph.cpp:524
LotusGraphInternal::ZoneWK4::m_graphicStyle
WPSGraphicStyle m_graphicStyle
the graphic style wk4
Definition: LotusGraph.cpp:247
WPSGraphicStyle::m_lineDashWidth
std::vector< float > m_lineDashWidth
the dash array: a sequence of (fullsize, emptysize)
Definition: WPSGraphicStyle.h:344
WPSEntry::valid
bool valid(bool checkId=false) const
returns true if the zone length is positive
Definition: WPSEntry.h:87
WPS_ITALICS_BIT
#define WPS_ITALICS_BIT
Definition: libwps_internal.h:502
LotusGraphInternal::ZoneWK4::m_cellPosition
Vec2f m_cellPosition
the position in the cell
Definition: LotusGraph.cpp:237
WPSEntry
basic class to store an entry in a file This contained :
Definition: WPSEntry.h:38
Vec2i
Vec2< int > Vec2i
Vec2 of int.
Definition: libwps_internal.h:702
LotusGraph::sendTextBox
void sendTextBox(std::shared_ptr< WPSStream > stream, WPSEntry const &entry)
try to send a textbox content's
Definition: LotusGraph.cpp:1032
LotusGraphInternal::ZoneWK4::Group
Definition: LotusGraph.cpp:210
LotusGraphInternal::ZoneMac::Type
Type
the different type
Definition: LotusGraph.cpp:57
LotusGraphInternal::ZonePc::getTransformation
WPSTransformation getTransformation() const
returns a transformation corresponding to the shape
Definition: LotusGraph.cpp:285
LotusGraphInternal::ZoneMac::Line
Definition: LotusGraph.cpp:57
WPSTransformation::translation
static WPSTransformation translation(Vec2f const &trans)
returns a translation transformation
Definition: libwps_internal.h:1251
LotusGraphInternal::ZonePc::Chart
Definition: LotusGraph.cpp:260
WPSGraphicShape
a structure used to define a picture shape
Definition: WPSGraphicShape.h:34
WPSVec3f
WPSVec3< float > WPSVec3f
WPSVec3 of float.
Definition: libwps_internal.h:1069
LotusGraphInternal::State::m_sheetIdZoneWK4Map
std::multimap< int, std::shared_ptr< ZoneWK4 > > m_sheetIdZoneWK4Map
a map sheetid to zone
Definition: LotusGraph.cpp:510
LotusGraphInternal::ZonePc::getGraphicShape
bool getGraphicShape(WPSGraphicShape &shape, WPSPosition &pos) const
returns a graphic shape corresponding to the main form (and the origin)
Definition: LotusGraph.cpp:395
LotusGraph::sendGraphics
void sendGraphics(int sheetId)
send the graphics corresponding to a sheetId
Definition: LotusGraph.cpp:1231
LotusGraphInternal::ZoneWK4::m_cell
Vec2i m_cell
the cell
Definition: LotusGraph.cpp:235
Vec2f
Vec2< float > Vec2f
Vec2 of float.
Definition: libwps_internal.h:704
WPSPosition::setRelativePosition
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: WPSPosition.h:212
LotusGraphInternal::ZoneMac::ZoneMac
ZoneMac(std::shared_ptr< WPSStream > const &stream)
constructor
Definition: LotusGraph.cpp:59
LotusGraphInternal::ZonePcList::empty
bool empty() const
returns true if the number of graphic zone is empty
Definition: LotusGraph.cpp:468
LotusGraphInternal::ZonePc::m_translate
Vec2f m_translate
the translation
Definition: LotusGraph.cpp:376
LotusGraph::sendPicture
void sendPicture(LotusGraphInternal::ZoneMac const &zone)
try to send a picture: 123 mac
Definition: LotusGraph.cpp:1007
Vec2< int >
WPS_DEBUG_MSG
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
libwps::readU32
uint32_t readU32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:76
WPSFont::m_color
WPSColor m_color
the font color
Definition: WPSFont.h:89
LotusParser
This class parses a wk3,wk4,123 Lotus spreadsheet.
Definition: Lotus.h:72
LotusGraphInternal::ZoneWK4::Type
Type
the different type
Definition: LotusGraph.cpp:210
LotusParser::version
int version() const
return the file version
Definition: Lotus.cpp:265
WPSParagraph
class to store the paragraph properties
Definition: WPSParagraph.h:57
LotusGraphInternal::ZonePc::m_arrows
int m_arrows
the line arrows
Definition: LotusGraph.cpp:382
LotusGraphInternal::State::m_actualSheetId
int m_actualSheetId
the actual sheet id
Definition: LotusGraph.cpp:504
WKSContentListenerPtr
std::shared_ptr< WKSContentListener > WKSContentListenerPtr
shared pointer to WKSContentListener
Definition: libwps_internal.h:114
LotusGraphInternal::ZonePc::TextBox
Definition: LotusGraph.cpp:260
LotusGraph::readZoneBegin
bool readZoneBegin(std::shared_ptr< WPSStream > stream, long endPos)
reads a begin graphic zone: 2328 (wk3mac)
Definition: LotusGraph.cpp:653
LotusGraphInternal::ZonePc::operator<<
friend std::ostream & operator<<(std::ostream &o, ZonePc const &z)
operator<<
Definition: LotusGraph.cpp:295
LotusGraphInternal::ZoneMac::operator<<
friend std::ostream & operator<<(std::ostream &o, ZoneMac const &z)
operator<<
Definition: LotusGraph.cpp:79
libwps::read32
int32_t read32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:85
LotusGraph::operator=
LotusGraph & operator=(LotusGraph const &orig)=delete
libwps::SubDocumentType
SubDocumentType
Definition: libwps_internal.h:248
LotusGraphInternal::ZoneWK4::ZoneWK4
ZoneWK4(std::shared_ptr< WPSStream > const &stream)
constructor
Definition: LotusGraph.cpp:212
LotusGraphInternal::ZoneMac::m_values
int m_values[4]
unknown other value
Definition: LotusGraph.cpp:150
WPSFont.h
LotusGraphInternal::SubDocument::operator==
bool operator==(std::shared_ptr< WPSSubDocument > const &doc) const final
operator==
Definition: LotusGraph.cpp:538
LotusGraphInternal::ZoneWK4::m_frameSize
Vec2i m_frameSize
the frame dimension
Definition: LotusGraph.cpp:239
LotusGraphInternal::ZoneMac::m_chartId
int m_chartId
the chart id(for chart)
Definition: LotusGraph.cpp:144
LotusGraph::cleanState
void cleanState()
clean internal state
Definition: LotusGraph.cpp:600
LotusGraph::hasGraphics
bool hasGraphics(int sheetId) const
return true if the sheet sheetId has some graphic
Definition: LotusGraph.cpp:619
LotusGraph::readTextBoxDataD1
bool readTextBoxDataD1(std::shared_ptr< WPSStream > stream)
reads a graphic textbox data: 0xd1 (wk4)
Definition: LotusGraph.cpp:1999
WPSEntry.h
WPSGraphicStyle
a structure used to define a picture style
Definition: WPSGraphicStyle.h:37
WPSFont::m_attributes
uint32_t m_attributes
the font attributes defined as a set of bits
Definition: WPSFont.h:85
WPSFont::m_spacing
double m_spacing
font spacing
Definition: WPSFont.h:87
LotusStyleManager.h
LotusGraphInternal::ZonePc::m_extra
std::string m_extra
extra data
Definition: LotusGraph.cpp:392
libwps::DebugFile::addNote
static void addNote(char const *)
Definition: WPSDebug.h:221
WPSGraphicShape::ShapeUnknown
Definition: WPSGraphicShape.h:38
LotusGraphInternal::ZoneMac::m_pictureEntry
WPSEntry m_pictureEntry
the picture entry
Definition: LotusGraph.cpp:146
LotusGraphInternal::ZoneWK4::m_type
int m_type
the zone type
Definition: LotusGraph.cpp:229
WPSEntry::begin
long begin() const
returns the begin offset
Definition: WPSEntry.h:71
LotusGraphInternal::State
the state of LotusGraph
Definition: LotusGraph.cpp:484
LotusGraphInternal::SubDocument::parse
void parse(std::shared_ptr< WKSContentListener > &listener, libwps::SubDocumentType subDocumentType) final
the parser function
Definition: LotusGraph.cpp:562
libwps::read8
int8_t read8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:59
WPSFont::m_size
double m_size
font size
Definition: WPSFont.h:83
LotusGraphInternal::ZoneMac::m_lineId
int m_lineId
the line style id
Definition: LotusGraph.cpp:136
LotusGraph::m_state
std::shared_ptr< LotusGraphInternal::State > m_state
the internal state
Definition: LotusGraph.h:148
WPSEmbeddedObject
small class use to define a embedded object
Definition: libwps_internal.h:1076
LotusParser::getLeftTopPosition
bool getLeftTopPosition(Vec2i const &cell, int spreadsheet, Vec2f &pos) const
returns the left top position of a cell
Definition: Lotus.cpp:313
LotusGraphInternal::ZoneMac::Rect
Definition: LotusGraph.cpp:57
LotusGraphInternal::ZonePc::Ellipse
Definition: LotusGraph.cpp:260
LotusGraphInternal::ZonePc::m_pictureHeaderRead
int m_pictureHeaderRead
the number of read byte of the header
Definition: LotusGraph.cpp:388
LotusGraphInternal::ZonePc::Picture
Definition: LotusGraph.cpp:260
Lotus.h
LotusGraphInternal::ZoneMac::m_ordering
int m_ordering
the ordering
Definition: LotusGraph.cpp:134
LotusGraph::version
int version() const
return the file version
Definition: LotusGraph.cpp:612
WPSEntry::length
long length() const
returns the length of the zone
Definition: WPSEntry.h:81
LotusParser::getFont
bool getFont(int id, WPSFont &font, libwps_tools_win::Font::Type &type) const
returns the font corresponding to an id
Definition: Lotus.cpp:278
LotusGraphInternal::ZoneWK4::Unknown
Definition: LotusGraph.cpp:210
WKSSubDocument
Basic class used to store a spreadsheet sub document.
Definition: WKSSubDocument.h:35
libwps::DebugStream
Definition: WPSDebug.h:191
LotusGraph::readGraphDataZone
bool readGraphDataZone(std::shared_ptr< WPSStream > stream, long endPos)
try to read the graphic data zone: 010d
Definition: LotusGraph.cpp:2635
libwps::readU8
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
LotusGraphInternal::ZonePc::m_type
Type m_type
the zone type
Definition: LotusGraph.cpp:360
LotusGraph::readFMTPictName
bool readFMTPictName(std::shared_ptr< WPSStream > stream)
try to read the pict filename, ...: b7 (wk3-wk4 pc)
Definition: LotusGraph.cpp:1380
LotusGraphInternal::ZonePc::m_box
WPSBox2f m_box
the bdbox
Definition: LotusGraph.cpp:374
LotusGraphInternal::State::State
State()
constructor
Definition: LotusGraph.cpp:487
LotusGraph::m_styleManager
std::shared_ptr< LotusStyleManager > m_styleManager
the style manager
Definition: LotusGraph.h:146
LotusGraph::readPictureDefinition
bool readPictureDefinition(std::shared_ptr< WPSStream > stream, long endPos)
reads a picture definition: 240e (wk3mac)
Definition: LotusGraph.cpp:903
LotusGraphInternal::ZonePc::Type
Type
the different type
Definition: LotusGraph.cpp:260
LotusGraph::readGraphZone
bool readGraphZone(std::shared_ptr< WPSStream > stream, int zId)
try to read the graphic zone: 1XXX
Definition: LotusGraph.cpp:2205
LotusGraph::readZoneData
bool readZoneData(std::shared_ptr< WPSStream > stream, long endPos, int type)
reads a graphic zone: 2332, 2346, 2350, 2352, 23f0 (wk3mac)
Definition: LotusGraph.cpp:685
libwps_tools_win.h
WPSGraphicShape::line
static WPSGraphicShape line(Vec2f const &orign, Vec2f const &dest)
static constructor to create a line
Definition: WPSGraphicShape.cpp:212
LotusGraphInternal::ZonePcList
a list of ZonePc of a LotusGraph for 123 pc
Definition: LotusGraph.cpp:459
LotusGraphInternal::ZoneWK4::m_stream
std::shared_ptr< WPSStream > m_stream
the stream
Definition: LotusGraph.cpp:253
libwps::readData
bool readData(RVNGInputStreamPtr &input, unsigned long size, librevenge::RVNGBinaryData &data)
try to read sz bytes from input and store them in a librevenge::RVNGBinaryData
Definition: libwps_internal.cpp:332
WPSPosition::Page
Definition: WPSPosition.h:43
WPSTransformation::isIdentity
bool isIdentity() const
returns true if the matrix is an identity matrix
Definition: libwps_internal.h:1145
WPSGraphicShape::getBdBox
WPSBox2f getBdBox() const
returns the basic bdbox
Definition: WPSGraphicShape.h:186
LotusGraph::readPictureData
bool readPictureData(std::shared_ptr< WPSStream > stream, long endPos)
reads a picture data: 2410 (wk3mac)
Definition: LotusGraph.cpp:954
libwps::readU16
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
libwps_tools_win::Language::name
std::string name(long id)
returns the name given Windows© id
Definition: libwps_tools_win.cpp:7332
WPSGraphicStyle::m_lineColor
WPSColor m_lineColor
the line color
Definition: WPSGraphicStyle.h:352
LotusGraphInternal::ZoneMac::m_type
Type m_type
the zone type
Definition: LotusGraph.cpp:126
WPSGraphicShape::arc
static WPSGraphicShape arc(WPSBox2f const &box, WPSBox2f const &circleWPSBox, Vec2f const &angles)
static constructor to create a arc
Definition: WPSGraphicShape.h:126
LotusGraphInternal::ZoneWK4::Border
Definition: LotusGraph.cpp:210
WPSPosition.h
RVNGInputStreamPtr
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
WPSPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: WPSPosition.h:39
WPSDebug.h
WPSGraphicShape::transform
WPSGraphicShape transform(WPSTransformation const &matrix) const
returns a new shape corresponding to a matrix transformation
Definition: WPSGraphicShape.cpp:364
libwps::DebugFile::addDelimiter
static void addDelimiter(long, char)
Definition: WPSDebug.h:222
WPSBox2::size
Vec2< T > size() const
the box size
Definition: libwps_internal.h:754
LotusGraphInternal::ZonePc::m_isGroup
bool m_isGroup
true if the set is a group
Definition: LotusGraph.cpp:362
LotusGraphInternal::State::m_version
int m_version
the file version
Definition: LotusGraph.cpp:502
LotusGraph::setChartId
bool setChartId(int chartId)
sets the current chart id(interface with LotusChart)
Definition: LotusGraph.cpp:634
LotusParser::sendChart
bool sendChart(int cId, WPSPosition const &pos, WPSGraphicStyle const &style)
try to send a chart
Definition: Lotus.cpp:323
LotusGraph::~LotusGraph
~LotusGraph()
destructor
Definition: LotusGraph.cpp:596
libwps::read16
int16_t read16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:71
LotusGraphInternal::ZonePcList::ZonePcList
ZonePcList()
constructor
Definition: LotusGraph.cpp:462
WPSFont::getDefault
static WPSFont getDefault()
returns the default font ( Courier 12pt)
Definition: WPSFont.h:51
libwps_internal.h
LotusGraphInternal::ZoneWK4::TextBox
Definition: LotusGraph.cpp:210
libwps::JustificationLeft
Definition: libwps_internal.h:249
LotusGraph
This class parses Microsoft Works graph file.
Definition: LotusGraph.h:55
WKSContentListener.h
WPSColor
the class to store a color
Definition: libwps_internal.h:280
LotusGraphInternal::ZoneMac::m_graphicId
int m_graphicId
the graphic style id, used with rect shadow
Definition: LotusGraph.cpp:138
LotusGraphInternal::ZonePc::m_groupLastPosition
size_t m_groupLastPosition
the group last position
Definition: LotusGraph.cpp:364
WPSBox2i
WPSBox2< int > WPSBox2i
WPSBox2 of int.
Definition: libwps_internal.h:888
WPSGraphicShape.h
LotusGraphInternal::ZoneMac::m_textBoxEntry
WPSEntry m_textBoxEntry
the text box entry
Definition: LotusGraph.cpp:148
LotusGraph::m_listener
std::shared_ptr< WKSContentListener > m_listener
Definition: LotusGraph.h:142
WPSTransformation::rotation
static WPSTransformation rotation(float angle, Vec2f const &center=Vec2f(0, 0))
returns a rotation transformation around center.
Definition: libwps_internal.cpp:890
WPSBox2< int >
LotusGraphInternal::ZonePc::m_graphicId
int m_graphicId[2]
the graphic style id and the shadow style
Definition: LotusGraph.cpp:380
LotusGraphInternal::ZoneWK4
the graphic zone of a LotusGraph : wk4
Definition: LotusGraph.cpp:207
LotusGraphInternal::ZoneWK4::Shape
Definition: LotusGraph.cpp:210
WPS_SHADOW_BIT
#define WPS_SHADOW_BIT
Definition: libwps_internal.h:503
LotusGraphInternal::ZonePcList::m_groupBeginStack
std::stack< size_t > m_groupBeginStack
the stack indicating the beginning of each group
Definition: LotusGraph.cpp:480
WPSBox2::getUnion
WPSBox2< T > getUnion(WPSBox2< T > const &box) const
returns the union between this and box
Definition: libwps_internal.h:813
LotusGraphInternal::ZonePc::FreeHand
Definition: LotusGraph.cpp:260
WPSStream.h
LotusGraphInternal::State::m_zIdToSheetIdMap
std::map< int, int > m_zIdToSheetIdMap
a map sheet zone id to final sheet id map
Definition: LotusGraph.cpp:518
LotusGraph.h
LotusGraphInternal::ZonePc::m_textBoxEntry
WPSEntry m_textBoxEntry
the text box entry
Definition: LotusGraph.cpp:384
LotusGraphInternal::State::m_sheetIdZonePcListMap
std::map< int, ZonePcList > m_sheetIdZonePcListMap
a map sheetid to zone
Definition: LotusGraph.cpp:514
LotusGraph::readZoneBeginC9
bool readZoneBeginC9(std::shared_ptr< WPSStream > stream)
try to read the sheet id: 0xc9 (wk4)
Definition: LotusGraph.cpp:1349
LotusGraphInternal::ZoneMac::m_stream
std::shared_ptr< WPSStream > m_stream
the stream
Definition: LotusGraph.cpp:130
LotusGraphInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: LotusGraph.cpp:535
libwps::JustificationCenter
Definition: libwps_internal.h:249
WPSPosition::setSize
void setSize(Vec2f const &sz)
sets the frame size
Definition: WPSPosition.h:190
LotusGraphInternal::ZoneMac::m_extra
std::string m_extra
extra data
Definition: LotusGraph.cpp:152
LotusGraphInternal::ZoneMac::Arc
Definition: LotusGraph.cpp:57
LotusGraphInternal::ZoneWK4::m_pictureDim
WPSBox2i m_pictureDim
the picture dimension
Definition: LotusGraph.cpp:241
libwps::DebugFile
Definition: WPSDebug.h:207
LotusGraphInternal::ZonePc::m_vertices
std::vector< Vec2f > m_vertices
the list of points for a polygon
Definition: LotusGraph.cpp:368
LotusGraphInternal::ZoneWK4::m_pictureName
std::string m_pictureName
the picture name
Definition: LotusGraph.cpp:243
libwps::JustificationRight
Definition: libwps_internal.h:250
LotusGraphInternal::ZoneWK4::Picture
Definition: LotusGraph.cpp:210
WPSGraphicStyle.h
WPSGraphicStyle::m_lineWidth
float m_lineWidth
the linewidth
Definition: WPSGraphicStyle.h:342
LotusGraphInternal::ZonePc::m_pictureData
librevenge::RVNGBinaryData m_pictureData
the picture data
Definition: LotusGraph.cpp:386
LotusGraphInternal::ZonePc::Arc
Definition: LotusGraph.cpp:260
WPSGraphicShape::path
static WPSGraphicShape path(WPSBox2f const &box)
static constructor to create a path
Definition: WPSGraphicShape.h:162
LotusGraphInternal::ZonePc::m_numPoints
int m_numPoints
the number of points of a line or a polygon
Definition: LotusGraph.cpp:366
LotusGraphInternal::State::m_sheetIdZoneMacMap
std::multimap< int, std::shared_ptr< ZoneMac > > m_sheetIdZoneMacMap
a map sheetid to zone
Definition: LotusGraph.cpp:506
WPSGraphicShape::polygon
static WPSGraphicShape polygon(WPSBox2f const &box)
static constructor to create a polygon
Definition: WPSGraphicShape.h:146
LotusGraphInternal::ZoneWK4::Chart
Definition: LotusGraph.cpp:210
LotusGraphInternal::State::m_nameToChartIdMap
std::map< std::string, int > m_nameToChartIdMap
a map chart name to id chart map
Definition: LotusGraph.cpp:520
LotusGraphInternal::ZonePc::m_isSent
bool m_isSent
a flag to know if the zone has already be sent
Definition: LotusGraph.cpp:390
WPSColor::isBlack
bool isBlack() const
return true if the color is black
Definition: libwps_internal.h:345
WPSFont::m_name
librevenge::RVNGString m_name
font name
Definition: WPSFont.h:81
LotusGraph::sendZone
void sendZone(LotusGraphInternal::ZonePcList const &zoneList, size_t id, WPSTransformation &transf)
try to send a shape: 123 pc
Definition: LotusGraph.cpp:2127
WPSPosition::setOrigin
void setOrigin(Vec2f const &orig)
sets the frame origin
Definition: WPSPosition.h:185
LotusGraphInternal::SubDocument::m_stream
std::shared_ptr< WPSStream > m_stream
the stream
Definition: LotusGraph.cpp:553
WPSGraphicStyle::m_arrows
bool m_arrows[2]
two bool to indicated if extremity has arrow or not
Definition: WPSGraphicStyle.h:384

Generated on Wed Jul 24 2024 03:39:19 for libwps by doxygen 1.8.16