Go to the documentation of this file.
34 #ifndef BEAGLE_WKS_DR_PARSER
35 # define BEAGLE_WKS_DR_PARSER
40 #include <librevenge/librevenge.h>
int m_headerHeight
the header height if known
Definition: BeagleWksDRParser.cxx:189
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:167
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
MWAWVec2f m_dim
the dimension
Definition: BeagleWksStructManager.hxx:139
void setFont(int newId)
sets the font id and resets size to the previous size for this font
Definition: MWAWFont.hxx:252
int m_numPages
the number of page of the final document
Definition: BeagleWksDRParser.cxx:187
long m_shapesBegin[2]
the shape definitions and the unknown
Definition: BeagleWksDRParser.cxx:176
std::shared_ptr< MWAWGraphicListener > MWAWGraphicListenerPtr
a smart pointer of MWAWGraphicListener
Definition: libmwaw_internal.hxx:549
bool sendFrame(BeagleWksStructManager::Frame const &frame)
try to send a frame
Definition: BeagleWksDRParser.cxx:1368
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
void setPagePos(int pg, MWAWVec2f const &newOrig) const
sets/resets the page and the origin
Definition: MWAWPosition.hxx:230
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWFont m_font
the textbox font
Definition: BeagleWksDRParser.cxx:97
std::vector< MWAWColor > m_colorList
the colors list
Definition: BeagleWksDRParser.cxx:180
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
int m_actPage
the actual page
Definition: BeagleWksDRParser.cxx:187
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
MWAWGraphicListenerPtr & getGraphicListener()
returns the graphic listener
Definition: MWAWParser.hxx:130
Internal: the subdocument of a BeagleWksDRParser.
Definition: BeagleWksDRParser.cxx:196
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:415
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:121
static MWAWGraphicShape pie(MWAWBox2f const &box, MWAWBox2f const &circleBox, MWAWVec2f const &angles)
static constructor to create a pie
Definition: MWAWGraphicShape.hxx:147
MWAWBorder m_border
the border
Definition: BeagleWksStructManager.hxx:145
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: BeagleWksDRParser.cxx:206
void setPage(int pg) const
sets the page
Definition: MWAWPosition.hxx:205
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:74
@ boldBit
Definition: MWAWFont.hxx:190
Internal: the shape of BeagleWksDRParser.
Definition: BeagleWksDRParser.cxx:62
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
~BeagleWksDRParser() final
destructor
Definition: BeagleWksDRParser.cxx:254
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
int id() const
returns the id
Definition: MWAWEntry.hxx:164
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
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
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:228
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
double m_interline
the interline in percent
Definition: BeagleWksDRParser.cxx:101
MWAWVec2f m_origin
the origin ( for a page frame )
Definition: BeagleWksStructManager.hxx:137
bool sendPicture(int pId, MWAWPosition const &pos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
try to send a picture
Definition: BeagleWksDRParser.cxx:1383
bool createZones()
finds the different objects zones
Definition: BeagleWksDRParser.cxx:369
std::shared_ptr< BeagleWksDRParserInternal::State > m_state
the state
Definition: BeagleWksDRParser.hxx:147
@ MWAW_K_DRAW
vectorized grphic
Definition: MWAWDocument.hxx:83
int m_page
the page ( for a page frame )
Definition: BeagleWksStructManager.hxx:141
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
@ WDynamic
Definition: MWAWPosition.hxx:53
void init()
inits all internal variables
Definition: BeagleWksDRParser.cxx:258
SubDocument & operator=(SubDocument const &orig)=delete
@ Simple
Definition: MWAWFont.hxx:49
static MWAWPictData * get(MWAWInputStreamPtr const &input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
bool readPrintInfo()
read the print info zone
Definition: BeagleWksDRParser.cxx:1190
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:363
int m_numShapes[2]
the number of shapes: positions and definitions
Definition: BeagleWksDRParser.cxx:184
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: BeagleWksDRParser.cxx:1417
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
@ embossBit
Definition: MWAWFont.hxx:190
void createDocument(librevenge::RVNGDrawingInterface *documentInterface)
creates the listener which will be associated to the document
Definition: BeagleWksDRParser.cxx:338
static MWAWGraphicShape circle(MWAWBox2f const &box)
static constructor to create a circle
Definition: MWAWGraphicShape.hxx:129
Defines MWAWCell (cell content and format)
int m_id
the subdocument id
Definition: BeagleWksDRParser.cxx:220
std::string m_extra
extra data
Definition: BeagleWksDRParser.cxx:104
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:277
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
static MWAWGraphicShape polygon(MWAWBox2f const &box)
static constructor to create a polygon
Definition: MWAWGraphicShape.hxx:165
the main class to read the structure shared between different BeagleWorks files
Definition: BeagleWksStructManager.hxx:57
SubDocumentType
Definition: libmwaw_internal.hxx:188
bool readArrows()
try to read the arrows zone (unknown format)
Definition: BeagleWksDRParser.cxx:703
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
std::vector< Shape > m_shapeList
the list of shapes
Definition: BeagleWksDRParser.cxx:186
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
Internal: a structure use to store a frame in a BeagleWorks files.
Definition: BeagleWksStructManager.hxx:102
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
MWAWVec2f getPageLeftTop() const
returns the page left top point ( in inches)
Definition: BeagleWksDRParser.cxx:283
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:401
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: BeagleWksDRParser.cxx:226
bool sendPageFrames()
try to send the page graphic
Definition: BeagleWksDRParser.cxx:1360
Justification
an enum used to defined the paragraph justification: left, center, right, full ...
Definition: MWAWParagraph.hxx:90
@ shadowBit
Definition: MWAWFont.hxx:191
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:132
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:572
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
T y() const
second element
Definition: libmwaw_internal.hxx:673
MWAWRSRCParserPtr & getRSRCParser()
returns the rsrc parser
Definition: MWAWParser.hxx:190
Internal: the state of a BeagleWksDRParser.
Definition: BeagleWksDRParser.cxx:156
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:508
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
T x() const
first element
Definition: libmwaw_internal.hxx:668
bool readGraphicHeader()
try to read the graphic header
Definition: BeagleWksDRParser.cxx:513
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
BeagleWksDRParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: BeagleWksDRParser.cxx:246
std::shared_ptr< BeagleWksStructManager > m_structureManager
the structure manager
Definition: BeagleWksDRParser.hxx:150
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
bool m_flip[2]
two bool to indicated we need to flip the shape or not
Definition: MWAWGraphicStyle.hxx:560
void setGraphicListener(MWAWGraphicListenerPtr &listener)
sets the graphic listener
Definition: MWAWParser.cxx:125
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
#define M_PI
Definition: libmwaw_internal.hxx:52
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:358
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
Wrapping m_wrapping
Wrapping.
Definition: MWAWPosition.hxx:278
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
void setBorders(int wh, MWAWBorder const &border)
sets the cell border: wh=libmwaw::LeftBit|...
Definition: MWAWGraphicStyle.cxx:232
@ PageBreak
Definition: MWAWListener.hxx:58
bool readShapePositions()
try to read the shape position
Definition: BeagleWksDRParser.cxx:758
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
Definition: libmwaw_internal.hxx:144
long m_dataSize
the data size
Definition: BeagleWksDRParser.cxx:90
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
int m_pictId
the picture id
Definition: BeagleWksStructManager.hxx:135
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:553
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:426
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:1193
State()
constructor
Definition: BeagleWksDRParser.cxx:158
std::vector< MWAWGraphicStyle::Pattern > m_patternList
the pattern list
Definition: BeagleWksDRParser.cxx:182
~SubDocument() final
destructor
Definition: BeagleWksDRParser.cxx:203
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
long m_graphicBegin
the graphic begin position
Definition: BeagleWksDRParser.cxx:174
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
MWAWVec2f m_cornerWidth
the rectangle round corner
Definition: MWAWGraphicShape.hxx:222
bool readRSRCZones()
read the resource fork zone
Definition: BeagleWksDRParser.cxx:475
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
friend std::ostream & operator<<(std::ostream &o, Shape const &shape)
operator<<
Definition: BeagleWksDRParser.cxx:107
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:516
SubDocument(SubDocument const &orig)=delete
bool readShapeDefinitions()
try to read the shape definition
Definition: BeagleWksDRParser.cxx:797
bool readShapeDatas()
try to read the shape data
Definition: BeagleWksDRParser.cxx:886
MWAWVec2< T > center() const
the box center
Definition: libmwaw_internal.hxx:1072
@ italicBit
Definition: MWAWFont.hxx:190
Internal: the structures of a BeagleWksDRParser.
Definition: BeagleWksDRParser.cxx:60
MWAWGraphicStyle m_style
the style
Definition: BeagleWksDRParser.cxx:95
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
SubDocument(BeagleWksDRParser &pars, MWAWInputStreamPtr &input, int zoneId)
Definition: BeagleWksDRParser.cxx:198
bool readStyle(BeagleWksDRParserInternal::Shape &shape)
try to read a style of a shape
Definition: BeagleWksDRParser.cxx:967
int m_wrap
the wrapping: 0=none, 1=rectangle, 2=irregular
Definition: BeagleWksStructManager.hxx:143
@ 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:190
@ JustificationRight
Definition: MWAWParagraph.hxx:91
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 setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
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
std::multimap< std::string, MWAWEntry > m_typeEntryMap
the type entry map
Definition: BeagleWksDRParser.cxx:178
void newPage(int number)
adds a new page
Definition: BeagleWksDRParser.cxx:292
namespace used to regroup all libwpd functions, enumerations which we have redefined for internal usa...
Definition: libmwaw_internal.cxx:51
Shape()
constructor
Definition: BeagleWksDRParser.cxx:64
void parse(librevenge::RVNGDrawingInterface *documentInterface) final
virtual function used to parse the input
Definition: BeagleWksDRParser.cxx:308
libmwaw::DebugFile & rsrcAscii()
a DebugFile used to write what we recognize when we parse the document in rsrc
Definition: BeagleWksDRParser.cxx:275
MWAWInputStreamPtr rsrcInput()
return the input input
Definition: BeagleWksDRParser.cxx:270
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
bool readPatterns()
try to read the pattern zone
Definition: BeagleWksDRParser.cxx:639
@ WNone
Definition: MWAWPosition.hxx:53
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:270
Definition: MWAWDocument.hxx:57
float m_rotate
the rotation
Definition: MWAWGraphicStyle.hxx:544
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
Class to store font.
Definition: MWAWFont.hxx:44
MWAWBox2f m_box
the shape bdbox
Definition: BeagleWksDRParser.cxx:83
static MWAWGraphicShape rectangle(MWAWBox2f const &box, MWAWVec2f const &corners=MWAWVec2f(0, 0))
static constructor to create a rectangle
Definition: MWAWGraphicShape.hxx:120
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
int m_bordersSet
the list of border which are set in form libmwaw::LeftBit|...
Definition: BeagleWksStructManager.hxx:147
bool sendPictures()
try to send the different pictures
Definition: BeagleWksDRParser.cxx:1246
void setUnderlineStyle(Line::Style style=Line::None, bool doReset=true)
sets the underline style ( by default, we also reset the style)
Definition: MWAWFont.hxx:466
void resetGraphicListener()
resets the listener
Definition: MWAWParser.cxx:130
std::ostream & operator<<(std::ostream &o, Shape const &shape)
Definition: BeagleWksDRParser.cxx:107
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
bool sendText(int id)
try to send a text box content
Definition: BeagleWksDRParser.cxx:1312
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:325
MWAWGraphicShape m_shape
the graphic shape ( for line, rect, ...)
Definition: BeagleWksDRParser.cxx:86
MWAWParagraph::Justification m_justify
the textbox justification
Definition: BeagleWksDRParser.cxx:99
MWAWEntry m_entry
the textbox or picture entry
Definition: BeagleWksDRParser.cxx:88
int m_type
the shape type
Definition: BeagleWksDRParser.cxx:81
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20