Go to the documentation of this file.
22 #ifndef QUATTRO9_GRAPH_H
23 #define QUATTRO9_GRAPH_H
29 #include <librevenge-stream/librevenge-stream.h>
80 void storeObjects(std::map<librevenge::RVNGString,WPSEmbeddedObject>
const &nameToObjectMap);
100 bool readBeginEnd(std::shared_ptr<WPSStream> stream,
int sheetId);
112 bool readOLEName(std::shared_ptr<WPSStream>
const &stream);
114 bool readShape(std::shared_ptr<WPSStream>
const &stream);
130 std::shared_ptr<Quattro9GraphInternal::State>
m_state;
std::vector< Vec2f > m_vertices
the list of vertices for lines or polygons
Definition: WPSGraphicShape.h:211
std::shared_ptr< Quattro9GraphInternal::State > m_state
the internal state
Definition: Quattro9Graph.h:130
static WPSColor white()
return the white color
Definition: libwps_internal.h:311
#define WPS_N_ELEMENTS(m)
Definition: libwps_internal.h:124
WKSParser * parser() const
returns the parser
Definition: WKSSubDocument.h:44
bool readFrameStyle(std::shared_ptr< WPSStream > const &stream)
try to read a frame style zone: 2131
Definition: Quattro9Graph.cpp:1311
bool getPattern(int id, WPSGraphicStyle::Pattern &pattern) const
returns the pattern corresponding to a pattern id between 0 and 24
Definition: Quattro9Graph.cpp:571
SubDocument(Quattro9Graph &graphParser, std::shared_ptr< Textbox > const &textbox, libwps_tools_win::Font::Type fontType)
constructor for a textbox document
Definition: Quattro9Graph.cpp:476
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
#define WPS_STRIKEOUT_BIT
Definition: libwps_internal.h:507
Internal: a graph of a QuattroGraph.
Definition: Quattro9Graph.cpp:134
bool readOLEName(std::shared_ptr< WPSStream > const &stream)
try to read the OLE name zone: 21d1
Definition: Quattro9Graph.cpp:1498
static std::string str()
Definition: WPSDebug.h:200
#define WPS_BOLD_BIT
Definition: libwps_internal.h:506
bool readFramePattern(std::shared_ptr< WPSStream > const &stream)
try to read a frame style zone: 2141
Definition: Quattro9Graph.cpp:1276
static void addPos(long)
Definition: WPSDebug.h:220
std::vector< std::pair< WPSGraphicShape, WPSGraphicStyle > > m_listShapes
the list of shape and style
Definition: Quattro9Graph.cpp:104
bool readFrameHeader(std::shared_ptr< WPSStream > const &stream)
try to read a frame header zone: 2171
Definition: Quattro9Graph.cpp:1232
WPSBox2< float > WPSBox2f
WPSBox2 of float.
Definition: libwps_internal.h:890
std::shared_ptr< WPSStream > m_stream
the text stream
Definition: Quattro9Graph.cpp:130
bool readTextboxStyle(std::shared_ptr< WPSStream > const &stream)
try to read a textbox style zone: 2371
Definition: Quattro9Graph.cpp:1365
Definition: WPSGraphicStyle.h:45
AnchorTo m_anchorTo
anchor position
Definition: WPSPosition.h:239
LineJoin m_lineJoin
the line join
Definition: WPSGraphicStyle.h:348
float m_gradientAngle
the gradient angle
Definition: WPSGraphicStyle.h:375
a simple path component
Definition: WPSGraphicShape.h:42
#define WPS_SUBSCRIPT_BIT
Definition: libwps_internal.h:500
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
std::map< librevenge::RVNGString, WPSEmbeddedObject > m_linkNameToObjectMap
a map link name to object
Definition: Quattro9Graph.cpp:235
libwps_tools_win::Font::Type getDefaultFontType() const
returns the default font type, ie.
Definition: Quattro9.cpp:422
int m_zoneDepth
current zone begin/end depth
Definition: Quattro9Graph.cpp:223
Definition: Quattro9Graph.cpp:52
#define WPS_UNDERLINE_BIT
Definition: libwps_internal.h:508
std::vector< WPSColor > m_colorsList
the color list
Definition: Quattro9Graph.cpp:229
bool sendTextbox(Quattro9GraphInternal::Graph const &graph, int sheetId) const
send a textbox
Definition: Quattro9Graph.cpp:1697
int m_actualSheet
the actual sheet id
Definition: Quattro9Graph.cpp:221
Definition: Quattro9Graph.cpp:137
Vec2f m_gradientPercentCenter
the gradient center
Definition: WPSGraphicStyle.h:379
#define WPS_SUPERSCRIPT_BIT
Definition: libwps_internal.h:499
Graph(std::shared_ptr< WPSStream > const &stream, Type type=Unknown)
constructor
Definition: Quattro9Graph.cpp:139
int m_actualGraphDepth
the depth which correspond to the creation of the graph
Definition: Quattro9Graph.cpp:227
Definition: Quattro9Graph.cpp:137
Definition: WPSGraphicStyle.h:43
std::ostream & operator<<(std::ostream &o, Graph const &gr)
Definition: Quattro9Graph.cpp:171
Definition: WPSGraphicStyle.h:45
static WPSGraphicShape circle(WPSBox2f const &box)
static constructor to create a circle
Definition: WPSGraphicShape.h:118
#define WPS_OUTLINE_BIT
Definition: libwps_internal.h:501
bool isWhite() const
return true if the color is white
Definition: libwps_internal.h:350
This class parses Quattro Pro WP spreadsheet: .qpw.
Definition: Quattro9.h:89
Quattro9Graph(Quattro9Parser &parser)
constructor
Definition: Quattro9Graph.cpp:535
Definition: Quattro9Graph.cpp:137
#define WPS_DOUBLE_UNDERLINE_BIT
Definition: libwps_internal.h:505
define the font properties
Definition: WPSFont.h:36
void setBackgroundColor(WPSColor const &col, float opacity=1)
set the background color
Definition: WPSGraphicStyle.h:282
Definition: Quattro9Graph.cpp:137
std::vector< float > m_lineDashWidth
the dash array: a sequence of (fullsize, emptysize)
Definition: WPSGraphicStyle.h:344
#define WPS_ITALICS_BIT
Definition: libwps_internal.h:502
GradientType m_gradientType
the gradient type
Definition: WPSGraphicStyle.h:371
Vec2< int > Vec2i
Vec2 of int.
Definition: libwps_internal.h:702
Vec2i m_dim
the dimension width x height
Definition: WPSGraphicStyle.h:186
std::shared_ptr< WKSContentListener > m_listener
Definition: Quattro9Graph.h:126
bool readBeginEndZone(std::shared_ptr< WPSStream > const &stream)
try to read a begin/end zone: 2051
Definition: Quattro9Graph.cpp:617
std::shared_ptr< Quattro9GraphInternal::Shape > m_shape
the graphic shape
Definition: Quattro9Graph.cpp:163
a structure used to define a picture shape
Definition: WPSGraphicShape.h:34
std::shared_ptr< Shape > m_child
the child (if this is a group)
Definition: Quattro9Graph.cpp:106
WPSColor m_colors[2]
the two indexed colors
Definition: WPSGraphicStyle.h:189
Vec2< float > Vec2f
Vec2 of float.
Definition: libwps_internal.h:704
std::shared_ptr< Textbox > m_textbox
the textbox data
Definition: Quattro9Graph.cpp:497
bool readGraphHeader(std::shared_ptr< WPSStream > const &stream)
try to read a graph header zone: 2051
Definition: Quattro9Graph.cpp:659
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
uint32_t readU32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:76
WPSColor m_color
the font color
Definition: WPSFont.h:89
static WPSGraphicStyle emptyStyle()
returns an empty style.
Definition: WPSGraphicStyle.h:237
class to store the paragraph properties
Definition: WPSParagraph.h:57
Definition: WPSGraphicStyle.h:43
std::shared_ptr< WKSContentListener > WKSContentListenerPtr
shared pointer to WKSContentListener
Definition: libwps_internal.h:114
void storeGraph(std::shared_ptr< Graph > graph)
store a graph
Definition: Quattro9Graph.cpp:196
std::shared_ptr< Quattro9GraphInternal::Textbox > m_textbox
the textbox shape
Definition: Quattro9Graph.cpp:165
Definition: Quattro9.h:42
Internal: a shape of a Quattro9Graph.
Definition: Quattro9Graph.cpp:55
std::shared_ptr< WPSStream > m_stream
the main stream
Definition: Quattro9Graph.cpp:168
int32_t read32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:85
Quattro9ParserInternal::TextEntry m_text
the text
Definition: Quattro9Graph.cpp:128
SubDocumentType
Definition: libwps_internal.h:248
Definition: WPSGraphicStyle.h:45
std::multimap< int, std::shared_ptr< Graph > > m_sheetIdToGraphMap
a multimap sheetId to graph
Definition: Quattro9Graph.cpp:233
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: Quattro9Graph.cpp:1716
bool readTextboxText(std::shared_ptr< WPSStream > const &stream)
try to read a textbox text zone: 2372
Definition: Quattro9Graph.cpp:1554
a structure used to define a picture style
Definition: WPSGraphicStyle.h:37
uint32_t m_attributes
the font attributes defined as a set of bits
Definition: WPSFont.h:85
static void addNote(char const *)
Definition: WPSDebug.h:221
bool operator==(std::shared_ptr< WPSSubDocument > const &doc) const final
operator==
Definition: Quattro9Graph.cpp:485
bool getColor(int id, WPSColor &color) const
returns the color corresponding to an id
Definition: Quattro9Graph.cpp:238
bool sendShape(Quattro9GraphInternal::Graph const &graph, int sheetId) const
send a shape
Definition: Quattro9Graph.cpp:1610
~SubDocument() final
destructor
Definition: Quattro9Graph.cpp:482
Type m_type
the type
Definition: Quattro9Graph.cpp:153
double m_size
font size
Definition: WPSFont.h:83
void updateState()
update the state (need to be called before sending data)
Definition: Quattro9Graph.cpp:551
std::vector< GradientStop > m_gradientStopList
the list of gradient limits
Definition: WPSGraphicStyle.h:373
bool sendOLE(Quattro9GraphInternal::Graph const &graph, int sheetId) const
send a OLE
Definition: Quattro9Graph.cpp:1673
std::string getDebugString(std::shared_ptr< WPSStream > const &stream) const
internal: returns a debug string
Definition: Quattro9.cpp:313
Basic class used to store a spreadsheet sub document.
Definition: WKSSubDocument.h:35
Definition: WPSDebug.h:191
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
a structure used to define the gradient limit
Definition: WPSGraphicStyle.h:48
Vec2f getCellPosition(int sheetId, Vec2i const &cell) const
returns the beginning position of a cell
Definition: Quattro9.cpp:520
WPSParagraph m_paragraph
the paragraph
Definition: Quattro9Graph.cpp:124
void parse(std::shared_ptr< WKSContentListener > &listener, libwps::SubDocumentType subDocumentType) final
the parser function
Definition: Quattro9Graph.cpp:502
Internal: a shape of a Quattro9Graph.
Definition: Quattro9Graph.cpp:110
Definition: Quattro9Graph.cpp:137
static WPSGraphicShape line(Vec2f const &orign, Vec2f const &dest)
static constructor to create a line
Definition: WPSGraphicShape.cpp:212
bool readShapeRec(std::shared_ptr< WPSStream > const &stream, long endPos, Quattro9GraphInternal::Shape &shape, WPSGraphicStyle const &actStyle)
try to read a shape sub zone: 2221, 23d1
Definition: Quattro9Graph.cpp:744
void setSurfaceColor(WPSColor const &col, float opacity=1)
set the surface color
Definition: WPSGraphicStyle.h:251
Definition: WPSPosition.h:43
WPSBox2f getBdBox() const
returns the basic bdbox
Definition: WPSGraphicShape.h:186
bool getColor(int id, WPSColor &color) const
returns the color corresponding to an id
Definition: Quattro9Graph.cpp:567
Textbox()
constructor
Definition: Quattro9Graph.cpp:113
WPSFont m_font
the font
Definition: Quattro9Graph.cpp:122
bool readPString(std::shared_ptr< WPSStream > const &stream, long endPos, Quattro9ParserInternal::TextEntry &entry)
try to read a string: length[2bytes], unknow[bytes] followed by the string
Definition: Quattro9.cpp:1258
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
std::vector< PathData > m_path
the list of path component
Definition: WPSGraphicShape.h:213
Shape()
constructor
Definition: Quattro9Graph.cpp:58
WPSColor m_lineColor
the line color
Definition: WPSGraphicStyle.h:352
~Quattro9Graph()
destructor
Definition: Quattro9Graph.cpp:542
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
bool empty() const
returns true if the shape is empty
Definition: Quattro9Graph.cpp:65
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: WPSPosition.h:39
WPSGraphicShape transform(WPSTransformation const &matrix) const
returns a new shape corresponding to a matrix transformation
Definition: WPSGraphicShape.cpp:364
static void addDelimiter(long, char)
Definition: WPSDebug.h:222
Vec2< T > size() const
the box size
Definition: libwps_internal.h:754
WPSBox2f m_cellBoxDecal
the decal position(LT, RB)
Definition: Quattro9Graph.cpp:159
Definition: Quattro9Graph.cpp:137
Definition: WPSGraphicStyle.h:45
Internal: the subdocument of a Quattro9GraphInternal.
Definition: Quattro9Graph.cpp:472
Vec2f m_size
the size
Definition: Quattro9Graph.cpp:155
int16_t read16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:71
bool readShape(std::shared_ptr< WPSStream > const &stream)
try to read a shape zone: 2221, 23d1
Definition: Quattro9Graph.cpp:708
WPSGraphicStyle m_style
the textbox style
Definition: Quattro9Graph.cpp:126
a basic pattern used in a WPSGraphicStyle:
Definition: WPSGraphicStyle.h:88
the class to store a color
Definition: libwps_internal.h:280
State()
constructor
Definition: Quattro9Graph.cpp:183
Quattro9Parser & m_mainParser
the listener (if set)
Definition: Quattro9Graph.h:128
WPSBox2< int > WPSBox2i
WPSBox2 of int.
Definition: libwps_internal.h:888
int version() const
return the file version
Definition: Quattro9.cpp:417
libwps_tools_win::Font::Type m_fontType
the font type
Definition: Quattro9Graph.cpp:499
void setListener(WKSContentListenerPtr &listen)
sets the listener
Definition: Quattro9Graph.h:63
This class parses Quattro9Pro graph file.
Definition: Quattro9Graph.h:52
Definition: Quattro9Graph.cpp:137
#define WPS_SHADOW_BIT
Definition: libwps_internal.h:503
WPSBox2< T > getUnion(WPSBox2< T > const &box) const
returns the union between this and box
Definition: libwps_internal.h:813
friend std::ostream & operator<<(std::ostream &o, Graph const &gr)
operator<<
Definition: Quattro9Graph.cpp:171
Definition: libwps_internal.h:249
WPSBox2f m_box
the box(if this is a group)
Definition: Quattro9Graph.cpp:102
librevenge::RVNGString m_OLEName
the OLE name
Definition: Quattro9Graph.cpp:161
bool getPattern32(int id, WPSGraphicStyle::Pattern &pattern)
returns the pattern corresponding to a pattern id between 0 and 32
Definition: Quattro9Graph.cpp:366
Definition: WPSDebug.h:207
WPSBox2f getBdBox() const
returns true if the bounding box
Definition: Quattro9Graph.cpp:70
Definition: libwps_internal.h:250
void cleanState()
clean internal state
Definition: Quattro9Graph.cpp:546
float m_lineWidth
the linewidth
Definition: WPSGraphicStyle.h:342
std::shared_ptr< Graph > m_actualGraph
the actual graph
Definition: Quattro9Graph.cpp:225
static WPSGraphicShape path(WPSBox2f const &box)
static constructor to create a path
Definition: WPSGraphicShape.h:162
int m_version
the file version
Definition: Quattro9Graph.cpp:219
Quattro9Graph & operator=(Quattro9Graph const &orig)=delete
static WPSGraphicShape polygon(WPSBox2f const &box)
static constructor to create a polygon
Definition: WPSGraphicShape.h:146
bool getUniqueColor(WPSColor &col) const
check if the pattern has only one color; if so returns true...
Definition: WPSGraphicStyle.cpp:45
bool readBeginEnd(std::shared_ptr< WPSStream > stream, int sheetId)
read the begin/end graph zone: 1401/1402
Definition: Quattro9Graph.cpp:582
the state of Quattro9Graph
Definition: Quattro9Graph.cpp:180
void setPattern(Pattern const &pat)
set the pattern
Definition: WPSGraphicStyle.h:262
static WPSColor black()
return the back color
Definition: libwps_internal.h:306
std::vector< WPSGraphicStyle::Pattern > m_patterns32List
the pattern 32 list
Definition: Quattro9Graph.cpp:231
bool isBlack() const
return true if the color is black
Definition: libwps_internal.h:345
int version() const
return the file version
Definition: Quattro9Graph.cpp:555
librevenge::RVNGString m_name
font name
Definition: WPSFont.h:81
WPSBox2i m_cellBox
the cell's position
Definition: Quattro9Graph.cpp:157
void storeObjects(std::map< librevenge::RVNGString, WPSEmbeddedObject > const &nameToObjectMap)
stores the OLE objets
Definition: Quattro9Graph.cpp:562
bool getPattern24(int id, WPSGraphicStyle::Pattern &pattern) const
returns the pattern corresponding to a pattern id between 0 and 24
Definition: Quattro9Graph.cpp:337
Type
the posible type
Definition: Quattro9Graph.cpp:137
bool m_arrows[2]
two bool to indicated if extremity has arrow or not
Definition: WPSGraphicStyle.h:384
Definition: Quattro9Graph.cpp:137
Generated on Wed Jul 24 2024 02:24:30 for libwps by
doxygen 1.8.16