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);
249 mutable shared_ptr<MsWks4TextInternal::State>
m_state;
@ Fixed
Definition: MWAWParagraph.hxx:91
int m_id
the font id
Definition: MsWks4Text.cxx:174
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
friend std::ostream & operator<<(std::ostream &o, DataPLC const &plc)
operator<<
Definition: MsWks4Text.cxx:389
@ Time
Definition: libmwaw_internal.hxx:371
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:161
MWAWEntry m_textPositions
an entry which corresponds to the complete text zone
Definition: MsWks4Text.hxx:246
@ LEFT
Definition: MWAWParagraph.hxx:48
MWAWFont m_font
the font
Definition: MsWks4Text.cxx:198
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:293
virtual ~Paragraph()
destructor
Definition: MsWks4Text.cxx:255
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:1325
MsWks4Text(MsWksDocument &document)
constructor
Definition: MsWks4Text.cxx:465
Internal: class to store field definition: TOKN entry.
Definition: MsWks4Text.cxx:346
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
void setDefault(MWAWFont &font)
sets the default font
Definition: MsWks4Text.cxx:1133
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:424
std::vector< MWAWEntry const * > m_FDPPs
the list of FDPP entries
Definition: MsWks4Text.hxx:257
friend std::ostream & operator<<(std::ostream &o, Ftnt const &ftnt)
operator<<
Definition: MsWks4Text.cxx:276
Token()
constructor
Definition: MsWks4Text.cxx:297
bool pgdDataParser(MWAWInputStreamPtr input, long endPos, long, long, int id, std::string &mess)
parses the pagebreak positin entries : PGD
Definition: MsWks4Text.cxx:1622
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:1996
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
Alignment
the tab alignment
Definition: MWAWParagraph.hxx:48
@ ATTR_PARAG
Definition: MsWks4Text.hxx:218
std::ostream & operator<<(std::ostream &o, FontName const &ft)
Definition: MsWks4Text.cxx:179
bool readStructures(MWAWInputStreamPtr input, bool mainOle)
finds and parses all structures which correspond to the text
Definition: MsWks4Text.cxx:502
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:156
@ ATTR_UNKN
Definition: MsWks4Text.hxx:218
std::string m_name
the font name
Definition: MsWks4Text.cxx:172
std::vector< DataFOD > m_FODsList
the list of a FOD
Definition: MsWks4Text.hxx:252
std::string m_error
a string used to store the parsing errors
Definition: MsWks4Text.cxx:360
std::vector< FontName > m_fontNames
the list of fonts names
Definition: MsWks4Text.cxx:427
@ DTTUnk
Definition: MsWks4Text.cxx:190
Position m_pos
the way to define the text positions
Definition: MsWks4Text.cxx:109
MsWks4Text(MsWks4Text const &orig)
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:117
int id() const
returns the font id
Definition: MWAWFont.hxx:238
@ boldBit
Definition: MWAWFont.hxx:182
void createMapping()
creates the map of known PLC
Definition: MsWks4Text.cxx:133
friend std::ostream & operator<<(std::ostream &o, Token const &tok)
operator <<
Definition: MsWks4Text.cxx:310
MWAWVariable< int > m_listLevelIndex
the actual level index
Definition: MWAWParagraph.hxx:168
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:320
@ CENTER
Definition: MWAWParagraph.hxx:48
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:123
FontName()
constructor
Definition: MsWks4Text.cxx:166
bool ftntDataParser(MWAWInputStreamPtr input, long endPos, long bot, long eot, int id, std::string &mess)
parses the footnote position : FTNT
Definition: MsWks4Text.cxx:1579
int m_unknown
unknown field
Definition: MsWks4Text.cxx:305
bool toknDataParser(MWAWInputStreamPtr input, long endPos, long bot, long eot, int id, std::string &mess)
parses the field properties entries : TOKN.
Definition: MsWks4Text.cxx:1648
the class to store a color
Definition: libmwaw_internal.hxx:182
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:371
@ Page
Definition: MsWks4Text.cxx:190
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:126
long m_value
a potential value
Definition: MsWks4Text.cxx:384
int m_unknown
unknown
Definition: MsWks4Text.cxx:176
int m_id
the footnote number
Definition: MsWks4Text.cxx:270
bool m_main
true if we parse the main block
Definition: MsWks4Text.cxx:451
class to store the paragraph properties
Definition: MWAWParagraph.hxx:82
PLCType m_type
the type
Definition: MsWks4Text.cxx:382
MWAWVariable< LineSpacingType > m_spacingsInterlineType
the interline type: fixed, atLeast, ...
Definition: MWAWParagraph.hxx:154
@ Simple
Definition: MWAWFont.hxx:49
void setParse(bool main)
sets main to true if we parse the main block
Definition: MsWks4Text.cxx:415
shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:509
@ P_ABS
Definition: MsWks4Text.cxx:97
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:115
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:271
std::vector< long > m_pgdList
a list of all page breaks
Definition: MsWks4Text.cxx:434
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:142
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:127
@ embossBit
Definition: MWAWFont.hxx:182
@ PageCount
Definition: libmwaw_internal.hxx:371
@ P_UNKNOWN
Definition: MsWks4Text.cxx:97
bool hasType(std::string const &typ) const
returns true if the type entry == type
Definition: MWAWEntry.hxx:131
@ Date
Definition: libmwaw_internal.hxx:371
bool parseMain() const
returns true if we parse the main block
Definition: MsWks4Text.cxx:410
std::string m_error
a string used to store the parsing errors
Definition: MsWks4Text.cxx:273
friend std::ostream & operator<<(std::ostream &o, Object const &tok)
operator <<
Definition: MsWks4Text.cxx:363
DataFOD()
the constructor
Definition: MsWks4Text.hxx:221
int m_id
an identificator (which must be unique by category)
Definition: MsWks4Text.hxx:230
Type
the type of the content
Definition: MsWks4Text.cxx:102
Ftnt()
constructor
Definition: MsWks4Text.cxx:262
@ Eobj
Definition: MsWks4Text.cxx:190
@ AtLeast
Definition: MWAWParagraph.hxx:91
@ JustificationCenter
Definition: MWAWParagraph.hxx:87
@ P_REL
Definition: MsWks4Text.cxx:97
@ 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
@ EOBJ
Definition: MsWks4Text.cxx:79
@ T_UNKNOWN
Definition: MsWks4Text.cxx:102
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
~MsWks4Text()
destructor
Definition: MsWks4Text.cxx:473
std::string m_error
a string used to store the parsing errors
Definition: MsWks4Text.cxx:203
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:1818
@ Database
Definition: libmwaw_internal.hxx:371
bool defDataParser(MWAWInputStreamPtr input, long endPos, long bot, long eot, int id, std::string &mess)
the default parser (does nothing)
Definition: MsWks4Text.cxx:1038
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:66
MWAWField::Type m_type
the type
Definition: MsWks4Text.cxx:301
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MsWksDocument.hxx:127
friend std::ostream & operator<<(std::ostream &o, Paragraph const &ind)
operator <<
Definition: MsWks4Text.cxx:248
bool readParagraph(MWAWInputStreamPtr &input, long endPos, int &id, std::string &mess)
reads a paragraph properties
Definition: MsWks4Text.cxx:1333
std::multimap< std::string, MWAWEntry > & getEntryMap()
returns the document entry map of a v4 document
Definition: MsWksDocument.cxx:351
std::string const & name() const
name of the entry
Definition: MWAWEntry.hxx:142
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
std::string m_error
a string used to store the parsing errors
Definition: MsWks4Text.cxx:307
int m_textLength
the length of the text corresponding to the token
Definition: MsWks4Text.cxx:303
enum MsWks4TextInternal::PLCType PLCType
the PLC types
Definition: MsWks4Text.cxx:91
MsWks4PLCInternal::KnownPLC m_knownPLC
the known plc
Definition: MsWks4Text.cxx:448
void sendFootnote(int id)
tries to send a footnote
Definition: MsWksDocument.cxx:481
State()
constructor
Definition: MsWks4Text.cxx:405
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
FieldType
the field type: pagenumber, note, DTT=date/time/type
Definition: MsWks4Text.cxx:190
Internal: the state of a MsWks4Text.
Definition: MsWks4Text.cxx:403
Object()
constructor
Definition: MsWks4Text.cxx:348
PLC get(std::string const &name)
returns the PLC corresponding to a name
Definition: MsWks4Text.cxx:124
@ ATTR_TEXT
Definition: MsWks4Text.hxx:218
@ None
Definition: libmwaw_internal.hxx:371
The class which parses the main zones of a mac MS Works document v4.
Definition: MsWks4Zone.hxx:74
shared_ptr< MsWks4TextInternal::State > m_state
the internal state
Definition: MsWks4Text.hxx:249
friend std::ostream & operator<<(std::ostream &o, Font const &ft)
operator <<
Definition: MsWks4Text.cxx:206
int m_type
the note type
Definition: MsWks4Text.cxx:268
std::map< long, Object > m_eobjMap
mapping text offset to object
Definition: MsWks4Text.cxx:442
Definition: libmwaw_internal.hxx:142
MWAWVec2i m_dim
the dimension
Definition: MsWks4Text.cxx:356
DataPLC()
constructor
Definition: MsWks4Text.cxx:376
friend std::ostream & operator<<(std::ostream &o, FontName const &ft)
operator<<
Definition: MsWks4Text.cxx:179
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
MWAWParser * m_mainParser
the main parser;
Definition: MsWks4Text.hxx:238
@ T_CST
Definition: MsWks4Text.cxx:102
bool m_pageBreak
flag to know if there is a pagebreak before the paragraph
Definition: MsWks4Text.cxx:245
Type m_type
the type of the attribute
Definition: MsWks4Text.hxx:224
int m_type
the object type
Definition: MsWks4Text.cxx:352
long m_end
the last offset in the text
Definition: MsWks4Text.cxx:271
@ P_INCR
Definition: MsWks4Text.cxx:97
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
long m_begin
the first offset in the text
Definition: MsWks4Text.cxx:271
std::vector< Paragraph > m_paragraphList
a list of all paragraph properties
Definition: MsWks4Text.cxx:432
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:255
bool eobjDataParser(MWAWInputStreamPtr input, long endPos, long bot, long eot, int id, std::string &mess)
parses the object position : EOBJ
Definition: MsWks4Text.cxx:1547
@ Unknown
Definition: MsWks4Text.cxx:79
a field
Definition: libmwaw_internal.hxx:369
@ PageNumber
Definition: libmwaw_internal.hxx:371
@ JustificationLeft
Definition: MWAWParagraph.hxx:87
std::vector< Ftnt > m_ftntList
list of footnotes
Definition: MsWks4Text.cxx:437
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
PLCType
different types
Definition: MsWks4Text.cxx:79
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
@ None
Definition: MsWks4Text.cxx:190
bool readFontNames(MWAWInputStreamPtr input, MWAWEntry const &entry)
reads the font names entry : FONT
Definition: MsWks4Text.cxx:1062
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
librevenge::RVNGString m_bullet
the bullet if we have an bullet level
Definition: MWAWList.hxx:99
Font(MWAWFont const &ft)
copy constructor
Definition: MsWks4Text.cxx:194
@ PGD
Definition: MsWks4Text.cxx:79
int m_id
the local id
Definition: MsWks4Text.cxx:354
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:1745
std::vector< Font > m_fontList
a list of all font properties
Definition: MsWks4Text.cxx:430
@ italicBit
Definition: MWAWFont.hxx:182
bool readFont(MWAWInputStreamPtr &input, long endPos, int &id, std::string &mess)
reads a font properties
Definition: MsWks4Text.cxx:1139
void sendRBIL(int id, MWAWVec2i const &sz)
send a rbil zone
Definition: MsWksDocument.cxx:508
@ 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:611
structure which retrieves data information which correspond to a text position
Definition: MsWks4Text.hxx:211
@ BULLET
Definition: MWAWList.hxx:46
@ DTT
Definition: MsWks4Text.cxx:190
FieldType m_fieldType
the field type
Definition: MsWks4Text.cxx:200
long m_fileId
the file id
Definition: MsWks4Text.cxx:358
Internal: the structures of a MsWks4Text.
Definition: MsWks4Text.cxx:71
@ JustificationFull
Definition: MWAWParagraph.hxx:87
Internal: class to store the PLC: Pointer List Content ?
Definition: MsWks4Text.cxx:374
Internal: class to store a paragraph properties.
Definition: MsWks4Text.cxx:234
double m_labelWidth
the minimum label width
Definition: MWAWList.hxx:90
@ T_STRUCT
Definition: MsWks4Text.cxx:102
@ JustificationRight
Definition: MWAWParagraph.hxx:88
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:86
Paragraph()
constructor
Definition: MsWks4Text.cxx:236
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:851
MsWks4Text & operator=(MsWks4Text const &orig)
Internal: class to store a font name: name with sysid.
Definition: MsWks4Text.cxx:163
int numPages() const
returns the number of pages
Definition: MsWks4Text.cxx:479
Font(int fId=3, int size=12)
constructor: default value Geneva:12
Definition: MsWks4Text.cxx:192
std::string m_error
a string used to store the parsing errors
Definition: MsWks4Text.cxx:386
Internal and low level: the PLC different types and their structures.
Definition: MsWks4Text.cxx:89
MWAWParserStatePtr m_parserState
the parser state
Definition: MsWks4Text.hxx:240
std::string m_name
the entry name
Definition: MsWks4Text.cxx:380
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:439
std::vector< DataPLC > m_plcList
list of all PLCs
Definition: MsWks4Text.cxx:445
bool readText(MWAWInputStreamPtr input, MWAWEntry const &entry, bool mainOle)
reads a text section and send it to the listener
Definition: MsWks4Text.cxx:646
Type m_contentType
the type of the content
Definition: MsWks4Text.cxx:111
@ TOKEN
Definition: MsWks4Text.cxx:79
@ RIGHT
Definition: MWAWParagraph.hxx:48
Paragraph m_paragraph
the actual paragraph
Definition: MsWks4Text.cxx:421
long m_pos
the offset position of the text modified by this attribute
Definition: MsWks4Text.hxx:226
Class to store font.
Definition: MWAWFont.hxx:44
Internal: class to store field definition: TOKN entry.
Definition: MsWks4Text.cxx:295
void newPage(int page, bool softBreak=false)
tries to create a new page
Definition: MsWksDocument.cxx:470
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:184
@ Title
Definition: libmwaw_internal.hxx:371
a map of known plc
Definition: MsWks4Text.cxx:115
MWAWVariable< int > m_listId
the list id (if know )
Definition: MWAWParagraph.hxx:170
bool hasName(std::string const &nam) const
checks if the entry name is equal to name
Definition: MWAWEntry.hxx:147
KnownPLC()
creates the mapping
Definition: MsWks4Text.cxx:118
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:150
PLCType m_type
PLC type.
Definition: MsWks4Text.cxx:107
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
@ Note
Definition: MsWks4Text.cxx:190
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
MsWksDocument & m_document
the main document
Definition: MsWks4Text.hxx:243
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:1840
Internal: class to store a font properties.
Definition: MsWks4Text.cxx:188
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
Internal: class to store footnote definition.
Definition: MsWks4Text.cxx:260
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:228
@ ATTR_PLC
Definition: MsWks4Text.hxx:218
Generated on Wed Jun 17 2020 06:30:11 for libmwaw by
doxygen 1.8.18