Go to the documentation of this file.
34 #ifndef RAG_TIME_PARSER
35 # define RAG_TIME_PARSER
std::shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:565
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
int m_actualZoneId
the actual zone id
Definition: RagTimeParser.cxx:303
bool sendPicture(int zId, MWAWPosition const &pos)
sends the picture
Definition: RagTimeParser.cxx:2393
bool findDataZones()
try to create the main data zones list
Definition: RagTimeParser.cxx:707
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:549
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:298
RagTimeParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: RagTimeParser.cxx:389
std::multimap< std::string, MWAWEntry > m_RSRCZoneMap
a map: type->entry (resource fork)
Definition: RagTimeParser.cxx:297
Definition: RagTimeParser.cxx:131
MWAWColor m_fontColor
the font color (for text)
Definition: RagTimeParser.cxx:207
bool getDateTimeFormat(int dtId, std::string &dtFormat) const
returns the ith date format or ""
Definition: RagTimeParser.cxx:461
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:266
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: RagTimeParser.cxx:524
bool readMacroFormats(MWAWEntry &entry)
try to read the macro format zone: RTml zones
Definition: RagTimeParser.cxx:1941
bool read(MWAWInputStreamPtr input, MWAWEntry &entry)
try to read the header block
Definition: RagTimeStruct.cxx:42
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
std::string m_extra
extra data
Definition: RagTimeParser.cxx:217
bool sendBasicPicture(int zId, MWAWPosition const &pos)
sends a basic shape
Definition: RagTimeParser.cxx:2545
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:840
Pattern m_pattern
the pattern if it exists
Definition: MWAWGraphicStyle.hxx:439
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
bool readPageZone(MWAWEntry &entry)
try to read page zone ( unknown content of size 40).
Definition: RagTimeParser.cxx:1705
Pattern(uint16_t const *pat=nullptr)
constructor ( 4 int by patterns )
Definition: RagTimeParser.cxx:68
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: RagTimeParser.cxx:2314
void setShadowColor(MWAWColor const &col, float opacity=1)
set the shadow color
Definition: MWAWGraphicStyle.hxx:365
std::shared_ptr< RagTimeParserInternal::State > m_state
the state
Definition: RagTimeParser.hxx:198
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:120
friend class RagTimeText
Definition: RagTimeParser.hxx:63
static std::string getName(Type type)
returns a string corresponding to a type
Definition: RagTimeStruct.hxx:75
int getNewZoneId()
returns a new unique zone id
Definition: RagTimeParser.cxx:451
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:76
void flushExtra()
flush unsent zone (debugging function)
Definition: RagTimeParser.cxx:2652
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:64
bool getCharStyle(int charId, MWAWFont &font) const
returns font style corresponding to a char style id
Definition: RagTimeParser.cxx:421
bool readPrintInfo(MWAWEntry &entry, bool inRSRCFork=false)
read a printInfo block (a PREC rsrc)
Definition: RagTimeParser.cxx:1538
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: RagTimeParser.cxx:359
int id() const
returns the id
Definition: MWAWEntry.hxx:163
Definition: MWAWPosition.hxx:53
Definition: RagTimeParser.cxx:131
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:206
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:45
void newPage(int number)
adds a new page
Definition: RagTimeParser.cxx:474
the class to store a color
Definition: libmwaw_internal.hxx:192
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
std::shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:563
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:228
int version() const
returns the works version
Definition: MWAWParser.hxx:108
void setBackgroundColor(MWAWColor const &col, float opacity=1)
set the background color
Definition: MWAWGraphicStyle.hxx:354
bool readColorMapV2(MWAWEntry &entry)
try to read the color map:v2
Definition: RagTimeParser.cxx:1442
bool createZones()
finds the different objects zones
Definition: RagTimeParser.cxx:561
Zone()
constructor
Definition: RagTimeParser.cxx:133
Type m_type
the zone type
Definition: RagTimeParser.cxx:193
bool getAverageColor(MWAWColor &col) const
return the average color
Definition: MWAWGraphicStyle.cxx:101
int m_subType
the zone sub type
Definition: RagTimeParser.cxx:195
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:191
bool readRsrcfppr(MWAWEntry &entry)
try to read the fppr zone (zone with id=0)
Definition: RagTimeParser.cxx:2183
static MWAWPictData * get(MWAWInputStreamPtr const &input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
double m_width
the border total width in point
Definition: libmwaw_internal.hxx:387
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
Internal: a picture of a RagTimeParser.
Definition: RagTimeParser.cxx:105
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:125
bool getBinary(MWAWEmbeddedObject &picture) const override
returns the final picture
Definition: MWAWPictBitmap.hxx:225
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
int m_type
the picture type(unsure)
Definition: RagTimeParser.cxx:116
void setMin(MWAWVec2< T > const &x)
resets the minimum point
Definition: libmwaw_internal.hxx:1083
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
float m_percent
the percentage
Definition: RagTimeParser.cxx:97
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:41
SubDocument(RagTimeParser &pars, MWAWInputStreamPtr const &input, int zoneId)
Definition: RagTimeParser.cxx:341
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:47
int getZoneDataFieldSize(int zId) const
returns the size of a zone data field
Definition: RagTimeParser.cxx:442
bool hasLine() const
returns true if the border is defined
Definition: MWAWGraphicStyle.hxx:317
int m_numDataZone
the number of data zone
Definition: RagTimeParser.cxx:293
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:265
const std::string & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:136
a structure used to store list in a resource fork
Definition: RagTimeStruct.hxx:57
bool readPictZoneV2(MWAWEntry &entry)
try to read pictZone ( a big zone):v2
Definition: RagTimeParser.cxx:1309
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
the main class to read a RagTime v2-3 file
Definition: RagTimeParser.hxx:60
std::shared_ptr< RagTimeSpreadsheet > m_spreadsheetParser
the spreadsheet parser
Definition: RagTimeParser.hxx:200
friend std::ostream & operator<<(std::ostream &o, Pattern const &pat)
a print operator
Definition: MWAWGraphicStyle.hxx:242
bool readRsrcBeDc(MWAWEntry &entry)
try to read the BeDc zone ( zone of size 52, one by file with id=0);
Definition: RagTimeParser.cxx:2106
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:180
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:176
static MWAWColor barycenter(float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
return alpha*colA+beta*colB
Definition: libmwaw_internal.cxx:206
bool findRsrcZones()
try to create the resource zones list
Definition: RagTimeParser.cxx:1079
MWAWGraphicStyle m_style
the style
Definition: RagTimeParser.cxx:205
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWParser.hxx:185
Definition: RagTimeStruct.hxx:59
int m_arrowFlags
arrow flag 1:begin, 2:end
Definition: RagTimeParser.cxx:209
friend class RagTimeSpreadsheet
Definition: RagTimeParser.hxx:64
SubDocumentType
Definition: libmwaw_internal.hxx:188
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
MWAWListenerPtr getMainListener()
returns the main listener
Definition: MWAWParser.cxx:120
int getFontId(int localId) const
returns a mac font id corresponding to a local id
Definition: RagTimeParser.cxx:416
bool sendBitmap(RagTimeParserInternal::Picture const &pict, MWAWPosition const &pos)
sends a bitmap
Definition: RagTimeParser.cxx:2486
int m_id
the subdocument id
Definition: RagTimeParser.cxx:356
a bitmap of bool to store black-white bitmap
Definition: MWAWPictBitmap.hxx:268
std::map< int, std::vector< int > > m_pageZonesIdMap
a map: page->main zone id
Definition: RagTimeParser.cxx:307
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:131
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:158
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: RagTimeParser.cxx:375
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
bool readRsrcBtch(MWAWEntry &entry)
try to read the Btch zone (zone with id=0)
Definition: RagTimeParser.cxx:2151
T y() const
second element
Definition: libmwaw_internal.hxx:671
MWAWRSRCParserPtr & getRSRCParser()
returns the rsrc parser
Definition: MWAWParser.hxx:190
const MWAWPageSpan & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
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
long m_headerPos
the beginning of the header(for debugging)
Definition: RagTimeParser.cxx:122
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:415
Picture()
constructor
Definition: RagTimeParser.cxx:107
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:181
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:76
void parse(librevenge::RVNGTextInterface *documentInterface) final
virtual function used to parse the input
Definition: RagTimeParser.cxx:490
T x() const
first element
Definition: libmwaw_internal.hxx:666
MWAWBox2f m_dimension
the dimension
Definition: RagTimeParser.cxx:199
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:47
void setRowPacked(int j, unsigned char const *val, unsigned char const *end)
sets all cell contents of a row given packed m_data
Definition: MWAWPictBitmap.hxx:337
~SubDocument() final
destructor
Definition: RagTimeParser.cxx:346
bool readRsrcFHwl(MWAWEntry &entry)
try to read the FHwl zone ( one by file with id=0), maybe width length?
Definition: RagTimeParser.cxx:2051
Definition: RagTimeParser.cxx:131
a border
Definition: libmwaw_internal.hxx:333
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:66
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:284
std::string getTypeString() const
returns a zone name
Definition: RagTimeParser.cxx:162
the main class to read the spreadsheet part of ragTime file
Definition: RagTimeSpreadsheet.hxx:71
int m_linkZones[5]
the link zones ( parent, prev, next, child, linked)
Definition: RagTimeParser.cxx:211
State()
constructor
Definition: RagTimeParser.cxx:276
const std::string & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
~RagTimeParser() final
destructor
Definition: RagTimeParser.cxx:398
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:260
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:559
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:92
void setBorders(int wh, MWAWBorder const &border)
sets the cell border: wh=libmwaw::LeftBit|...
Definition: MWAWGraphicStyle.cxx:172
the main class to read the text part of ragTime file
Definition: RagTimeText.hxx:70
Definition: MWAWListener.hxx:58
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
Definition: MWAWPict.hxx:73
void setMax(MWAWVec2< T > const &y)
resets the maximum point
Definition: libmwaw_internal.hxx:1088
std::shared_ptr< RagTimeText > m_textParser
the text parser
Definition: RagTimeParser.hxx:202
bool send(int zId)
try to send a zone
Definition: RagTimeParser.cxx:2588
Definition: libmwaw_internal.hxx:143
~Pattern() final
destructor
Definition: RagTimeParser.cxx:100
Type
the zone type
Definition: RagTimeParser.cxx:131
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:82
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:71
bool readColorsMap()
try to read the color map:v3
Definition: RagTimeParser.cxx:1428
bool m_isSent
a flag to know if the picture is sent
Definition: RagTimeParser.cxx:215
std::multimap< std::string, MWAWEntry > m_dataZoneMap
a map: type->entry (datafork)
Definition: RagTimeParser.cxx:295
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:333
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1191
Definition: RagTimeParser.cxx:131
Definition: RagTimeParser.cxx:131
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:168
Pattern & operator=(Pattern const &)=default
bool readZone6(MWAWEntry &entry)
try to read zone6 ( a big zone)
Definition: RagTimeParser.cxx:1607
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:201
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
std::map< int, Zone > m_idZoneMap
a map: zoneId->zone (datafork)
Definition: RagTimeParser.cxx:305
Definition: MWAWPosition.hxx:51
bool readColorTable(MWAWEntry &entry)
try to read the color table zone: CHTa zones
Definition: RagTimeParser.cxx:1835
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:263
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
bool sendText(int zId, MWAWListenerPtr listener)
try to send the text zone (interface of RagTimeText)
Definition: RagTimeParser.cxx:466
static ReadResult check(MWAWInputStreamPtr const &input, int size, MWAWBox2f &box)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:100
long end() const
returns the end offset
Definition: MWAWEntry.hxx:87
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:423
Pattern()
constructor
Definition: MWAWGraphicStyle.hxx:182
bool sendZones()
try to send the different zones
Definition: RagTimeParser.cxx:2581
int m_rotation
the rotation
Definition: RagTimeParser.cxx:203
MWAWEntry m_pos
the data position
Definition: RagTimeParser.cxx:118
bool getColor(int colId, MWAWColor &color, int listId=-1) const
returns the ith color ( if possible)
Definition: RagTimeParser.cxx:426
bool readRsrcSele(MWAWEntry &entry)
try to read the Sele zone (zone with id=0), maybe related to selection
Definition: RagTimeParser.cxx:2219
bool readRsrcCalc(MWAWEntry &entry)
try to read the Calc zone (zone with id=0)
Definition: RagTimeParser.cxx:2008
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
const MWAWVec2f & origin() const
return the frame origin
Definition: MWAWPosition.hxx:129
bool findPagesZones()
try to sort the zone on each page
Definition: RagTimeParser.cxx:760
bool sendPageZone(int page)
try to send the different zones of a page
Definition: RagTimeParser.cxx:2571
MWAWBox2f getBoundingBox() const
returns the bounding box
Definition: RagTimeParser.cxx:150
Internal: the pattern of a RagTimeManager.
Definition: RagTimeParser.cxx:66
Internal: the state of a RagTimeParser.
Definition: RagTimeParser.cxx:274
Internal: a zone of a RagTimeParser.
Definition: RagTimeParser.cxx:129
Definition: MWAWPosition.hxx:51
MWAWBox2f m_dim
the dimension
Definition: RagTimeParser.cxx:120
std::map< int, Picture > m_idPictureMap
a map: zoneId->picture (datafork)
Definition: RagTimeParser.cxx:309
void initDefaultPatterns(int vers)
init the pattern to default
Definition: RagTimeParser.cxx:313
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:196
std::map< int, std::vector< MWAWColor > > m_idColorsMap
the color map
Definition: RagTimeParser.cxx:299
int m_page
the page
Definition: RagTimeParser.cxx:201
bool m_isSent
a flag to know if the picture is sent
Definition: RagTimeParser.cxx:124
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:65
Type m_type
the resource type
Definition: RagTimeStruct.hxx:83
Definition: MWAWPosition.hxx:53
Definition: HanMacWrdJText.cxx:61
int m_sharedWith
the zone which contains the content
Definition: RagTimeParser.cxx:213
Definition: RagTimeParser.cxx:131
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:289
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:551
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:269
Definition: MWAWDocument.hxx:56
float m_rotate
the rotation
Definition: MWAWGraphicStyle.hxx:461
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:211
bool readTextZone(MWAWEntry &entry, int width, MWAWColor const &fontColor=MWAWColor::black())
try to read a text zone (knowing the zone width in point and the font color)
Definition: RagTimeParser.cxx:456
Class to store font.
Definition: MWAWFont.hxx:43
bool readPictZone(MWAWEntry &entry)
try to read pictZone ( a big zone)
Definition: RagTimeParser.cxx:1188
MWAWVec2f m_shadowOffset
the shadow offset
Definition: MWAWGraphicStyle.hxx:434
RagTime: -Mac v2.1-v3.2: done, -all v5.0-v6.5: incomplete, only try to retrieve the picture/shape/tex...
Definition: MWAWDocument.hxx:144
bool readLinks(MWAWEntry &entry)
try to read the File Link zone: FLink
Definition: RagTimeParser.cxx:1750
MWAWColor m_color
the border color
Definition: libmwaw_internal.hxx:393
bool readDataZoneHeader(int id, long endPos)
try to read a data zone header
Definition: RagTimeParser.cxx:799
std::vector< Pattern > m_patternList
a list patternId -> pattern
Definition: RagTimeParser.cxx:301
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:836
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
Definition: RagTimeParser.cxx:131
bool readRsrcStructured(MWAWEntry &entry)
try to read a structured zone
Definition: RagTimeParser.cxx:2264
Internal: the structures of a RagTimeParser.
Definition: RagTimeParser.cxx:62
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:97
Internal: the subdocument of a RagTimeParser.
Definition: RagTimeParser.cxx:337
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:163
bool readFormatsMap()
try to read the format map:v3
Definition: RagTimeParser.cxx:1823
void init()
inits all internal variables
Definition: RagTimeParser.cxx:402
bool m_read32Size
flag to know if the datasize in uint16 or uint32
Definition: RagTimeParser.cxx:197
Generated on Fri Jan 24 2020 01:18:39 for libmwaw by
doxygen 1.8.16