Go to the documentation of this file.
38 #ifndef WRITER_PLS_PARSER
39 # define WRITER_PLS_PARSER
78 void parse(librevenge::RVNGTextInterface *documentInterface);
85 void createDocument(librevenge::RVNGTextInterface *documentInterface);
146 std::vector<WriterPlsParserInternal::Font> &fonts);
150 int nLines, std::vector<WriterPlsParserInternal::Line> &lines);
158 shared_ptr<WriterPlsParserInternal::State>
m_state;
std::vector< int > m_unknowns
Definition: WriterPlsParser.cxx:228
bool readFonts(int nFonts, int type, std::vector< WriterPlsParserInternal::Font > &fonts)
reads a list of font (with position)
Definition: WriterPlsParser.cxx:1843
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:296
int m_col
Definition: WriterPlsParser.cxx:101
int m_numCol
the number of columns(?)
Definition: WriterPlsParser.cxx:453
int m_colX[2]
Definition: WriterPlsParser.cxx:125
ReadResult
an enum to defined the result of a parsing use by some picture's classes which can read their data
Definition: MWAWPict.hxx:73
Line()
Definition: WriterPlsParser.cxx:372
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:293
bool readParagraphInfo(int zone)
read the paragraph info zone
Definition: WriterPlsParser.cxx:1291
shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:519
int m_height2
Definition: WriterPlsParser.cxx:225
PageInfo()
Definition: WriterPlsParser.cxx:62
int m_width
the first character
Definition: WriterPlsParser.cxx:415
Paragraph informations.
Definition: WriterPlsParser.cxx:131
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:262
bool readColInfo(int zone)
read the col info zone ?
Definition: WriterPlsParser.cxx:1357
ParagraphInfo()
Definition: WriterPlsParser.cxx:132
ColumnTableInfo()
Definition: WriterPlsParser.cxx:106
int m_height
Definition: WriterPlsParser.cxx:123
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
bool getColumnLimitsFor(int line, std::vector< int > &listPos)
Definition: WriterPlsParser.cxx:284
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
int m_height
Definition: WriterPlsParser.cxx:519
@ ColumnBreak
Definition: MWAWListener.hxx:58
void setId(int vid)
sets the subdocument id
Definition: WriterPlsParser.cxx:580
bool readTable(WriterPlsParserInternal::ParagraphInfo const &info)
read a table
Definition: WriterPlsParser.cxx:1535
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
int m_unknown[3]
Definition: WriterPlsParser.cxx:255
int m_firstChar
the first character
Definition: WriterPlsParser.cxx:389
int m_number
Definition: WriterPlsParser.cxx:252
Internal: class to store the Graphic properties.
Definition: WriterPlsParser.cxx:398
int m_height
Definition: WriterPlsParser.cxx:225
Internal: the subdocument of a WriterPlsParser.
Definition: WriterPlsParser.cxx:550
int m_graphicWidth
the graphic width
Definition: WriterPlsParser.cxx:415
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:221
int getType() const
Definition: WriterPlsParser.cxx:138
int m_heightFromBegin
Definition: WriterPlsParser.cxx:78
int m_flags
Definition: WriterPlsParser.cxx:127
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:163
Column informations in a table.
Definition: WriterPlsParser.cxx:105
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:117
ParagraphData()
Constructor.
Definition: WriterPlsParser.cxx:464
@ boldBit
Definition: MWAWFont.hxx:182
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
int m_flags[4]
some flag
Definition: WriterPlsParser.cxx:457
bool readText(WriterPlsParserInternal::ParagraphInfo const &info)
read a text
Definition: WriterPlsParser.cxx:1395
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:123
Page informations.
Definition: WriterPlsParser.cxx:61
Internal: class to store the line properties.
Definition: WriterPlsParser.cxx:371
friend std::ostream & operator<<(std::ostream &o, Line const &l)
operator<<
Definition: WriterPlsParser.cxx:378
int m_dim[3]
unknown dimension
Definition: WriterPlsParser.cxx:455
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:202
friend std::ostream & operator<<(std::ostream &o, WindowsInfo const &w)
Definition: WriterPlsParser.cxx:323
small class use to define a embedded object
Definition: libmwaw_internal.hxx:425
Internal: the structures of a WriterPlsParser.
Definition: WriterPlsParser.cxx:59
bool empty() const
Definition: WriterPlsParser.cxx:238
int m_width
Definition: WriterPlsParser.cxx:254
std::ostream & operator<<(std::ostream &o, WindowsInfo const &w)
Definition: WriterPlsParser.cxx:323
GraphicInfo()
Definition: WriterPlsParser.cxx:399
int m_maxFontSize
Definition: WriterPlsParser.cxx:391
int m_footerY
Definition: WriterPlsParser.cxx:275
void init()
inits all internal variables
Definition: WriterPlsParser.cxx:628
class to store the paragraph properties
Definition: MWAWParagraph.hxx:82
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:187
int m_type
Definition: WriterPlsParser.cxx:223
int m_height
Definition: WriterPlsParser.cxx:101
@ Simple
Definition: MWAWFont.hxx:49
int m_type
Definition: WriterPlsParser.cxx:518
int m_headerY
Definition: WriterPlsParser.cxx:275
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
int m_unknown[4]
Definition: WriterPlsParser.cxx:100
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
SectionInfo()
Definition: WriterPlsParser.cxx:423
friend std::ostream & operator<<(std::ostream &o, Zone const &z)
Definition: WriterPlsParser.cxx:242
void newPage(int number)
adds a new page
Definition: WriterPlsParser.cxx:650
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
double getMarginLeft() const
returns the left margin
Definition: MWAWPageSpan.hxx:126
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:142
std::vector< Font > m_fonts
Definition: WriterPlsParser.cxx:524
int m_flags[6]
Definition: WriterPlsParser.cxx:227
long m_endPos
Definition: WriterPlsParser.cxx:526
virtual bool operator!=(MWAWSubDocument const &doc) const
operator!=
Definition: WriterPlsParser.cxx:559
virtual bool operator==(MWAWSubDocument const &doc) const
operator!==
Definition: WriterPlsParser.cxx:569
void setNaturalSize(MWAWVec2f const &naturalSz)
sets the natural size (if known)
Definition: MWAWPosition.hxx:204
int m_size
Definition: WriterPlsParser.cxx:253
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
MWAWFont m_font
the font
Definition: WriterPlsParser.cxx:364
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:127
@ embossBit
Definition: MWAWFont.hxx:182
int m_flags[4]
the maximum font size
Definition: WriterPlsParser.cxx:393
int numColumns() const
returns the number of columns
Definition: MWAWSection.hxx:63
virtual ~SubDocument()
destructor
Definition: WriterPlsParser.cxx:556
@ TableDimBit
Definition: MWAWTable.hxx:56
WindowsInfo()
Definition: WriterPlsParser.cxx:260
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
friend std::ostream & operator<<(std::ostream &o, GraphicInfo const &g)
operator<<
Definition: WriterPlsParser.cxx:405
int m_width
Definition: WriterPlsParser.cxx:225
friend std::ostream & operator<<(std::ostream &o, Font const &f)
operator<<
Definition: WriterPlsParser.cxx:358
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:172
int m_height
Definition: WriterPlsParser.cxx:78
double getTextHeight() const
returns the page height, ie. paper size less margin (in inches) and header/footer
Definition: WriterPlsParser.cxx:642
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWParser.hxx:185
int m_footerHeight
the footer height if known
Definition: WriterPlsParser.cxx:544
static ReadResult check(MWAWInputStreamPtr input, int size, MWAWBox2f &box)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:100
SubDocumentType
Definition: libmwaw_internal.hxx:178
int m_firstChar
the first character
Definition: WriterPlsParser.cxx:366
std::vector< ColumnInfo > m_columns
Definition: WriterPlsParser.cxx:277
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:85
std::string m_extra
extra data
Definition: MWAWFont.hxx:552
@ MWAW_T_WRITERPLUS
WriterPlus.
Definition: MWAWDocument.hxx:157
@ shadowBit
Definition: MWAWFont.hxx:183
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:146
WindowsInfo m_windows[3]
the information ( 0: main, 1: header, 2: footer)
Definition: WriterPlsParser.cxx:541
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:105
bool readWindowsZone(int zone)
read the page info zone
Definition: WriterPlsParser.cxx:924
int m_unknown
Definition: WriterPlsParser.cxx:521
T y() const
second element
Definition: libmwaw_internal.hxx:620
virtual ~WriterPlsParser()
destructor
Definition: WriterPlsParser.cxx:624
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:177
Windows informations.
Definition: WriterPlsParser.cxx:232
int m_firstLine
Definition: WriterPlsParser.cxx:76
shared_ptr< WriterPlsParserInternal::State > m_state
the state
Definition: WriterPlsParser.hxx:158
T x() const
first element
Definition: libmwaw_internal.hxx:615
int m_numPages
the number of page of the final document
Definition: WriterPlsParser.cxx:538
friend std::ostream & operator<<(std::ostream &o, ColumnInfo const &c)
Definition: WriterPlsParser.cxx:87
bool readWindowsInfo(int zone)
read the main info for zone ( 0: MAIN ZONE, 1 : HEADER, 2 : FOOTER )
Definition: WriterPlsParser.cxx:799
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
int m_width
Definition: WriterPlsParser.cxx:519
std::vector< Column > m_columns
the different column
Definition: MWAWSection.hxx:100
int getId() const
returns the subdocument id
Definition: WriterPlsParser.cxx:575
Internal: class to store the beginning of all paragraph data.
Definition: WriterPlsParser.cxx:462
double getPageLength() const
returns the page length (form width without margin )
Definition: MWAWPageSpan.hxx:146
double m_width
the columns width
Definition: MWAWSection.hxx:141
struct to store the columns properties
Definition: MWAWSection.hxx:112
friend std::ostream & operator<<(std::ostream &o, ColumnTableInfo const &c)
Definition: WriterPlsParser.cxx:111
@ PageBreak
Definition: MWAWListener.hxx:58
a class used to recreate the table structure using cell informations, ....
Definition: MWAWTable.hxx:52
@ MWAW_R_BAD
Definition: MWAWPict.hxx:73
a class which stores section properties
Definition: MWAWSection.hxx:46
Definition: libmwaw_internal.hxx:142
bool dimensionInvalid() const
Definition: WriterPlsParser.cxx:265
friend std::ostream & operator<<(std::ostream &o, ParagraphInfo const &p)
Definition: WriterPlsParser.cxx:143
int m_height
the height
Definition: WriterPlsParser.cxx:390
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
friend std::ostream & operator<<(std::ostream &o, SectionInfo const &s)
operator<<
Definition: WriterPlsParser.cxx:439
void setColsSize(std::vector< float > const &cSize)
define the columns size (in point)
Definition: MWAWTable.hxx:121
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: WriterPlsParser.cxx:771
Zone m_zone[7]
Definition: WriterPlsParser.cxx:281
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
MWAWVec2i m_pageDim
Definition: WriterPlsParser.cxx:274
State()
constructor
Definition: WriterPlsParser.cxx:534
std::vector< ParagraphInfo > m_paragraphs
Definition: WriterPlsParser.cxx:278
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:197
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:218
@ Char
Definition: MWAWPosition.hxx:51
int m_indent[2]
Definition: WriterPlsParser.cxx:520
bool createZones()
finds the different objects zones
Definition: WriterPlsParser.cxx:736
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
friend std::ostream & operator<<(std::ostream &o, PageInfo const &p)
Definition: WriterPlsParser.cxx:66
int m_typeFlag
Definition: WriterPlsParser.cxx:518
void parse(librevenge::RVNGTextInterface *documentInterface)
virtual function used to parse the input
Definition: WriterPlsParser.cxx:668
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:254
std::vector< PageInfo > m_pages
Definition: WriterPlsParser.cxx:276
bool readPageInfo(int zone)
read the page info zone
Definition: WriterPlsParser.cxx:1222
Internal: the state of a WriterPlsParser.
Definition: WriterPlsParser.cxx:532
bool readGraphic(WriterPlsParserInternal::ParagraphInfo const &info)
read a graphic
Definition: WriterPlsParser.cxx:1604
@ italicBit
Definition: MWAWFont.hxx:182
librevenge::RVNGUnit m_widthUnit
the width unit (default inches)
Definition: MWAWSection.hxx:143
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:144
bool readParagraphData(WriterPlsParserInternal::ParagraphInfo const &info, bool hasFonts, WriterPlsParserInternal::ParagraphData &data)
reads a paragraph data
Definition: WriterPlsParser.cxx:1765
bool empty() const
Definition: WriterPlsParser.cxx:429
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type)
the parser function
Definition: WriterPlsParser.cxx:593
bool readUnknown(WriterPlsParserInternal::ParagraphInfo const &info)
read a unknown section
Definition: WriterPlsParser.cxx:1724
int m_textX[3]
Definition: WriterPlsParser.cxx:126
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
Column informations.
Definition: WriterPlsParser.cxx:82
int m_id
the subdocument id
Definition: WriterPlsParser.cxx:590
@ Left
Definition: MWAWTable.hxx:62
friend std::ostream & operator<<(std::ostream &o, ParagraphData const &p)
operator<<
Definition: WriterPlsParser.cxx:471
int m_numData[2]
Definition: WriterPlsParser.cxx:527
long m_pos
Definition: WriterPlsParser.cxx:222
int m_numData
Definition: WriterPlsParser.cxx:124
bool readSection(WriterPlsParserInternal::ParagraphInfo const &info, bool mainBlock)
read a section
Definition: WriterPlsParser.cxx:1478
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
void setStream(MWAWInputStreamPtr ip)
resets the input
Definition: MWAWDebug.hxx:73
the main class to read a Writerperfect file
Definition: WriterPlsParser.hxx:65
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:192
int m_unknown[2]
Definition: WriterPlsParser.cxx:77
std::vector< int > m_linesHeight
Definition: WriterPlsParser.cxx:226
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_numCol
Definition: WriterPlsParser.cxx:101
int m_numLines
Definition: WriterPlsParser.cxx:225
int m_width
the width
Definition: WriterPlsParser.cxx:390
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1008
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: WriterPlsParser.cxx:700
ColumnInfo()
Definition: WriterPlsParser.cxx:83
WriterPlsParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: WriterPlsParser.cxx:618
bool readPrintInfo()
read the print info zone
Definition: WriterPlsParser.cxx:1948
MWAWParagraph getParagraph(WriterPlsParserInternal::ParagraphData const &data)
returns a paragraph corresponding to a paragraph data
Definition: WriterPlsParser.cxx:1273
int m_headerHeight
the header height if known
Definition: WriterPlsParser.cxx:543
bool sendWindow(int zone, MWAWVec2i limits=MWAWVec2i(-1,-1))
send a zone ( 0: MAIN ZONE, 1 : HEADER, 2 : FOOTER )
Definition: WriterPlsParser.cxx:1019
int m_actPage
the actual page
Definition: WriterPlsParser.cxx:538
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:207
Internal: class to store the font properties.
Definition: WriterPlsParser.cxx:352
Internal: class to store the Section properties.
Definition: WriterPlsParser.cxx:422
Class to store font.
Definition: MWAWFont.hxx:44
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
int m_flags[7]
some flag
Definition: WriterPlsParser.cxx:417
Definition: WriterPlsParser.cxx:233
std::string m_text
Definition: WriterPlsParser.cxx:523
void setAlignment(Alignment align, float leftMargin=0, float rightMargin=0)
defines the current alignment
Definition: MWAWTable.hxx:94
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
Font()
Definition: WriterPlsParser.cxx:353
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
static MWAWPictData * get(MWAWInputStreamPtr input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
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
Zone()
Definition: WriterPlsParser.cxx:234
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 findSection(int zone, MWAWVec2i limits, MWAWSection &sec)
try to find the data which correspond to a section ( mainly column )
Definition: WriterPlsParser.cxx:1163
SubDocument(WriterPlsParser &pars, MWAWInputStreamPtr input, int zoneId)
Definition: WriterPlsParser.cxx:552
bool readLines(WriterPlsParserInternal::ParagraphInfo const &info, int nLines, std::vector< WriterPlsParserInternal::Line > &lines)
reads a list of line (with position)
Definition: WriterPlsParser.cxx:1917
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:304
int m_firstLine
Definition: WriterPlsParser.cxx:99
Generated on Wed Jun 17 2020 06:30:13 for libmwaw by
doxygen 1.8.18