Go to the documentation of this file.
38 #ifndef GREAT_WKS_GRAPH
39 # define GREAT_WKS_GRAPH
45 #include <librevenge/librevenge.h>
185 std::shared_ptr<GreatWksGraphInternal::State>
m_state;
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
Internal: a unknown zone of a GreatWksGraph.
Definition: GreatWksGraph.cxx:177
@ MWAW_K_DATABASE
database
Definition: MWAWDocument.hxx:87
FrameShape(FrameShape const &)=delete
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
@ G_Square
Definition: MWAWGraphicStyle.hxx:177
MWAWEntry m_zone
if valid the zone to parse
Definition: MWAWSubDocument.hxx:79
int m_page
the page
Definition: GreatWksGraph.cxx:164
@ T_BAD
Definition: GreatWksGraph.cxx:66
Internal: the state of a GreatWksGraph.
Definition: GreatWksGraph.cxx:448
void print(std::ostream &o) const final
print funtion
Definition: GreatWksGraph.cxx:412
bool hasSurfaceColor() const
returns true if the surface is defined
Definition: MWAWGraphicStyle.hxx:421
std::shared_ptr< MWAWGraphicListener > MWAWGraphicListenerPtr
a smart pointer of MWAWGraphicListener
Definition: libmwaw_internal.hxx:549
virtual ~Frame()
destructor
Definition: GreatWksGraph.cxx:171
~FrameBad() final
destructor
Definition: GreatWksGraph.cxx:191
bool sendPageFrames(GreatWksGraphInternal::Zone const &zone)
try to send all data corresponding to a zone
Definition: GreatWksGraph.cxx:2239
Internal: the group zone of a GreatWksGraph.
Definition: GreatWksGraph.cxx:276
@ T_PICTURE
Definition: GreatWksGraph.cxx:66
@ MWAW_K_SPREADSHEET
spreadsheet
Definition: MWAWDocument.hxx:86
~FrameGroup() final
destructor
Definition: GreatWksGraph.cxx:304
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
MWAWBox2f rotateBoxFromCenter(MWAWBox2f const &box, float angle)
rotate a bdox and returns the final bdbox, angle is given in degree
Definition: libmwaw_internal.cxx:708
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MWAWBox2f m_box
the zone bdbox
Definition: GreatWksGraph.cxx:162
Type getType() const final
return the frame type
Definition: GreatWksGraph.cxx:320
std::string m_extra
extra data
Definition: MWAWGraphicStyle.hxx:568
int m_lineFormat
the line format?
Definition: GreatWksGraph.cxx:264
GreatWksGraph(GreatWksDocument &document)
constructor
Definition: GreatWksGraph.cxx:516
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
void updateStyle(MWAWGraphicStyle &style) const
update the style
Definition: GreatWksGraph.cxx:237
std::shared_ptr< GreatWksGraphInternal::State > m_state
the state
Definition: GreatWksGraph.hxx:185
Type getType() const final
return the frame type
Definition: GreatWksGraph.cxx:353
static MWAWGraphicShape pie(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a pie
Definition: MWAWGraphicShape.hxx:147
@ G_None
Definition: MWAWGraphicStyle.hxx:177
bool readPatterns(MWAWEntry const &entry)
read a pattern list block ( PAT# resource block )
Definition: GreatWksGraph.cxx:561
bool isGraphicZone()
return true if this corresponds to a graphic zone
Definition: GreatWksGraph.cxx:659
void setPage(int pg) const
sets the page
Definition: MWAWPosition.hxx:205
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:74
@ T_BASIC
Definition: GreatWksGraph.cxx:66
void print(std::ostream &o) const final
print funtion
Definition: GreatWksGraph.cxx:358
Frame()
constructor
Definition: GreatWksGraph.cxx:68
bool sendFrame(std::shared_ptr< GreatWksGraphInternal::Frame > frame, GreatWksGraphInternal::Zone const &zone)
try to send a frame
Definition: GreatWksGraph.cxx:2195
Type getType() const final
return the frame type
Definition: GreatWksGraph.cxx:185
float m_surfaceOpacity
true if the surface has some color
Definition: MWAWGraphicStyle.hxx:520
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType) final
the parser function
Definition: GreatWksGraph.cxx:488
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
Internal: a list of graphic corresponding to a page.
Definition: GreatWksGraph.cxx:424
FrameGroup(Frame const &frame)
constructor
Definition: GreatWksGraph.cxx:278
@ WBackground
Definition: MWAWPosition.hxx:53
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
the class to store a color
Definition: libmwaw_internal.hxx:192
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
the main class to read a GreatWorks text file
Definition: GreatWksParser.hxx:57
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:228
void setBackgroundColor(MWAWColor const &col, float opacity=1)
set the background color
Definition: MWAWGraphicStyle.hxx:447
void print(std::ostream &o) const final
print funtion
Definition: GreatWksGraph.cxx:325
int version() const
returns the file version
Definition: GreatWksGraph.cxx:527
bool getAverageColor(MWAWColor &col) const
return the average color
Definition: MWAWGraphicStyle.cxx:101
std::vector< std::shared_ptr< Frame > > m_frameList
the list of frame
Definition: GreatWksGraph.cxx:437
@ G_Linear
Definition: MWAWGraphicStyle.hxx:177
@ MWAW_K_DRAW
vectorized grphic
Definition: MWAWDocument.hxx:83
@ Graphic
Definition: MWAWListener.hxx:56
the main class to read a GreatWorks database file
Definition: GreatWksDBParser.hxx:62
Type
the frame type
Definition: GreatWksGraph.cxx:66
static MWAWPictData * get(MWAWInputStreamPtr const &input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
void sendGroupChild(GreatWksGraphInternal::FrameGroup const &group, GreatWksGraphInternal::Zone const &zone, MWAWPosition const &pos)
try to send a group elements by elemenys
Definition: GreatWksGraph.cxx:2045
FrameShape(Frame const &frame)
constructor
Definition: GreatWksGraph.cxx:199
GreatWksDocument & m_document
the document
Definition: GreatWksGraph.hxx:181
Internal: the basic shape of a GreatWksGraph.
Definition: GreatWksGraph.cxx:197
int m_page
the page number (if known)
Definition: GreatWksGraph.cxx:435
GreatWksGraph * m_graphParser
the graph parser
Definition: GreatWksGraph.cxx:481
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
Frame(Frame const &)=default
~FrameShape() final
destructor
Definition: GreatWksGraph.cxx:270
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
~SubDocument() final
destructor
Definition: GreatWksGraph.cxx:471
int m_numPages
Definition: GreatWksGraph.cxx:455
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
MWAWBox2f m_bdBox
the shape bdbox
Definition: MWAWGraphicShape.hxx:218
double getMarginLeft() const
returns the left margin
Definition: MWAWPageSpan.hxx:132
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: MWAWGraphicStyle.hxx:363
GreatWksGraph & operator=(GreatWksGraph const &orig)=delete
bool findGraphicZone()
try to find the beginning of the next graphic zone
Definition: GreatWksGraph.cxx:773
bool readPageFrames()
try to read a list of page frame ( picture, texture or basic )
Definition: GreatWksGraph.cxx:1181
float m_lineOpacity
the line opacity: 0=transparent
Definition: MWAWGraphicStyle.hxx:514
Internal: the text zone of a GreatWksGraph.
Definition: GreatWksGraph.cxx:341
bool m_flip[2]
two bool to know if we must flip x or y
Definition: GreatWksGraph.cxx:387
bool canSendTextboxAsGraphic(MWAWEntry const &entry)
check if a textbox can be send in a graphic zone, ie. does not contains any graphic
Definition: GreatWksDocument.cxx:146
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:277
MWAWVec2f const & size() const
returns the frame size
Definition: MWAWPosition.hxx:135
@ Polygon
Definition: MWAWGraphicShape.hxx:49
static MWAWGraphicShape polygon(MWAWBox2f const &box)
static constructor to create a polygon
Definition: MWAWGraphicShape.hxx:165
bool hasPattern() const
returns true if the pattern is defined
Definition: MWAWGraphicStyle.hxx:432
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: GreatWksGraph.cxx:503
MWAWBox2< T > getUnion(MWAWBox2< T > const &box) const
returns the union between this and box
Definition: libmwaw_internal.hxx:1129
MWAWEntry m_entry
the text entry
Definition: GreatWksGraph.cxx:385
@ T_UNSET
Definition: GreatWksGraph.cxx:66
@ Rectangle
Definition: MWAWGraphicShape.hxx:49
SubDocumentType
Definition: libmwaw_internal.hxx:188
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
Type getType() const final
return the frame type
Definition: GreatWksGraph.cxx:287
bool readPalettes(MWAWEntry const &entry)
read a list of color and maybe patterns ( PlTT resource block: v2 )
Definition: GreatWksGraph.cxx:604
MWAWColor m_surfaceColor
the surface color
Definition: MWAWGraphicStyle.hxx:518
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
double getMarginTop() const
returns the top margin
Definition: MWAWPageSpan.hxx:142
bool dumpFile(librevenge::RVNGBinaryData &data, char const *fileName)
a debug function to store in a datafile in the current directory WARNING: this function erase the fil...
Definition: MWAWDebug.cxx:193
friend std::ostream & operator<<(std::ostream &o, Frame const &zone)
operator<<
Definition: GreatWksGraph.cxx:89
MWAWGraphicStyle getStyle(MWAWGraphicStyle const &zoneStyle) const
return the text style
Definition: GreatWksGraph.cxx:368
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:508
void setSize(MWAWVec2f const &sz)
sets the frame size
Definition: MWAWPosition.hxx:215
std::vector< MWAWGraphicStyle > m_styleList
the list of style
Definition: GreatWksGraph.cxx:441
bool sendTextbox(GreatWksGraphInternal::FrameText const &text, GreatWksGraphInternal::Zone const &zone, MWAWPosition const &pos)
try to send a textbox
Definition: GreatWksGraph.cxx:1852
bool m_parsed
true if the frame is send
Definition: GreatWksGraph.cxx:168
bool readLineFormat(std::string &extra)
try to read a line format style? in v1
Definition: GreatWksGraph.cxx:1159
virtual Type getType() const
return the frame type
Definition: GreatWksGraph.cxx:84
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
int numPages() const
returns the number of pages
Definition: GreatWksGraph.cxx:533
a structure used to define the gradient limit in MWAWGraphicStyle
Definition: MWAWGraphicStyle.hxx:141
FramePicture(Frame const &frame)
constructor
Definition: GreatWksGraph.cxx:312
std::vector< MWAWVec2f > m_vertices
the list of vertices for lines or polygons
Definition: MWAWGraphicShape.hxx:226
bool m_flip[2]
two bool to indicated we need to flip the shape or not
Definition: MWAWGraphicStyle.hxx:560
#define M_PI
Definition: libmwaw_internal.hxx:52
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:358
bool getBinaryResult(MWAWEmbeddedObject &result)
return the final graphic
Definition: MWAWGraphicEncoder.cxx:77
Wrapping m_wrapping
Wrapping.
Definition: MWAWPosition.hxx:278
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
void print(std::ostream &o) const final
print funtion
Definition: GreatWksGraph.cxx:292
@ Path
Definition: MWAWGraphicShape.hxx:49
Type m_type
the type
Definition: MWAWGraphicShape.hxx:216
bool sendShape(GreatWksGraphInternal::FrameShape const &graph, GreatWksGraphInternal::Zone const &zone, MWAWPosition const &pos)
try to send a basic picture
Definition: GreatWksGraph.cxx:2177
Zone()
constructor
Definition: GreatWksGraph.cxx:426
FrameShape & operator=(FrameShape const &)=delete
int m_styleId
the style identifier
Definition: GreatWksGraph.cxx:154
bool readStyle(MWAWGraphicStyle &style)
try to read a zone style
Definition: GreatWksGraph.cxx:903
void setOrigin(MWAWVec2f const &orig)
sets the frame origin
Definition: MWAWPosition.hxx:210
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
MWAWEntry m_entry
the picture entry
Definition: GreatWksGraph.cxx:332
int m_rotate
the rotate angle
Definition: GreatWksGraph.cxx:389
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:553
int m_parent
the parent identifier
Definition: GreatWksGraph.cxx:156
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:426
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
bool readGraphicZone()
try to read the graphic zone ( draw file or end of v2 text file)
Definition: GreatWksGraph.cxx:696
virtual ~GreatWksGraph()
destructor
Definition: GreatWksGraph.cxx:524
Internal: the graphic zone of a GreatWksGraph.
Definition: GreatWksGraph.cxx:64
~FrameDBField() final
destructor
Definition: GreatWksGraph.cxx:418
int m_order
the z order
Definition: GreatWksGraph.cxx:158
SubDocument & operator=(SubDocument const &orig)=delete
@ T_DBFIELD
Definition: GreatWksGraph.cxx:66
Internal: the picture zone of a GreatWksGraph.
Definition: GreatWksGraph.cxx:310
@ G_Axial
Definition: MWAWGraphicStyle.hxx:177
~FramePicture() final
destructor
Definition: GreatWksGraph.cxx:335
static MWAWGraphicShape arc(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a arc
Definition: MWAWGraphicShape.hxx:137
int m_lineArrow
the line arrow style (in v1)
Definition: GreatWksGraph.cxx:262
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:361
int m_type
the zone type
Definition: GreatWksGraph.cxx:152
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:516
int m_numChild
the number of child
Definition: GreatWksGraph.cxx:299
main class used to define store librevenge::RVNGDrawingInterface lists of command in a librevenge::RV...
Definition: MWAWGraphicEncoder.hxx:56
bool m_parsed
true if we have send the data
Definition: GreatWksGraph.cxx:443
@ Line
Definition: MWAWGraphicShape.hxx:49
bool readFrameExtraData(GreatWksGraphInternal::Frame &frame, int id, long endPos=-1)
try to read a frame extra data zone
Definition: GreatWksGraph.cxx:1692
@ T_TEXT
Definition: GreatWksGraph.cxx:66
the main class to read/store generic data of a GreatWorks document
Definition: GreatWksDocument.hxx:61
bool sendPicture(MWAWEntry const &entry, MWAWPosition pos)
try to send a picture
Definition: GreatWksGraph.cxx:1919
virtual class which defines the ancestor of all main zone parser
Definition: MWAWParser.hxx:100
the main class to read a GreatWorks graphic file
Definition: GreatWksDRParser.hxx:56
Internal: the subdocument of a GreatWksGraph.
Definition: GreatWksGraph.cxx:462
FrameDBField(Frame const &frame)
constructor
Definition: GreatWksGraph.cxx:400
std::string m_extra
extra data
Definition: GreatWksGraph.cxx:166
SubDocument(SubDocument const &orig)=delete
Type getType() const final
return the frame type
Definition: GreatWksGraph.cxx:209
static MWAWGraphicShape path(MWAWBox2f const &box)
static constructor to create a path
Definition: MWAWGraphicShape.hxx:173
std::vector< int > m_rootList
the list of root id
Definition: GreatWksGraph.cxx:439
Gradient m_gradient
the gradient
Definition: MWAWGraphicStyle.hxx:533
bool sendPageGraphics()
try to send the page graphic
Definition: GreatWksGraph.cxx:2259
@ Page
Definition: MWAWPosition.hxx:51
@ T_GROUP
Definition: GreatWksGraph.cxx:66
bool isPageFrames()
check if a zone is or not a page frame zone
Definition: GreatWksGraph.cxx:843
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
bool hasGradient(bool complex=false) const
returns true if the gradient is defined
Definition: MWAWGraphicStyle.hxx:437
Internal: the structures of a GreatWksGraph.
Definition: GreatWksGraph.cxx:61
bool sendGroup(GreatWksGraphInternal::FrameGroup const &group, GreatWksGraphInternal::Zone const &zone, MWAWPosition const &pos)
try to send a group
Definition: GreatWksGraph.cxx:1960
bool readFrameExtraDataRec(GreatWksGraphInternal::Zone &zone, int id, std::set< int > &seens, long endPos=-1)
try to read a frame extra data zone recursively ( draw method)
Definition: GreatWksGraph.cxx:1461
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
std::vector< float > m_lineDashWidth
the dash array: a sequence of (fullsize, emptysize)
Definition: MWAWGraphicStyle.hxx:506
MWAWVec2f const & origin() const
return the frame origin
Definition: MWAWPosition.hxx:130
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
MWAWGraphicShape m_shape
the shape
Definition: GreatWksGraph.cxx:260
MWAWParser * m_mainParser
the main parser;
Definition: GreatWksGraph.hxx:187
std::shared_ptr< GreatWksGraphInternal::Frame > readFrameHeader()
try to read a basic frame header
Definition: GreatWksGraph.cxx:1501
bool sendTextboxAsGraphic(MWAWBox2f const &box, GreatWksGraphInternal::FrameText const &text, MWAWGraphicStyle const &style, MWAWListenerPtr listener)
try to send a textbox via a graphiclistener
Definition: GreatWksGraph.cxx:1893
MWAWParserStatePtr m_parserState
the parser state
Definition: GreatWksGraph.hxx:183
void print(std::ostream &o) const final
print function
Definition: GreatWksGraph.cxx:214
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
virtual void print(std::ostream &o) const
a virtual print function
Definition: GreatWksGraph.cxx:95
bool canCreateGraphic(GreatWksGraphInternal::FrameGroup const &group, GreatWksGraphInternal::Zone const &zone)
check if we can send a group as graphic
Definition: GreatWksGraph.cxx:1966
std::vector< Zone > m_zoneList
the list of zone ( one by page)
Definition: GreatWksGraph.cxx:454
GreatWksGraph(GreatWksGraph const &orig)=delete
long m_dataSize
the data size ( if know)
Definition: GreatWksGraph.cxx:160
@ Circle
Definition: MWAWGraphicShape.hxx:49
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:270
std::vector< int > m_childList
the list of child
Definition: GreatWksGraph.cxx:301
float m_rotate
the rotation
Definition: MWAWGraphicStyle.hxx:544
the main class to read the graphic part of a HanMac Word-J file
Definition: GreatWksGraph.hxx:76
SubDocument(GreatWksGraph &pars, MWAWInputStreamPtr const &input, MWAWEntry const &entry)
constructor
Definition: GreatWksGraph.cxx:465
void flushExtra()
sends the data which have not yet been sent to the listener
Definition: GreatWksGraph.cxx:2274
a simple path component
Definition: MWAWGraphicShape.hxx:53
@ G_Radial
Definition: MWAWGraphicStyle.hxx:177
FrameBad()
constructor
Definition: GreatWksGraph.cxx:179
static MWAWGraphicShape rectangle(MWAWBox2f const &box, MWAWVec2f const &corners=MWAWVec2f(0, 0))
static constructor to create a rectangle
Definition: MWAWGraphicShape.hxx:120
Type getType() const final
return the frame type
Definition: GreatWksGraph.cxx:407
bool checkGraph(GreatWksGraphInternal::Zone &zone, int id, std::set< int > &seens)
check if the graph of zones is ok (ie. does not form loop)
Definition: GreatWksGraph.cxx:1436
FrameText(Frame const &frame)
constructor
Definition: GreatWksGraph.cxx:343
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
Internal: the DBField zone of a GreatWksGraph.
Definition: GreatWksGraph.cxx:398
State()
constructor
Definition: GreatWksGraph.cxx:450
std::vector< Stop > m_stopList
the list of gradient limits
Definition: MWAWGraphicStyle.hxx:262
This class contains the code needed to create Graphic document.
Definition: MWAWGraphicListener.hxx:60
MWAWBox2f m_formBox
the internal shape bdbox ( used for arc, circle to store the circle bdbox )
Definition: MWAWGraphicShape.hxx:220
~FrameText() final
destructor
Definition: GreatWksGraph.cxx:392
a structure used to define an arrow
Definition: MWAWGraphicStyle.hxx:56
bool hasTransform() const
return true if the has some transforms.
Definition: GreatWksGraph.cxx:380
bool sendTextbox(MWAWEntry const &entry, MWAWListenerPtr listener)
try to send textbox
Definition: GreatWksDocument.cxx:137
the main class to read a GreatWorks spreadsheet file
Definition: GreatWksSSParser.hxx:59
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20