Go to the documentation of this file.
34 #ifndef BEAGLE_WKS_DR_PARSER
35 # define BEAGLE_WKS_DR_PARSER
40 #include <librevenge/librevenge.h>
74 void parse(librevenge::RVNGDrawingInterface *documentInterface);
81 void createDocument(librevenge::RVNGDrawingInterface *documentInterface);
147 shared_ptr<BeagleWksDRParserInternal::State>
m_state;
int m_headerHeight
the header height if known
Definition: BeagleWksDRParser.cxx:172
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:161
bool getUniqueColor(MWAWColor &col) const
check if the pattern has only one color; if so returns true...
Definition: MWAWGraphicStyle.cxx:86
virtual ~SubDocument()
destructor
Definition: BeagleWksDRParser.cxx:184
BeagleWksDRParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: BeagleWksDRParser.cxx:232
MWAWVec2f m_dim
the dimension
Definition: BeagleWksStructManager.hxx:130
void setFont(int newId)
sets the font id and resets size to the previous size for this font
Definition: MWAWFont.hxx:231
int m_numPages
the number of page of the final document
Definition: BeagleWksDRParser.cxx:170
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: BeagleWksDRParser.cxx:1404
long m_shapesBegin[2]
the shape definitions and the unknown
Definition: BeagleWksDRParser.cxx:159
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type)
the parser function
Definition: BeagleWksDRParser.cxx:212
bool sendFrame(BeagleWksStructManager::Frame const &frame)
try to send a frame
Definition: BeagleWksDRParser.cxx:1355
SubDocument(BeagleWksDRParser &pars, MWAWInputStreamPtr input, int zoneId)
Definition: BeagleWksDRParser.cxx:181
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:262
void setPagePos(int pg, MWAWVec2f const &newOrig) const
sets/resets the page and the origin
Definition: MWAWPosition.hxx:214
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
MWAWFont m_font
the textbox font
Definition: BeagleWksDRParser.cxx:88
std::vector< MWAWColor > m_colorList
the colors list
Definition: BeagleWksDRParser.cxx:163
SubDocument & operator=(SubDocument const &orig)
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
int m_actPage
the actual page
Definition: BeagleWksDRParser.cxx:170
MWAWBox2f rotateBoxFromCenter(MWAWBox2f const &box, float angle)
rotate a bdox and returns the final bdbox, angle is given in degree
Definition: libmwaw_internal.cxx:697
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MWAWGraphicListenerPtr & getGraphicListener()
returns the graphic listener
Definition: MWAWParser.hxx:130
Internal: the subdocument of a BeagleWksDRParser.
Definition: BeagleWksDRParser.cxx:179
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:282
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:221
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:110
static MWAWGraphicShape pie(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a pie
Definition: MWAWGraphicShape.hxx:130
MWAWBorder m_border
the border
Definition: BeagleWksStructManager.hxx:136
void setPage(int pg) const
sets the page
Definition: MWAWPosition.hxx:189
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:69
@ boldBit
Definition: MWAWFont.hxx:182
Internal: the shape of BeagleWksDRParser.
Definition: BeagleWksDRParser.cxx:62
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:231
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:320
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:123
int id() const
returns the id
Definition: MWAWEntry.hxx:153
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:202
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
the class to store a color
Definition: libmwaw_internal.hxx:182
small class use to define a embedded object
Definition: libmwaw_internal.hxx:425
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:227
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:126
double m_interline
the interline in percent
Definition: BeagleWksDRParser.cxx:92
MWAWVec2f m_origin
the origin ( for a page frame )
Definition: BeagleWksStructManager.hxx:128
bool sendPicture(int pId, MWAWPosition const &pos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
try to send a picture
Definition: BeagleWksDRParser.cxx:1370
bool getAverageColor(MWAWColor &col) const
return the average color
Definition: MWAWGraphicStyle.cxx:101
bool createZones()
finds the different objects zones
Definition: BeagleWksDRParser.cxx:353
@ MWAW_K_DRAW
vectorized grphic
Definition: MWAWDocument.hxx:83
int m_page
the page ( for a page frame )
Definition: BeagleWksStructManager.hxx:132
class to store the paragraph properties
Definition: MWAWParagraph.hxx:82
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:187
@ WDynamic
Definition: MWAWPosition.hxx:53
void init()
inits all internal variables
Definition: BeagleWksDRParser.cxx:242
@ Simple
Definition: MWAWFont.hxx:49
virtual bool operator==(MWAWSubDocument const &doc) const
operator!==
Definition: BeagleWksDRParser.cxx:197
bool readPrintInfo()
read the print info zone
Definition: BeagleWksDRParser.cxx:1177
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
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:247
int m_numShapes[2]
the number of shapes: positions and definitions
Definition: BeagleWksDRParser.cxx:167
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
@ embossBit
Definition: MWAWFont.hxx:182
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: BeagleWksDRParser.cxx:322
static MWAWGraphicShape circle(MWAWBox2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:112
int m_id
the subdocument id
Definition: BeagleWksDRParser.cxx:206
std::string m_extra
extra data
Definition: BeagleWksDRParser.cxx:95
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:171
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:172
shared_ptr< BeagleWksStructManager > m_structureManager
the structure manager
Definition: BeagleWksDRParser.hxx:150
static MWAWGraphicShape polygon(MWAWBox2f const &box)
static constructor to create a polygon
Definition: MWAWGraphicShape.hxx:140
the main class to read the structure shared between different BeagleWorks files
Definition: BeagleWksStructManager.hxx:57
virtual ~BeagleWksDRParser()
destructor
Definition: BeagleWksDRParser.cxx:238
SubDocumentType
Definition: libmwaw_internal.hxx:178
bool readArrows()
try to read the arrows zone (unknown format)
Definition: BeagleWksDRParser.cxx:689
std::vector< Shape > m_shapeList
the list of shapes
Definition: BeagleWksDRParser.cxx:169
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:85
Internal: a structure use to store a frame in a BeagleWorks files.
Definition: BeagleWksStructManager.hxx:102
@ JustificationCenter
Definition: MWAWParagraph.hxx:87
MWAWVec2f getPageLeftTop() const
returns the page left top point ( in inches)
Definition: BeagleWksDRParser.cxx:267
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:268
bool sendPageFrames()
try to send the page graphic
Definition: BeagleWksDRParser.cxx:1346
Justification
an enum used to defined the paragraph justification: left, center, right, full ...
Definition: MWAWParagraph.hxx:87
@ shadowBit
Definition: MWAWFont.hxx:183
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:121
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
bool readColors()
try to read the colors zone
Definition: BeagleWksDRParser.cxx:558
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:105
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
T y() const
second element
Definition: libmwaw_internal.hxx:620
MWAWRSRCParserPtr & getRSRCParser()
returns the rsrc parser
Definition: MWAWParser.hxx:190
shared_ptr< MWAWGraphicListener > MWAWGraphicListenerPtr
a smart pointer of MWAWGraphicListener
Definition: libmwaw_internal.hxx:501
Internal: the state of a BeagleWksDRParser.
Definition: BeagleWksDRParser.cxx:147
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:375
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:177
T x() const
first element
Definition: libmwaw_internal.hxx:615
bool readGraphicHeader()
try to read the graphic header
Definition: BeagleWksDRParser.cxx:499
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
@ MWAW_T_BEAGLEWORKS
BeagleWorks (v1.0)/WordPerfect Works (v1.2): export database(as spreadsheet), draw,...
Definition: MWAWDocument.hxx:103
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
std::vector< MWAWVec2f > m_vertices
the list of vertices for lines or polygons
Definition: MWAWGraphicShape.hxx:201
bool m_flip[2]
two bool to indicated we need to flip the shape or not
Definition: MWAWGraphicStyle.hxx:437
void setGraphicListener(MWAWGraphicListenerPtr &listener)
sets the graphic listener
Definition: MWAWParser.cxx:113
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
#define M_PI
Definition: libmwaw_internal.hxx:49
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:242
Wrapping m_wrapping
Wrapping.
Definition: MWAWPosition.hxx:262
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
void setBorders(int wh, MWAWBorder const &border)
sets the cell border: wh=libmwaw::LeftBit|...
Definition: MWAWGraphicStyle.cxx:172
@ PageBreak
Definition: MWAWListener.hxx:58
bool readShapePositions()
try to read the shape position
Definition: BeagleWksDRParser.cxx:744
Definition: libmwaw_internal.hxx:142
long m_dataSize
the data size
Definition: BeagleWksDRParser.cxx:81
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:61
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
int m_pictId
the picture id
Definition: BeagleWksStructManager.hxx:126
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:430
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:293
virtual class which defines the ancestor of all graphic zone parser
Definition: MWAWParser.hxx:251
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1134
State()
constructor
Definition: BeagleWksDRParser.cxx:149
std::vector< MWAWGraphicStyle::Pattern > m_patternList
the pattern list
Definition: BeagleWksDRParser.cxx:165
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
SubDocument(SubDocument const &orig)
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:158
long m_graphicBegin
the graphic begin position
Definition: BeagleWksDRParser.cxx:157
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:197
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:218
MWAWVec2f m_cornerWidth
the rectangle round corner
Definition: MWAWGraphicShape.hxx:197
bool readRSRCZones()
read the resource fork zone
Definition: BeagleWksDRParser.cxx:460
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:245
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
friend std::ostream & operator<<(std::ostream &o, Shape const &shape)
operator<<
Definition: BeagleWksDRParser.cxx:98
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
long end() const
returns the end offset
Definition: MWAWEntry.hxx:77
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:254
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:383
bool readShapeDefinitions()
try to read the shape definition
Definition: BeagleWksDRParser.cxx:783
bool readShapeDatas()
try to read the shape data
Definition: BeagleWksDRParser.cxx:872
MWAWVec2< T > center() const
the box center
Definition: libmwaw_internal.hxx:1013
@ italicBit
Definition: MWAWFont.hxx:182
Internal: the structures of a BeagleWksDRParser.
Definition: BeagleWksDRParser.cxx:60
MWAWGraphicStyle m_style
the style
Definition: BeagleWksDRParser.cxx:86
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
bool readStyle(BeagleWksDRParserInternal::Shape &shape)
try to read a style of a shape
Definition: BeagleWksDRParser.cxx:954
int m_wrap
the wrapping: 0=none, 1=rectangle, 2=irregular
Definition: BeagleWksStructManager.hxx:134
@ Page
Definition: MWAWPosition.hxx:51
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
int m_footerHeight
the footer height if known
Definition: BeagleWksDRParser.cxx:173
void parse(librevenge::RVNGDrawingInterface *documentInterface)
virtual function used to parse the input
Definition: BeagleWksDRParser.cxx:292
@ JustificationRight
Definition: MWAWParagraph.hxx:88
the main class to read a BeagleWorks drawing file
Definition: BeagleWksDRParser.hxx:62
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
void setStream(MWAWInputStreamPtr ip)
resets the input
Definition: MWAWDebug.hxx:73
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:192
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:88
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:513
shared_ptr< BeagleWksDRParserInternal::State > m_state
the state
Definition: BeagleWksDRParser.hxx:147
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1008
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
std::multimap< std::string, MWAWEntry > m_typeEntryMap
the type entry map
Definition: BeagleWksDRParser.cxx:161
void newPage(int number)
adds a new page
Definition: BeagleWksDRParser.cxx:276
Shape()
constructor
Definition: BeagleWksDRParser.cxx:64
libmwaw::DebugFile & rsrcAscii()
a DebugFile used to write what we recognize when we parse the document in rsrc
Definition: BeagleWksDRParser.cxx:259
MWAWInputStreamPtr rsrcInput()
return the input input
Definition: BeagleWksDRParser.cxx:254
bool readPatterns()
try to read the pattern zone
Definition: BeagleWksDRParser.cxx:625
@ WNone
Definition: MWAWPosition.hxx:53
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:254
float m_rotate
the rotation
Definition: MWAWGraphicStyle.hxx:421
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:207
Class to store font.
Definition: MWAWFont.hxx:44
MWAWBox2f m_box
the shape bdbox
Definition: BeagleWksDRParser.cxx:74
static MWAWGraphicShape rectangle(MWAWBox2f const &box, MWAWVec2f const &corners=MWAWVec2f(0, 0))
static constructor to create a rectangle
Definition: MWAWGraphicShape.hxx:103
virtual bool operator!=(MWAWSubDocument const &doc) const
operator!=
Definition: BeagleWksDRParser.cxx:187
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:505
int m_bordersSet
the list of border which are set in form libmwaw::LeftBit|...
Definition: BeagleWksStructManager.hxx:138
bool sendPictures()
try to send the different pictures
Definition: BeagleWksDRParser.cxx:1233
static MWAWPictData * get(MWAWInputStreamPtr input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:445
void resetGraphicListener()
resets the listener
Definition: MWAWParser.cxx:118
std::ostream & operator<<(std::ostream &o, Shape const &shape)
Definition: BeagleWksDRParser.cxx:98
shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:96
bool sendText(int id)
try to send a text box content
Definition: BeagleWksDRParser.cxx:1298
This class contains the code needed to create Graphic document.
Definition: MWAWGraphicListener.hxx:60
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
MWAWGraphicShape m_shape
the graphic shape ( for line, rect, ...)
Definition: BeagleWksDRParser.cxx:77
MWAWParagraph::Justification m_justify
the textbox justification
Definition: BeagleWksDRParser.cxx:90
MWAWEntry m_entry
the textbox or picture entry
Definition: BeagleWksDRParser.cxx:79
int m_type
the shape type
Definition: BeagleWksDRParser.cxx:72
Generated on Wed Jun 17 2020 06:30:08 for libmwaw by
doxygen 1.8.18