Go to the documentation of this file.
34 #ifndef MS_WRD1_PARSER
35 # define MS_WRD1_PARSER
70 void parse(librevenge::RVNGTextInterface *documentInterface);
77 void createDocument(librevenge::RVNGTextInterface *documentInterface);
132 shared_ptr<MsWrd1ParserInternal::State>
m_state;
float m_columnsSep
the column separator
Definition: MsWrd1Parser.cxx:195
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
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:296
MWAWEntry m_zone
if valid the zone to parse
Definition: MWAWSubDocument.hxx:79
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:293
shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:519
a note
Definition: libmwaw_internal.hxx:406
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:262
uint16_t m_leaderCharacter
the leader char
Definition: MWAWParagraph.hxx:75
friend std::ostream & operator<<(std::ostream &o, Font const &ft)
operator<<
Definition: MsWrd1Parser.cxx:129
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
virtual bool operator!=(MWAWSubDocument const &doc) const
operator!=
Definition: MsWrd1Parser.cxx:235
@ UNKNOWN
Definition: MsWrd1Parser.cxx:65
void newPage(int number)
adds a new page
Definition: MsWrd1Parser.cxx:301
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
bool sendText(MWAWEntry const &entry, bool main=false)
send the text structure to the listener
Definition: MsWrd1Parser.cxx:1205
std::vector< int > m_mainTextZonesList
the list of main text zones
Definition: MsWrd1Parser.cxx:201
MsWrd1Parser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: MsWrd1Parser.cxx:277
int m_actPage
the actual page
Definition: MsWrd1Parser.cxx:213
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:156
Internal: the paragraph of a MsWrd1Parser.
Definition: MsWrd1Parser.cxx:138
int m_numColumns
the number of columns
Definition: MsWrd1Parser.cxx:193
int m_id
the id
Definition: MsWrd1Parser.cxx:76
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:117
@ boldBit
Definition: MWAWFont.hxx:182
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
the main class to read a Microsoft Word 1 file
Definition: MsWrd1Parser.hxx:58
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
friend std::ostream & operator<<(std::ostream &o, Paragraph const &ft)
operator<<
Definition: MsWrd1Parser.cxx:157
@ CENTER
Definition: MWAWParagraph.hxx:48
bool readPageBreak(MWAWVec2i limit)
try to read the page break (zone 5)
Definition: MsWrd1Parser.cxx:809
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:123
State()
constructor
Definition: MsWrd1Parser.cxx:182
friend std::ostream & operator<<(std::ostream &o, PLC const &plc)
operator<<
Definition: MsWrd1Parser.cxx:81
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:150
void setColumns(int num, double width, librevenge::RVNGUnit widthUnit, double colSep=0)
a function which sets n uniform columns
Definition: MWAWSection.cxx:108
Internal: class to store the PLC: Pointer List Content ?
Definition: MsWrd1Parser.cxx:68
long m_eot
end of text
Definition: MsWrd1Parser.cxx:191
bool readParagraph(long fPos, MsWrd1ParserInternal::Paragraph ¶)
try to read a paragraph property
Definition: MsWrd1Parser.cxx:678
class to store the paragraph properties
Definition: MWAWParagraph.hxx:82
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:187
void parse(librevenge::RVNGTextInterface *documentInterface)
virtual function used to parse the input
Definition: MsWrd1Parser.cxx:327
@ Simple
Definition: MWAWFont.hxx:49
SubDocument(MsWrd1Parser &pars, MWAWInputStreamPtr input, MWAWEntry const &position)
constructor for footnote, header
Definition: MsWrd1Parser.cxx:228
virtual ~MsWrd1Parser()
destructor
Definition: MsWrd1Parser.cxx:283
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
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
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:142
int m_type
the initial type
Definition: MsWrd1Parser.cxx:148
void setProperty(MsWrd1ParserInternal::Paragraph const ¶)
send the ruler properties
Definition: MsWrd1Parser.cxx:1335
@ DECIMAL
Definition: MWAWParagraph.hxx:48
Internal: the structures of a MsWrd1Parser.
Definition: MsWrd1Parser.cxx:56
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type)
the parser function
Definition: MsWrd1Parser.cxx:251
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:127
@ embossBit
Definition: MWAWFont.hxx:182
@ uppercaseBit
Definition: MWAWFont.hxx:184
int m_numPages
the number of page of the final document
Definition: MsWrd1Parser.cxx:213
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
class to store a tab use by MWAWParagraph
Definition: MWAWParagraph.hxx:46
bool isSet() const
return true if the variable is set
Definition: libmwaw_internal.hxx:586
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:172
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWParser.hxx:185
std::string m_extras
a string used to store the parsing extrass
Definition: MsWrd1Parser.cxx:78
SubDocumentType
Definition: libmwaw_internal.hxx:178
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:85
bool prepareTextZones()
prepare the data: separate header/footer zones to the main stream...
Definition: MsWrd1Parser.cxx:512
@ JustificationCenter
Definition: MWAWParagraph.hxx:87
@ MWAW_T_MICROSOFTWORD
Microsoft Word (v1-v5)
Definition: MWAWDocument.hxx:132
@ shadowBit
Definition: MWAWFont.hxx:183
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:146
std::multimap< long, PLC > m_plcMap
the text correspondance zone ( filepos, plc )
Definition: MsWrd1Parser.cxx:211
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
std::string getDebugString(shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
std::vector< Paragraph > m_paragraphsList
the list of paragraph
Definition: MsWrd1Parser.cxx:205
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:177
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:66
std::ostream & operator<<(std::ostream &o, PLC const &plc)
Definition: MsWrd1Parser.cxx:81
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
int m_fileZonesLimit[7]
the zones limits
Definition: MsWrd1Parser.cxx:197
std::vector< int > m_headersId
the list of header id which corresponds to each page
Definition: MsWrd1Parser.cxx:217
Paragraph()
constructor
Definition: MsWrd1Parser.cxx:140
bool createZones()
finds the different zones
Definition: MsWrd1Parser.cxx:451
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
@ PageBreak
Definition: MWAWListener.hxx:58
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MsWrd1Parser.cxx:375
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:73
a class which stores section properties
Definition: MWAWSection.hxx:46
Definition: libmwaw_internal.hxx:142
@ RULER
Definition: MsWrd1Parser.cxx:65
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
@ ZONE
Definition: MsWrd1Parser.cxx:65
double m_position
the tab position
Definition: MWAWParagraph.hxx:71
Font()
constructor
Definition: MsWrd1Parser.cxx:116
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
@ PAGE
Definition: MsWrd1Parser.cxx:65
MWAWFont m_font
the basic font property
Definition: MsWrd1Parser.cxx:122
virtual bool operator!=(MWAWSubDocument const &doc) const
comparison operator!=
Definition: MWAWSubDocument.cxx:62
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:197
int m_type2
another type
Definition: MsWrd1Parser.cxx:150
@ FOOTNOTE
Definition: MsWrd1Parser.cxx:65
std::string m_extras
a string used to store the parsing extrass
Definition: MsWrd1Parser.cxx:126
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
bool readPLC(MWAWVec2i limits, int wh)
read the two first zones (char and paragraph)
Definition: MsWrd1Parser.cxx:1102
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
std::vector< MWAWVec2l > m_footnotesList
the footnote positions ( list of beginPos, endPos)
Definition: MsWrd1Parser.cxx:209
@ FONT
Definition: MsWrd1Parser.cxx:65
virtual bool operator==(MWAWSubDocument const &doc) const
operator!==
Definition: MsWrd1Parser.cxx:240
virtual ~SubDocument()
destructor
Definition: MsWrd1Parser.cxx:232
int m_headerHeight
the header height if known
Definition: MsWrd1Parser.cxx:214
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: MsWrd1Parser.cxx:1346
void removeLastCharIfEOL(MWAWEntry &entry)
shorten an entry if the last character is EOL
Definition: MsWrd1Parser.cxx:314
@ italicBit
Definition: MWAWFont.hxx:182
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
bool readFootnoteCorrespondance(MWAWVec2i limit)
try to read the footnote correspondance ( zone2 )
Definition: MsWrd1Parser.cxx:854
shared_ptr< MsWrd1ParserInternal::State > m_state
the state
Definition: MsWrd1Parser.hxx:132
MWAWVec2< long > MWAWVec2l
MWAWVec2 of long.
Definition: libmwaw_internal.hxx:783
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
@ JustificationFull
Definition: MWAWParagraph.hxx:87
@ JustificationRight
Definition: MWAWParagraph.hxx:88
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
std::vector< Font > m_fontsList
the list of fonts
Definition: MsWrd1Parser.cxx:203
void setStream(MWAWInputStreamPtr ip)
resets the input
Definition: MWAWDebug.hxx:73
~Paragraph()
destructor
Definition: MsWrd1Parser.cxx:153
bool readZones(MWAWVec2i limit)
try to read the list of zones: separator between text and footnote? (zone 4)
Definition: MsWrd1Parser.cxx:916
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:88
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:581
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:513
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:223
int m_type
a unknown int, maybe 0x80 means defined font
Definition: MsWrd1Parser.cxx:124
Internal: the subdocument of a MsWrdParser.
Definition: MsWrd1Parser.cxx:225
bool readFont(long fPos, MsWrd1ParserInternal::Font &font)
try to read a char property
Definition: MsWrd1Parser.cxx:614
PLC(PLCType type=UNKNOWN)
constructor
Definition: MsWrd1Parser.cxx:70
@ FootNote
Definition: libmwaw_internal.hxx:408
Internal: the state of a MsWrd1Parser.
Definition: MsWrd1Parser.cxx:180
int m_footerHeight
the footer height if known
Definition: MsWrd1Parser.cxx:215
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:207
PLCType
different types
Definition: MsWrd1Parser.cxx:65
@ RIGHT
Definition: MWAWParagraph.hxx:48
std::vector< int > m_footersId
the list of footer id which corresponds to each page
Definition: MsWrd1Parser.cxx:219
Class to store font.
Definition: MWAWFont.hxx:44
@ EndNote
Definition: libmwaw_internal.hxx:408
void sendMain()
try to send the main zone
Definition: MsWrd1Parser.cxx:356
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:184
void init()
inits all internal variables
Definition: MsWrd1Parser.cxx:287
std::vector< MWAWVec2l > m_textZonesList
the list of text zones
Definition: MsWrd1Parser.cxx:199
bool readDocInfo(MWAWVec2i limit)
try to read the document info (zone 3)
Definition: MsWrd1Parser.cxx:963
Internal: the font of a MsWrd1Parser.
Definition: MsWrd1Parser.cxx:114
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
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
shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:96
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:151
bool m_endNote
a flag to know if we send endnote or footnote
Definition: MsWrd1Parser.cxx:207
PLCType m_type
the type
Definition: MsWrd1Parser.cxx:74
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
Generated on Wed Jun 17 2020 06:30:11 for libmwaw by
doxygen 1.8.18