Go to the documentation of this file.
22 #ifndef QUATTRO_GRAPH_H
23 #define QUATTRO_GRAPH_H
29 #include <librevenge-stream/librevenge-stream.h>
49 class QuattroStyleManager;
80 void storeObjects(std::map<librevenge::RVNGString,WPSEmbeddedObject>
const &nameToObjectMap);
96 std::shared_ptr<WPSStream> stream)
const;
104 bool readBeginEnd(std::shared_ptr<WPSStream> stream,
int sheetId);
108 bool readImage(std::shared_ptr<WPSStream> stream);
110 bool readBitmap(std::shared_ptr<WPSStream> stream);
112 bool readChart(std::shared_ptr<WPSStream> stream);
114 bool readFrame(std::shared_ptr<WPSStream> stream);
116 bool readButton(std::shared_ptr<WPSStream> stream);
118 bool readOLEData(std::shared_ptr<WPSStream> stream);
125 bool readShape(std::shared_ptr<WPSStream> stream);
130 bool readLine(std::shared_ptr<WPSStream> stream);
132 bool readRect(std::shared_ptr<WPSStream> stream);
134 bool readPolygon(std::shared_ptr<WPSStream> stream);
136 bool readTextBox(std::shared_ptr<WPSStream> stream);
143 bool readDialog(std::shared_ptr<WPSStream> stream);
156 std::shared_ptr<QuattroGraphInternal::State>
m_state;
std::shared_ptr< Graph > m_actualGraph
the actual graph
Definition: QuattroGraph.cpp:353
QuattroGraph & m_graphParser
the graph parser
Definition: QuattroGraph.cpp:424
std::multimap< int, std::shared_ptr< Graph > > m_sheetIdToGraphMap
a multimap sheetId to graph
Definition: QuattroGraph.cpp:351
WKSParser * parser() const
returns the parser
Definition: WKSSubDocument.h:44
void storeGraph(std::shared_ptr< Graph > graph)
store a graph
Definition: QuattroGraph.cpp:329
static WPSGraphicShape rectangle(WPSBox2f const &box, Vec2f const &corners=Vec2f(0, 0))
static constructor to create a rectangle
Definition: WPSGraphicShape.h:109
libwps::Justification m_justify
the justification
Definition: WPSParagraph.h:116
int m_flags1[4]
some flags
Definition: QuattroGraph.cpp:262
#define WPS_STRIKEOUT_BIT
Definition: libwps_internal.h:507
int m_flags2[7]
final flag
Definition: QuattroGraph.cpp:264
the state of QuattroGraph
Definition: QuattroGraph.cpp:317
static std::string str()
Definition: WPSDebug.h:200
std::shared_ptr< WKSContentListener > m_listener
Definition: QuattroGraph.h:152
#define WPS_BOLD_BIT
Definition: libwps_internal.h:506
Vec2f getCellPosition(int sheetId, Vec2i const &cell) const
returns the beginning position of a cell
Definition: Quattro.cpp:571
Internal: a graph of a QuattroGraph.
Definition: QuattroGraph.cpp:230
static void addPos(long)
Definition: WPSDebug.h:220
bool readShapeHeader(QuattroGraphInternal::ShapeHeader &shape, std::shared_ptr< WPSStream > stream, long endPos)
read a shape header
Definition: QuattroGraph.cpp:537
int m_flags2[9]
final flag
Definition: QuattroGraph.cpp:71
WPSBox2< float > WPSBox2f
WPSBox2 of float.
Definition: libwps_internal.h:890
Definition: QuattroGraph.cpp:233
bool operator==(std::shared_ptr< WPSSubDocument > const &doc) const final
operator==
Definition: QuattroGraph.cpp:409
Graph(std::shared_ptr< WPSStream > const &stream, Type type=Unknown)
constructor
Definition: QuattroGraph.cpp:235
QuattroParser & m_mainParser
the listener (if set)
Definition: QuattroGraph.h:154
Definition: WPSGraphicStyle.h:45
AnchorTo m_anchorTo
anchor position
Definition: WPSPosition.h:239
std::vector< unsigned char > m_data
the pattern data: a sequence of data: p[0..7,0],p[8..15,0]...p[0..7,1],p[8..15,1],...
Definition: WPSGraphicStyle.h:191
bool sendTextbox(QuattroGraphInternal::Graph const &graph, int sheetId) const
send a textbox
Definition: QuattroGraph.cpp:2034
Definition: QuattroGraph.cpp:233
#define WPS_UNDERLINE_BIT
Definition: libwps_internal.h:508
WPSBox2i m_cellBox
the cell's position
Definition: QuattroGraph.cpp:258
Internal: a shape of a QuattroGraph.
Definition: QuattroGraph.cpp:181
Dialog()
constructor
Definition: QuattroGraph.cpp:58
Definition: QuattroGraph.cpp:233
bool readOLEData(std::shared_ptr< WPSStream > stream)
read a OLE data: zone 38b
Definition: QuattroGraph.cpp:941
int m_flags1[5]
some flags
Definition: QuattroGraph.cpp:69
static WPSGraphicShape circle(WPSBox2f const &box)
static constructor to create a circle
Definition: WPSGraphicShape.h:118
WPSBox2i m_cellBox
the cell's position
Definition: QuattroGraph.cpp:67
Type
the posible type
Definition: QuattroGraph.cpp:233
QuattroGraph & operator=(QuattroGraph const &orig)=delete
librevenge::RVNGString m_anchorCellName
the anchor cell name
Definition: WPSPosition.h:241
bool readDialogUnknown(std::shared_ptr< WPSStream > stream)
read a unknown dialog zone: 335,343,345
Definition: QuattroGraph.cpp:1859
define the font properties
Definition: WPSFont.h:36
bool readLine(std::shared_ptr< WPSStream > stream)
read a line/arrow data: zone 35a/37b
Definition: QuattroGraph.cpp:1378
static WPSColor barycenter(float alpha, WPSColor const &colA, float beta, WPSColor const &colB)
return alpha*colA+beta*colB
Definition: libwps_internal.cpp:386
void setBackgroundColor(WPSColor const &col, float opacity=1)
set the background color
Definition: WPSGraphicStyle.h:282
void cleanState()
clean internal state
Definition: QuattroGraph.cpp:474
bool valid(bool checkId=false) const
returns true if the zone length is positive
Definition: WPSEntry.h:87
bool readButton(std::shared_ptr< WPSStream > stream)
read a button: zone 386
Definition: QuattroGraph.cpp:1012
Vec2f m_size
the size
Definition: QuattroGraph.cpp:256
#define WPS_ITALICS_BIT
Definition: libwps_internal.h:502
Definition: QuattroGraph.cpp:233
WPSParagraph m_paragraph
the paragraph style
Definition: QuattroGraph.cpp:222
basic class to store an entry in a file This contained :
Definition: WPSEntry.h:38
Vec2< int > Vec2i
Vec2 of int.
Definition: libwps_internal.h:702
bool getPattern(int id, WPSGraphicStyle::Pattern &pattern) const
returns the pattern corresponding to a pattern id between 0 and 24
Definition: QuattroGraph.cpp:358
Vec2i m_dim
the dimension width x height
Definition: WPSGraphicStyle.h:186
std::shared_ptr< QuattroGraphInternal::State > m_state
the internal state
Definition: QuattroGraph.h:156
QuattroGraph(QuattroParser &parser)
constructor
Definition: QuattroGraph.cpp:463
librevenge::RVNGString m_linkName
the OLE's link name
Definition: QuattroGraph.cpp:274
a structure used to define a picture shape
Definition: WPSGraphicShape.h:34
WPSColor m_colors[2]
the two indexed colors
Definition: WPSGraphicStyle.h:189
bool readFillData(WPSGraphicStyle &style, int fillType, std::shared_ptr< WPSStream > stream, long endPos)
Definition: QuattroGraph.cpp:714
Definition: QuattroGraph.cpp:52
Vec2< float > Vec2f
Vec2 of float.
Definition: libwps_internal.h:704
bool getAverageColor(WPSColor &col) const
return the average color
Definition: WPSGraphicStyle.cpp:61
WPSBox2f m_cellBoxDecal
the decal position(LT, RB)
Definition: QuattroGraph.cpp:260
void updateState()
update the state (need to be called before sending data)
Definition: QuattroGraph.cpp:479
int m_values[5]
some values
Definition: QuattroGraph.cpp:266
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
bool readChart(std::shared_ptr< WPSStream > stream)
read a chart zone: zone 384
Definition: QuattroGraph.cpp:1243
class to store the paragraph properties
Definition: WPSParagraph.h:57
librevenge::RVNGString m_text
the main text
Definition: QuattroGraph.cpp:430
Internal: a shape of a QuattroGraph.
Definition: QuattroGraph.cpp:200
std::shared_ptr< WKSContentListener > WKSContentListenerPtr
shared pointer to WKSContentListener
Definition: libwps_internal.h:114
static bool readOLE(std::shared_ptr< WPSStream > stream, WPSEmbeddedObject &object, long endPos=-1)
try to read a OLE: 0x0105 ...
Definition: WPSOLEObject.cpp:139
bool readBitmap(std::shared_ptr< WPSStream > stream)
read a bitmap zone: zone 383(wb2)
Definition: QuattroGraph.cpp:1176
int32_t read32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:85
SubDocumentType
Definition: libwps_internal.h:248
Definition: WPSGraphicStyle.h:45
SubDocument(QuattroGraph &graphParser, librevenge::RVNGString const &text)
constructor for a text entry
Definition: QuattroGraph.cpp:399
bool readCString(std::shared_ptr< WPSStream > stream, librevenge::RVNGString &string, long maxSize)
try to read a basic C string, knowing the maximum size
Definition: Quattro.cpp:1699
bool readHeader(QuattroGraphInternal::Graph &header, std::shared_ptr< WPSStream > stream, long endPos)
try to read a graph header
Definition: QuattroGraph.cpp:514
int version() const
return the file version
Definition: Quattro.cpp:485
static WPSGraphicShape polyline(WPSBox2f const &box)
static constructor to create a polyline
Definition: WPSGraphicShape.h:154
bool sendPageGraphics(int sheetId) const
send the page graphic corresponding to a sheet
Definition: QuattroGraph.cpp:1944
a structure used to define a picture style
Definition: WPSGraphicStyle.h:37
std::shared_ptr< QuattroGraphInternal::Shape > m_shape
the graphic shape
Definition: QuattroGraph.cpp:277
~Shape() final
destructor
Definition: QuattroGraph.cpp:195
static void addNote(char const *)
Definition: WPSDebug.h:221
long begin() const
returns the begin offset
Definition: WPSEntry.h:71
std::ostream & operator<<(std::ostream &o, Dialog const &dlg)
Definition: QuattroGraph.cpp:74
bool send(QuattroGraphInternal::Textbox const &textbox, std::shared_ptr< WPSStream > stream) const
send the textbox content
Definition: QuattroGraph.cpp:2054
int8_t read8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:59
bool isEmpty() const
return true if the picture contains no data
Definition: libwps_internal.h:1095
void setListener(WKSContentListenerPtr &listen)
sets the listener
Definition: QuattroGraph.h:66
static bool readWMF(std::shared_ptr< WPSStream > stream, WPSEmbeddedObject &object, long endPos=-1)
try to read a wmf file: 0x0[12]00 0xXX00(with XX>=9)
Definition: WPSOLEObject.cpp:102
librevenge::RVNGString m_label
the label(button)
Definition: QuattroGraph.cpp:269
small class use to define a embedded object
Definition: libwps_internal.h:1076
~Textbox() final
destructor
Definition: QuattroGraph.cpp:225
void storeObjects(std::map< librevenge::RVNGString, WPSEmbeddedObject > const &nameToObjectMap)
stores the OLE objets
Definition: QuattroGraph.cpp:490
Type m_type
the type
Definition: QuattroGraph.cpp:254
bool readShape(std::shared_ptr< WPSStream > stream)
read a shape header: zone 4d3
Definition: QuattroGraph.cpp:1318
long length() const
returns the length of the zone
Definition: WPSEntry.h:81
std::shared_ptr< WPSStream > m_stream
the main stream
Definition: QuattroGraph.cpp:282
bool sendGraphic(QuattroGraphInternal::Graph const &graph) const
send a graphic
Definition: QuattroGraph.cpp:1958
This class parses QuattroPro graph file.
Definition: QuattroGraph.h:55
Basic class used to store a spreadsheet sub document.
Definition: WKSSubDocument.h:35
Definition: WPSDebug.h:191
bool readPolygon(std::shared_ptr< WPSStream > stream)
read a polygon/polyline data: zone 35c/37c/35b/388
Definition: QuattroGraph.cpp:1506
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
int version() const
return the file version
Definition: QuattroGraph.cpp:483
a structure used to define the gradient limit
Definition: WPSGraphicStyle.h:48
std::shared_ptr< Textbox > m_textbox
the textbox data
Definition: QuattroGraph.cpp:426
State()
constructor
Definition: QuattroGraph.cpp:320
This class parses Quattro Pro spreadsheet: .wb1, ..., .wb3.
Definition: Quattro.h:53
SubDocument(QuattroGraph &graphParser, std::shared_ptr< Textbox > const &textbox, std::shared_ptr< WPSStream > const &stream)
constructor for a textbox document
Definition: QuattroGraph.cpp:392
Definition: WPSPosition.h:43
bool readFrame(std::shared_ptr< WPSStream > stream)
read an frame: zone 385
Definition: QuattroGraph.cpp:824
a dialog header
Definition: QuattroGraph.cpp:55
WPSFont m_font
the font
Definition: QuattroGraph.cpp:220
static WPSGraphicShape line(Vec2f const &orign, Vec2f const &dest)
static constructor to create a line
Definition: WPSGraphicShape.cpp:212
bool sendShape(QuattroGraphInternal::Graph const &graph, int sheetId) const
send a shape
Definition: QuattroGraph.cpp:2012
Definition: WPSPosition.h:43
bool readBeginEnd(std::shared_ptr< WPSStream > stream, int sheetId)
read the begin/end graph zone: 321/322
Definition: QuattroGraph.cpp:789
std::vector< Vec2i > getGraphicCellsInSheet(int sheetId) const
return the list of cells containing some graphics in a sheet
Definition: QuattroGraph.cpp:495
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
libwps_tools_win::Font::Type getDefaultFontType() const
returns the default font type, ie.
Definition: Quattro.cpp:490
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
std::shared_ptr< QuattroGraphInternal::Textbox > m_textbox
the textbox
Definition: QuattroGraph.cpp:279
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: WPSPosition.h:39
static void addDelimiter(long, char)
Definition: WPSDebug.h:222
int m_actualSheet
the actual sheet id
Definition: QuattroGraph.cpp:349
Internal: the subdocument of a QuattroGraphInternal.
Definition: QuattroGraph.cpp:388
Definition: QuattroGraph.cpp:233
int16_t read16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:71
std::shared_ptr< WPSStream > m_stream
the file stream
Definition: QuattroGraph.cpp:428
int m_version
the file version
Definition: QuattroGraph.cpp:347
a basic pattern used in a WPSGraphicStyle:
Definition: WPSGraphicStyle.h:88
WPSEmbeddedObject m_ole
the OLE's data
Definition: QuattroGraph.cpp:272
~QuattroGraph()
destructor
Definition: QuattroGraph.cpp:470
the class to store a color
Definition: libwps_internal.h:280
WPSBox2< int > WPSBox2i
WPSBox2 of int.
Definition: libwps_internal.h:888
Shape()
constructor
Definition: QuattroGraph.cpp:184
WPSEntry m_entry
the text entry
Definition: QuattroGraph.cpp:218
Definition: QuattroGraph.cpp:233
WPSGraphicShape m_shape
the graphic shape
Definition: QuattroGraph.cpp:192
std::map< librevenge::RVNGString, WPSEmbeddedObject > m_linkNameToObjectMap
a map link name to object
Definition: QuattroGraph.cpp:355
friend std::ostream & operator<<(std::ostream &o, Dialog const &gr)
operator<<
Definition: QuattroGraph.cpp:74
bool readImage(std::shared_ptr< WPSStream > stream)
read a image zone: zone 382(wb2)
Definition: QuattroGraph.cpp:1115
Definition: libwps_internal.h:249
Definition: WPSDebug.h:207
Definition: libwps_internal.h:250
Definition: WPS4Text.cpp:433
Definition: QuattroGraph.cpp:233
bool readFrameOLE(std::shared_ptr< WPSStream > stream)
read a new OLE frame zone: zone 381(wb2)
Definition: QuattroGraph.cpp:882
bool readRect(std::shared_ptr< WPSStream > stream)
read a oval/rect/round rect data: zone 33e/364/379
Definition: QuattroGraph.cpp:1449
void parse(std::shared_ptr< WKSContentListener > &listener, libwps::SubDocumentType subDocumentType) final
the parser function
Definition: QuattroGraph.cpp:433
static WPSGraphicShape polygon(WPSBox2f const &box)
static constructor to create a polygon
Definition: WPSGraphicShape.h:146
Textbox()
constructor
Definition: QuattroGraph.cpp:203
~SubDocument() final
destructor
Definition: QuattroGraph.cpp:406
std::string getCellName(Vec2i const &cellPos, Vec2b const &relative)
returns the cell name corresponding to a cell's position
Definition: libwps_internal.cpp:953
bool readDialog(std::shared_ptr< WPSStream > stream)
read a dialog zone: 35e
Definition: QuattroGraph.cpp:1771
bool sendGraphics(int sheetId, Vec2i const &cell) const
send the graphic corresponding to a cell
Definition: QuattroGraph.cpp:1921
bool readTextBox(std::shared_ptr< WPSStream > stream)
read a textbox data: zone 36f
Definition: QuattroGraph.cpp:1571
Generated on Sat Oct 6 2018 17:10:15 for libwps by
doxygen 1.8.16