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:219
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
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:166
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
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:266
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:321
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:1221
std::vector< int > m_mainTextZonesList
the list of main text zones
Definition: MsWrd1Parser.cxx:225
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:161
Internal: the paragraph of a MsWrd1Parser.
Definition: MsWrd1Parser.cxx:146
int m_numColumns
the number of columns
Definition: MsWrd1Parser.cxx:217
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:64
the main class to read a Microsoft Word 1 file
Definition: MsWrd1Parser.hxx:57
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:170
@ CENTER
Definition: MWAWParagraph.hxx:48
bool readPageBreak(MWAWVec2i limit)
try to read the page break (zone 5)
Definition: MsWrd1Parser.cxx:828
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:128
State()
constructor
Definition: MsWrd1Parser.cxx:195
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:155
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:215
bool readParagraph(long fPos, MsWrd1ParserInternal::Paragraph ¶)
try to read a paragraph property
Definition: MsWrd1Parser.cxx:697
Paragraph & operator=(Paragraph const &)=default
class to store the paragraph properties
Definition: MWAWParagraph.hxx:84
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:191
@ Simple
Definition: MWAWFont.hxx:49
~SubDocument() final
destructor
Definition: MsWrd1Parser.cxx:256
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:41
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:147
int m_type
the initial type
Definition: MsWrd1Parser.cxx:161
void setProperty(MsWrd1ParserInternal::Paragraph const ¶)
send the ruler properties
Definition: MsWrd1Parser.cxx:1351
@ DECIMAL
Definition: MWAWParagraph.hxx:48
Internal: the structures of a MsWrd1Parser.
Definition: MsWrd1Parser.cxx:55
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:296
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:633
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:176
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:250
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:531
@ 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:235
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:229
const MWAWPageSpan & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
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
std::ostream & operator<<(std::ostream &o, PLC const &plc)
Definition: MsWrd1Parser.cxx:86
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:66
std::vector< int > m_headersId
the list of header id which corresponds to each page
Definition: MsWrd1Parser.cxx:239
Paragraph()
constructor
Definition: MsWrd1Parser.cxx:148
bool createZones()
finds the different zones
Definition: MsWrd1Parser.cxx:470
~MsWrd1Parser() final
destructor
Definition: MsWrd1Parser.cxx:303
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
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
@ PageBreak
Definition: MWAWListener.hxx:58
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: MsWrd1Parser.cxx:270
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MsWrd1Parser.cxx:394
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:45
Definition: libmwaw_internal.hxx:143
@ 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:82
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:71
const T & get() const
return the current value
Definition: libmwaw_internal.hxx:628
@ 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:347
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:201
int m_type2
another type
Definition: MsWrd1Parser.cxx:163
@ 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:1362
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:1118
long end() const
returns the end offset
Definition: MWAWEntry.hxx:87
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:233
@ FONT
Definition: MsWrd1Parser.cxx:65
void removeLastCharIfEOL(MWAWEntry &entry)
shorten an entry if the last character is EOL
Definition: MsWrd1Parser.cxx:334
@ 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:873
~Paragraph() final
destructor
Definition: MsWrd1Parser.cxx:166
MWAWVec2< long > MWAWVec2l
MWAWVec2 of long.
Definition: libmwaw_internal.hxx:838
@ 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:227
bool readZones(MWAWVec2i limit)
try to read the list of zones: separator between text and footnote? (zone 4)
Definition: MsWrd1Parser.cxx:934
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:98
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:246
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: MsWrd1Parser.cxx:259
bool readFont(long fPos, MsWrd1ParserInternal::Font &font)
try to read a char property
Definition: MsWrd1Parser.cxx:633
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:551
Internal: the state of a MsWrd1Parser.
Definition: MsWrd1Parser.cxx:193
Definition: MWAWDocument.hxx:56
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:211
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:241
Class to store font.
Definition: MWAWFont.hxx:43
@ EndNote
Definition: libmwaw_internal.hxx:447
void sendMain()
try to send the main zone
Definition: MsWrd1Parser.cxx:376
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:189
void init()
inits all internal variables
Definition: MsWrd1Parser.cxx:307
std::vector< MWAWVec2l > m_textZonesList
the list of text zones
Definition: MsWrd1Parser.cxx:223
bool readDocInfo(MWAWVec2i limit)
try to read the document info (zone 3)
Definition: MsWrd1Parser.cxx:981
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:97
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:231
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 Mar 25 2022 14:05:56 for libmwaw by
doxygen 1.8.17