Go to the documentation of this file.
34 #ifndef MS_WRD1_PARSER
35 # define MS_WRD1_PARSER
float m_columnsSep
the column separator
Definition: MsWrd1Parser.cxx:220
std::shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:567
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
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:299
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
a note
Definition: libmwaw_internal.hxx:445
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
uint16_t m_leaderCharacter
the leader char
Definition: MWAWParagraph.hxx:78
friend std::ostream & operator<<(std::ostream &o, Font const &ft)
operator<<
Definition: MsWrd1Parser.cxx:137
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
@ UNKNOWN
Definition: MsWrd1Parser.cxx:65
void newPage(int number)
adds a new page
Definition: MsWrd1Parser.cxx:322
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:1222
std::vector< int > m_mainTextZonesList
the list of main text zones
Definition: MsWrd1Parser.cxx:226
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:162
Internal: the paragraph of a MsWrd1Parser.
Definition: MsWrd1Parser.cxx:146
int m_numColumns
the number of columns
Definition: MsWrd1Parser.cxx:218
int m_id
the id
Definition: MsWrd1Parser.cxx:81
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:125
@ boldBit
Definition: MWAWFont.hxx:190
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:171
@ CENTER
Definition: MWAWParagraph.hxx:48
bool readPageBreak(MWAWVec2i limit)
try to read the page break (zone 5)
Definition: MsWrd1Parser.cxx:829
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
State()
constructor
Definition: MsWrd1Parser.cxx:196
friend std::ostream & operator<<(std::ostream &o, PLC const &plc)
operator<<
Definition: MsWrd1Parser.cxx:86
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:156
void setColumns(int num, double width, librevenge::RVNGUnit widthUnit, double colSep=0)
a function which sets n uniform columns
Definition: MWAWSection.cxx:109
Internal: class to store the PLC: Pointer List Content ?
Definition: MsWrd1Parser.cxx:68
long m_eot
end of text
Definition: MsWrd1Parser.cxx:216
bool readParagraph(long fPos, MsWrd1ParserInternal::Paragraph ¶)
try to read a paragraph property
Definition: MsWrd1Parser.cxx:698
Paragraph & operator=(Paragraph const &)=default
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
@ Simple
Definition: MWAWFont.hxx:49
~SubDocument() final
destructor
Definition: MsWrd1Parser.cxx:257
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:148
int m_type
the initial type
Definition: MsWrd1Parser.cxx:162
void setProperty(MsWrd1ParserInternal::Paragraph const ¶)
send the ruler properties
Definition: MsWrd1Parser.cxx:1352
@ DECIMAL
Definition: MWAWParagraph.hxx:48
Internal: the structures of a MsWrd1Parser.
Definition: MsWrd1Parser.cxx:56
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:135
@ embossBit
Definition: MWAWFont.hxx:190
@ uppercaseBit
Definition: MWAWFont.hxx:192
MsWrd1Parser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: MsWrd1Parser.cxx:297
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:635
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
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:83
SubDocumentType
Definition: libmwaw_internal.hxx:188
SubDocument(MsWrd1Parser &pars, MWAWInputStreamPtr const &input, MWAWEntry const &position)
constructor for footnote, header
Definition: MsWrd1Parser.cxx:251
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
bool prepareTextZones()
prepare the data: separate header/footer zones to the main stream...
Definition: MsWrd1Parser.cxx:532
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
@ MWAW_T_MICROSOFTWORD
Microsoft Word (v1-v5)
Definition: MWAWDocument.hxx:132
@ shadowBit
Definition: MWAWFont.hxx:191
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:158
std::multimap< long, PLC > m_plcMap
the text correspondance zone ( filepos, plc )
Definition: MsWrd1Parser.cxx:236
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
std::shared_ptr< MsWrd1ParserInternal::State > m_state
the state
Definition: MsWrd1Parser.hxx:132
std::vector< Paragraph > m_paragraphsList
the list of paragraph
Definition: MsWrd1Parser.cxx:230
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
std::ostream & operator<<(std::ostream &o, PLC const &plc)
Definition: MsWrd1Parser.cxx:86
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
Paragraph & operator=(Paragraph &&)=default
std::vector< int > m_headersId
the list of header id which corresponds to each page
Definition: MsWrd1Parser.cxx:240
Paragraph()
constructor
Definition: MsWrd1Parser.cxx:148
bool createZones()
finds the different zones
Definition: MsWrd1Parser.cxx:471
~MsWrd1Parser() final
destructor
Definition: MsWrd1Parser.cxx:304
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
@ PageBreak
Definition: MWAWListener.hxx:58
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: MsWrd1Parser.cxx:271
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MsWrd1Parser.cxx:395
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:76
a class which stores section properties
Definition: MWAWSection.hxx:46
Definition: libmwaw_internal.hxx:144
@ RULER
Definition: MsWrd1Parser.cxx:65
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
@ ZONE
Definition: MsWrd1Parser.cxx:65
double m_position
the tab position
Definition: MWAWParagraph.hxx:74
Font()
constructor
Definition: MsWrd1Parser.cxx:121
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
@ PAGE
Definition: MsWrd1Parser.cxx:65
MWAWFont m_font
the basic font property
Definition: MsWrd1Parser.cxx:130
virtual bool operator!=(MWAWSubDocument const &doc) const
comparison operator!=
Definition: MWAWSubDocument.cxx:49
void parse(librevenge::RVNGTextInterface *documentInterface) final
virtual function used to parse the input
Definition: MsWrd1Parser.cxx:348
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
int m_type2
another type
Definition: MsWrd1Parser.cxx:164
@ FOOTNOTE
Definition: MsWrd1Parser.cxx:65
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: MsWrd1Parser.cxx:1363
std::string m_extras
a string used to store the parsing extrass
Definition: MsWrd1Parser.cxx:134
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:1119
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
std::vector< MWAWVec2l > m_footnotesList
the footnote positions ( list of beginPos, endPos)
Definition: MsWrd1Parser.cxx:234
@ FONT
Definition: MsWrd1Parser.cxx:65
void removeLastCharIfEOL(MWAWEntry &entry)
shorten an entry if the last character is EOL
Definition: MsWrd1Parser.cxx:335
@ italicBit
Definition: MWAWFont.hxx:190
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
bool readFootnoteCorrespondance(MWAWVec2i limit)
try to read the footnote correspondance ( zone2 )
Definition: MsWrd1Parser.cxx:874
Defines MWAWTextListener: the libmwaw word processor listener.
~Paragraph() final
destructor
Definition: MsWrd1Parser.cxx:167
MWAWVec2< long > MWAWVec2l
MWAWVec2 of long.
Definition: libmwaw_internal.hxx:840
@ JustificationFull
Definition: MWAWParagraph.hxx:90
@ JustificationRight
Definition: MWAWParagraph.hxx:91
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:228
bool readZones(MWAWVec2i limit)
try to read the list of zones: separator between text and footnote? (zone 4)
Definition: MsWrd1Parser.cxx:935
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:630
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
int m_type
a unknown int, maybe 0x80 means defined font
Definition: MsWrd1Parser.cxx:132
Internal: the subdocument of a MsWrdParser.
Definition: MsWrd1Parser.cxx:248
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: MsWrd1Parser.cxx:260
bool readFont(long fPos, MsWrd1ParserInternal::Font &font)
try to read a char property
Definition: MsWrd1Parser.cxx:634
PLC(PLCType type=UNKNOWN)
constructor
Definition: MsWrd1Parser.cxx:70
@ FootNote
Definition: libmwaw_internal.hxx:447
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
Internal: the state of a MsWrd1Parser.
Definition: MsWrd1Parser.cxx:194
Definition: MWAWDocument.hxx:57
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
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:242
Class to store font.
Definition: MWAWFont.hxx:44
@ EndNote
Definition: libmwaw_internal.hxx:447
void sendMain()
try to send the main zone
Definition: MsWrd1Parser.cxx:377
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:190
void init()
inits all internal variables
Definition: MsWrd1Parser.cxx:308
std::vector< MWAWVec2l > m_textZonesList
the list of text zones
Definition: MsWrd1Parser.cxx:224
bool readDocInfo(MWAWVec2i limit)
try to read the document info (zone 3)
Definition: MsWrd1Parser.cxx:982
Paragraph(Paragraph const &)=default
Internal: the font of a MsWrd1Parser.
Definition: MsWrd1Parser.cxx:119
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
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
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:163
bool m_endNote
a flag to know if we send endnote or footnote
Definition: MsWrd1Parser.cxx:232
PLCType m_type
the type
Definition: MsWrd1Parser.cxx:79
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20