Go to the documentation of this file.
76 int &id, std::string &mess);
116 (
MWAWInputStreamPtr input,
long endPos,
long bot,
long eot,
int id, std::string &mess);
126 std::vector<long> &textPtrs, std::vector<long> &listValues,
136 std::vector<long> &textPtrs,
137 std::vector<long> &listValues)
139 return readPLC(input, entry, textPtrs, listValues);
144 long bot,
long eot,
int id, std::string &mess);
151 int &
id, std::string &mess);
157 int &
id, std::string &mess);
161 long bot,
long eot,
int id, std::string &mess);
165 long bot,
long eot,
int id, std::string &mess);
171 long bot,
long eot,
int id, std::string &mess);
177 long,
long,
int id, std::string &mess);
186 (std::vector<DataFOD>
const &lst1, std::vector<DataFOD>
const &lst2)
const;
191 std::vector<DataFOD> &fods,
FDPParser parser);
255 mutable std::shared_ptr<MsWks4TextInternal::State>
m_state;
@ Fixed
Definition: MWAWParagraph.hxx:94
int m_id
the font id
Definition: MsWks4Text.cxx:184
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
@ Time
Definition: libmwaw_internal.hxx:401
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
MWAWEntry m_textPositions
an entry which corresponds to the complete text zone
Definition: MsWks4Text.hxx:252
@ LEFT
Definition: MWAWParagraph.hxx:48
MWAWFont m_font
the font
Definition: MsWks4Text.cxx:218
bool(MsWks4Text::* FDPParser)(MWAWInputStreamPtr &input, long endPos, int &id, std::string &mess)
callback when a new attribute is found in an FDPP/FDPC entry
Definition: MsWks4Text.hxx:75
Position
the way to define the text positions
Definition: MsWks4Text.cxx:97
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
the main class to read/store generic data of a MsWorks document v1-v3
Definition: MsWksDocument.hxx:69
The class which parses text zones in a mac MS Works document v4.
Definition: MsWks4Text.hxx:65
void setProperty(MsWks4TextInternal::Paragraph const &tabs)
sends a paragraph properties to the listener
Definition: MsWks4Text.cxx:1392
MsWks4Text(MsWksDocument &document)
constructor
Definition: MsWks4Text.cxx:529
Internal: class to store field definition: TOKN entry.
Definition: MsWks4Text.cxx:385
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
void setDefault(MWAWFont &font)
sets the default font
Definition: MsWks4Text.cxx:1201
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MWAWFont m_defFont
the default font
Definition: MsWks4Text.cxx:488
std::vector< MWAWEntry const * > m_FDPPs
the list of FDPP entries
Definition: MsWks4Text.hxx:263
Token()
constructor
Definition: MsWks4Text.cxx:328
bool pgdDataParser(MWAWInputStreamPtr input, long endPos, long, long, int id, std::string &mess)
parses the pagebreak positin entries : PGD
Definition: MsWks4Text.cxx:1688
std::vector< DataFOD > mergeSortedLists(std::vector< DataFOD > const &lst1, std::vector< DataFOD > const &lst2) const
function which takes two sorted list of attribute (by text position).
Definition: MsWks4Text.cxx:2055
bool readSimplePLC(MWAWInputStreamPtr &input, MWAWEntry const &entry, std::vector< long > &textPtrs, std::vector< long > &listValues)
reads a PLC (Pointer List Composant ?) in zone entry
Definition: MsWks4Text.hxx:135
@ ATTR_PARAG
Definition: MsWks4Text.hxx:218
std::ostream & operator<<(std::ostream &o, FontName const &ft)
Definition: MsWks4Text.cxx:189
bool readStructures(MWAWInputStreamPtr input, bool mainOle)
finds and parses all structures which correspond to the text
Definition: MsWks4Text.cxx:572
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:162
@ ATTR_UNKN
Definition: MsWks4Text.hxx:218
std::string m_name
the font name
Definition: MsWks4Text.cxx:182
std::vector< DataFOD > m_FODsList
the list of a FOD
Definition: MsWks4Text.hxx:258
std::string m_error
a string used to store the parsing errors
Definition: MsWks4Text.cxx:406
std::vector< FontName > m_fontNames
the list of fonts names
Definition: MsWks4Text.cxx:491
@ DTTUnk
Definition: MsWks4Text.cxx:200
Position m_pos
the way to define the text positions
Definition: MsWks4Text.cxx:113
Internal and low level: the structures of a MsWks4Text used to parse PLC.
Definition: MsWks4Text.cxx:87
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:125
int id() const
returns the font id
Definition: MWAWFont.hxx:259
@ boldBit
Definition: MWAWFont.hxx:190
void createMapping()
creates the map of known PLC
Definition: MsWks4Text.cxx:138
MWAWVariable< int > m_listLevelIndex
the actual level index
Definition: MWAWParagraph.hxx:174
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
@ CENTER
Definition: MWAWParagraph.hxx:48
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
FontName()
constructor
Definition: MsWks4Text.cxx:171
bool ftntDataParser(MWAWInputStreamPtr input, long endPos, long bot, long eot, int id, std::string &mess)
parses the footnote position : FTNT
Definition: MsWks4Text.cxx:1645
int m_unknown
unknown field
Definition: MsWks4Text.cxx:342
bool toknDataParser(MWAWInputStreamPtr input, long endPos, long bot, long eot, int id, std::string &mess)
parses the field properties entries : TOKN.
Definition: MsWks4Text.cxx:1714
the class to store a color
Definition: libmwaw_internal.hxx:192
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libmwaw_internal.cxx:63
Type
Defines some basic type for field.
Definition: libmwaw_internal.hxx:401
@ Page
Definition: MsWks4Text.cxx:200
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
long m_value
a potential value
Definition: MsWks4Text.cxx:436
int m_unknown
unknown
Definition: MsWks4Text.cxx:186
int m_id
the footnote number
Definition: MsWks4Text.cxx:301
bool m_main
true if we parse the main block
Definition: MsWks4Text.cxx:515
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
PLCType m_type
the type
Definition: MsWks4Text.cxx:434
MWAWVariable< LineSpacingType > m_spacingsInterlineType
the interline type: fixed, atLeast, ...
Definition: MWAWParagraph.hxx:160
@ Simple
Definition: MWAWFont.hxx:49
void setParse(bool main)
sets main to true if we parse the main block
Definition: MsWks4Text.cxx:479
@ P_ABS
Definition: MsWks4Text.cxx:97
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
void setDeltaLetterSpacing(float d, librevenge::RVNGUnit unit=librevenge::RVNG_POINT)
sets the letter spacing ( delta value in point )
Definition: MWAWFont.hxx:292
std::vector< long > m_pgdList
a list of all page breaks
Definition: MsWks4Text.cxx:498
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
Type
different type which can be associated to a text position
Definition: MsWks4Text.hxx:218
@ DECIMAL
Definition: MWAWParagraph.hxx:48
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:135
@ embossBit
Definition: MWAWFont.hxx:190
@ PageCount
Definition: libmwaw_internal.hxx:401
@ P_UNKNOWN
Definition: MsWks4Text.cxx:97
bool hasType(std::string const &typ) const
returns true if the type entry == type
Definition: MWAWEntry.hxx:142
@ Date
Definition: libmwaw_internal.hxx:401
bool parseMain() const
returns true if we parse the main block
Definition: MsWks4Text.cxx:474
std::string m_error
a string used to store the parsing errors
Definition: MsWks4Text.cxx:304
@ BookmarkEnd
Definition: libmwaw_internal.hxx:401
DataFOD()
the constructor
Definition: MsWks4Text.hxx:221
int m_id
an identificator (which must be unique by category)
Definition: MsWks4Text.hxx:236
Type
the type of the content
Definition: MsWks4Text.cxx:102
Ftnt()
constructor
Definition: MsWks4Text.cxx:286
@ Eobj
Definition: MsWks4Text.cxx:200
@ AtLeast
Definition: MWAWParagraph.hxx:94
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
@ P_REL
Definition: MsWks4Text.cxx:97
@ 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
@ EOBJ
Definition: MsWks4Text.cxx:79
@ T_UNKNOWN
Definition: MsWks4Text.cxx:102
~MsWks4Text()
destructor
Definition: MsWks4Text.cxx:543
std::string m_error
a string used to store the parsing errors
Definition: MsWks4Text.cxx:223
MsWks4Text(MsWks4Text const &orig)=delete
bool findFDPStructuresByHand(MWAWInputStreamPtr &input, int which)
Fills the vector of (FDPCs/FDPPs) paragraph/characters strutures, a function to call when the normal ...
Definition: MsWks4Text.cxx:1877
@ Database
Definition: libmwaw_internal.hxx:401
bool defDataParser(MWAWInputStreamPtr input, long endPos, long bot, long eot, int id, std::string &mess)
the default parser (does nothing)
Definition: MsWks4Text.cxx:1106
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
MWAWField::Type m_type
the type
Definition: MsWks4Text.cxx:338
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MsWksDocument.hxx:132
friend std::ostream & operator<<(std::ostream &o, Paragraph const &ind)
operator <<
Definition: MsWks4Text.cxx:272
bool readParagraph(MWAWInputStreamPtr &input, long endPos, int &id, std::string &mess)
reads a paragraph properties
Definition: MsWks4Text.cxx:1400
std::multimap< std::string, MWAWEntry > & getEntryMap()
returns the document entry map of a v4 document
Definition: MsWksDocument.cxx:373
std::string const & name() const
name of the entry
Definition: MWAWEntry.hxx:153
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
std::string m_error
a string used to store the parsing errors
Definition: MsWks4Text.cxx:344
int m_textLength
the length of the text corresponding to the token
Definition: MsWks4Text.cxx:340
enum MsWks4TextInternal::PLCType PLCType
the PLC types
Definition: MsWks4Text.cxx:91
MsWks4PLCInternal::KnownPLC m_knownPLC
the known plc
Definition: MsWks4Text.cxx:512
void sendFootnote(int id)
tries to send a footnote
Definition: MsWksDocument.cxx:503
State()
constructor
Definition: MsWks4Text.cxx:457
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
FieldType
the field type: pagenumber, note, DTT=date/time/type
Definition: MsWks4Text.cxx:200
Internal: the state of a MsWks4Text.
Definition: MsWks4Text.cxx:455
Object()
constructor
Definition: MsWks4Text.cxx:387
PLC get(std::string const &name)
returns the PLC corresponding to a name
Definition: MsWks4Text.cxx:129
@ ATTR_TEXT
Definition: MsWks4Text.hxx:218
@ None
Definition: libmwaw_internal.hxx:401
The class which parses the main zones of a mac MS Works document v4.
Definition: MsWks4Zone.hxx:74
friend std::ostream & operator<<(std::ostream &o, Font const &ft)
operator <<
Definition: MsWks4Text.cxx:226
int m_type
the note type
Definition: MsWks4Text.cxx:299
std::map< long, Object > m_eobjMap
mapping text offset to object
Definition: MsWks4Text.cxx:506
Definition: libmwaw_internal.hxx:144
Paragraph & operator=(Paragraph const &)=default
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
MWAWVec2i m_dim
the dimension
Definition: MsWks4Text.cxx:402
DataPLC()
constructor
Definition: MsWks4Text.cxx:422
friend std::ostream & operator<<(std::ostream &o, FontName const &ft)
operator<<
Definition: MsWks4Text.cxx:189
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
MWAWParser * m_mainParser
the main parser;
Definition: MsWks4Text.hxx:244
@ BookmarkStart
Definition: libmwaw_internal.hxx:401
~Paragraph() final
destructor
Definition: MsWks4Text.cxx:279
@ T_CST
Definition: MsWks4Text.cxx:102
bool m_pageBreak
flag to know if there is a pagebreak before the paragraph
Definition: MsWks4Text.cxx:269
Type m_type
the type of the attribute
Definition: MsWks4Text.hxx:230
int m_type
the object type
Definition: MsWks4Text.cxx:398
long m_end
the last offset in the text
Definition: MsWks4Text.cxx:302
@ P_INCR
Definition: MsWks4Text.cxx:97
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
long m_begin
the first offset in the text
Definition: MsWks4Text.cxx:302
std::vector< Paragraph > m_paragraphList
a list of all paragraph properties
Definition: MsWks4Text.cxx:496
void flushNote(int noteId)
sends to the listener the text which corresponds to noteId
std::vector< MWAWEntry const * > m_FDPCs
the list of FDPC entries
Definition: MsWks4Text.hxx:261
bool eobjDataParser(MWAWInputStreamPtr input, long endPos, long bot, long eot, int id, std::string &mess)
parses the object position : EOBJ
Definition: MsWks4Text.cxx:1613
@ Unknown
Definition: MsWks4Text.cxx:79
a field
Definition: libmwaw_internal.hxx:399
@ PageNumber
Definition: libmwaw_internal.hxx:401
@ JustificationLeft
Definition: MWAWParagraph.hxx:90
std::vector< Ftnt > m_ftntList
list of footnotes
Definition: MsWks4Text.cxx:501
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
PLCType
different types
Definition: MsWks4Text.cxx:79
@ None
Definition: MsWks4Text.cxx:200
bool readFontNames(MWAWInputStreamPtr input, MWAWEntry const &entry)
reads the font names entry : FONT
Definition: MsWks4Text.cxx:1130
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
librevenge::RVNGString m_bullet
the bullet if we have an bullet level
Definition: MWAWList.hxx:114
Font(MWAWFont const &ft)
copy constructor
Definition: MsWks4Text.cxx:209
@ PGD
Definition: MsWks4Text.cxx:79
int m_id
the local id
Definition: MsWks4Text.cxx:400
virtual class which defines the ancestor of all main zone parser
Definition: MWAWParser.hxx:100
bool findFDPStructures(MWAWInputStreamPtr &input, int which)
Fills the vector of (FDPCs/FDPPs) paragraph/characters strutures.
Definition: MsWks4Text.cxx:1811
std::vector< Font > m_fontList
a list of all font properties
Definition: MsWks4Text.cxx:494
@ italicBit
Definition: MWAWFont.hxx:190
bool readFont(MWAWInputStreamPtr &input, long endPos, int &id, std::string &mess)
reads a font properties
Definition: MsWks4Text.cxx:1207
void sendRBIL(int id, MWAWVec2i const &sz)
send a rbil zone
Definition: MsWksDocument.cxx:530
@ FTNT
Definition: MsWks4Text.cxx:79
bool readFootNote(MWAWInputStreamPtr input, int id)
sends the text which corresponds to footnote id to the listner
Definition: MsWks4Text.cxx:678
structure which retrieves data information which correspond to a text position
Definition: MsWks4Text.hxx:211
@ BULLET
Definition: MWAWList.hxx:46
@ DTT
Definition: MsWks4Text.cxx:200
FieldType m_fieldType
the field type
Definition: MsWks4Text.cxx:220
long m_fileId
the file id
Definition: MsWks4Text.cxx:404
Internal: the structures of a MsWks4Text.
Definition: MsWks4Text.cxx:71
@ JustificationFull
Definition: MWAWParagraph.hxx:90
Internal: class to store the PLC: Pointer List Content ?
Definition: MsWks4Text.cxx:420
Internal: class to store a paragraph properties.
Definition: MsWks4Text.cxx:254
double m_labelWidth
the minimum label width
Definition: MWAWList.hxx:105
@ T_STRUCT
Definition: MsWks4Text.cxx:102
MsWks4Text & operator=(MsWks4Text const &orig)=delete
@ JustificationRight
Definition: MWAWParagraph.hxx:91
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
void flushExtra(MWAWInputStreamPtr)
sends the data which have not been sent: actually do nothing
Definition: MsWks4Text.hxx:91
small structure to keep information about a list level
Definition: MWAWList.hxx:44
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
Type m_type
the type of the level
Definition: MWAWList.hxx:101
Paragraph()
constructor
Definition: MsWks4Text.cxx:256
bool readPLC(MWAWInputStreamPtr input, MWAWEntry const &entry, std::vector< long > &textPtrs, std::vector< long > &listValues, DataParser parser=&MsWks4Text::defDataParser)
reads a PLC (Pointer List Composant ?) in zone entry
Definition: MsWks4Text.cxx:918
Internal: class to store a font name: name with sysid.
Definition: MsWks4Text.cxx:168
int numPages() const
returns the number of pages
Definition: MsWks4Text.cxx:550
Font(int fId=3, int size=12)
constructor: default value Geneva:12
Definition: MsWks4Text.cxx:202
std::string m_error
a string used to store the parsing errors
Definition: MsWks4Text.cxx:438
Internal and low level: the PLC different types and their structures.
Definition: MsWks4Text.cxx:89
MWAWParserStatePtr m_parserState
the parser state
Definition: MsWks4Text.hxx:246
std::string m_name
the entry name
Definition: MsWks4Text.cxx:432
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
@ BTE
Definition: MsWks4Text.cxx:79
std::map< long, Ftnt > m_ftntMap
mapping text offset to footnote
Definition: MsWks4Text.cxx:503
std::vector< DataPLC > m_plcList
list of all PLCs
Definition: MsWks4Text.cxx:509
Paragraph(Paragraph const &)=default
bool readText(MWAWInputStreamPtr input, MWAWEntry const &entry, bool mainOle)
reads a text section and send it to the listener
Definition: MsWks4Text.cxx:713
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
Type m_contentType
the type of the content
Definition: MsWks4Text.cxx:115
@ TOKEN
Definition: MsWks4Text.cxx:79
@ RIGHT
Definition: MWAWParagraph.hxx:48
Paragraph m_paragraph
the actual paragraph
Definition: MsWks4Text.cxx:485
long m_pos
the offset position of the text modified by this attribute
Definition: MsWks4Text.hxx:232
Class to store font.
Definition: MWAWFont.hxx:44
Internal: class to store field definition: TOKN entry.
Definition: MsWks4Text.cxx:326
void newPage(int page, bool softBreak=false)
tries to create a new page
Definition: MsWksDocument.cxx:492
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:190
@ Title
Definition: libmwaw_internal.hxx:401
a map of known plc
Definition: MsWks4Text.cxx:119
std::shared_ptr< MsWks4TextInternal::State > m_state
the internal state
Definition: MsWks4Text.hxx:255
MWAWVariable< int > m_listId
the list id (if know )
Definition: MWAWParagraph.hxx:176
bool hasName(std::string const &nam) const
checks if the entry name is equal to name
Definition: MWAWEntry.hxx:158
KnownPLC()
creates the mapping
Definition: MsWks4Text.cxx:122
PLC(PLCType w=MsWks4TextInternal::Unknown, Position p=P_UNKNOWN, Type t=T_UNKNOWN)
constructor
Definition: MsWks4Text.cxx:104
std::map< std::string, PLC > m_knowns
map name -> known PLC
Definition: MsWks4Text.cxx:155
PLCType m_type
PLC type.
Definition: MsWks4Text.cxx:111
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
@ Note
Definition: MsWks4Text.cxx:200
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
MsWksDocument & m_document
the main document
Definition: MsWks4Text.hxx:249
bool readFDP(MWAWInputStreamPtr &input, MWAWEntry const &entry, std::vector< DataFOD > &fods, FDPParser parser)
parses a FDPP or a FDPC entry (which contains a list of ATTR_TEXT/ATTR_PARAG with their definition ) ...
Definition: MsWks4Text.cxx:1899
Internal: class to store a font properties.
Definition: MsWks4Text.cxx:198
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
Internal: class to store footnote definition.
Definition: MsWks4Text.cxx:284
bool(MsWks4Text::* DataParser)(MWAWInputStreamPtr input, long endPos, long bot, long eot, int id, std::string &mess)
definition of the plc data parser (low level)
Definition: MsWks4Text.hxx:116
long m_defPos
the offset position of the definition of the attribute in the file
Definition: MsWks4Text.hxx:234
@ ATTR_PLC
Definition: MsWks4Text.hxx:218
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20