WriterPlsParser.hxx Source File documentation

WriterPlsParser.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
2
3 /* libmwaw
4 * Version: MPL 2.0 / LGPLv2+
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 2.0 (the "License"); you may not use this file except in compliance with
8 * the License or as specified alternatively below. You may obtain a copy of
9 * the License at http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * Major Contributor(s):
17 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
18 * Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
19 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
20 * Copyright (C) 2006, 2007 Andrew Ziem
21 * Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
22 *
23 *
24 * All Rights Reserved.
25 *
26 * For minor contributions see the git repository.
27 *
28 * Alternatively, the contents of this file may be used under the terms of
29 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
30 * in which case the provisions of the LGPLv2+ are applicable
31 * instead of those above.
32 */
33
34 /*
35 * Parser to convert some WriterPlus text document ( a french text editor )
36 *
37 */
38 #ifndef WRITER_PLS_PARSER
39 # define WRITER_PLS_PARSER
40
41 #include <vector>
42
43 #include "MWAWDebug.hxx"
44 #include "MWAWEntry.hxx"
45 #include "MWAWInputStream.hxx"
46
47 #include "MWAWParser.hxx"
48
49 namespace WriterPlsParserInternal
50 {
51 struct State;
52 struct Font;
53 struct Line;
54 struct ParagraphData;
55 struct ParagraphInfo;
56 class SubDocument;
57 }
58
64 class WriterPlsParser final : public MWAWTextParser
65 {
66 friend class WriterPlsParserInternal::SubDocument;
67
68 public:
70 WriterPlsParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
72 ~WriterPlsParser() final;
73
75 bool checkHeader(MWAWHeader *header, bool strict=false) final;
76
77 // the main parse function
78 void parse(librevenge::RVNGTextInterface *documentInterface) final;
79
80 protected:
82 void init();
83
85 void createDocument(librevenge::RVNGTextInterface *documentInterface);
86
88 bool createZones();
89
91 bool readPrintInfo();
92
94 bool readWindowsInfo(int zone);
95
97 bool sendWindow(int zone, MWAWVec2i limits = MWAWVec2i(-1,-1));
98
100 bool readWindowsZone(int zone);
101
103 bool readPageInfo(int zone);
104
106 bool readColInfo(int zone);
107
109 bool readParagraphInfo(int zone);
110
112 bool findSection(int zone, MWAWVec2i limits, MWAWSection &sec);
113
115 bool readSection(WriterPlsParserInternal::ParagraphInfo const &info, bool mainBlock);
116
118 bool readText(WriterPlsParserInternal::ParagraphInfo const &info);
119
121 bool readTable(WriterPlsParserInternal::ParagraphInfo const &info);
122
124 bool readGraphic(WriterPlsParserInternal::ParagraphInfo const &info);
125
127 bool readUnknown(WriterPlsParserInternal::ParagraphInfo const &info);
128
130 double getTextHeight() const;
131
133 void newPage(int number);
134
135 //
136 // low level
137 //
138
140 bool readParagraphData(WriterPlsParserInternal::ParagraphInfo const &info, bool hasFonts,
141 WriterPlsParserInternal::ParagraphData &data);
143 MWAWParagraph getParagraph(WriterPlsParserInternal::ParagraphData const &data);
145 bool readFonts(int nFonts, int type,
146 std::vector<WriterPlsParserInternal::Font> &fonts);
147
149 bool readLines(WriterPlsParserInternal::ParagraphInfo const &info,
150 int nLines, std::vector<WriterPlsParserInternal::Line> &lines);
151
152 protected:
153 //
154 // data
155 //
156
158 std::shared_ptr<WriterPlsParserInternal::State> m_state;
159 };
160 #endif
161 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
WriterPlsParserInternal::ParagraphInfo::m_unknowns
std::vector< int > m_unknowns
Definition: WriterPlsParser.cxx:244
WriterPlsParser::readFonts
bool readFonts(int nFonts, int type, std::vector< WriterPlsParserInternal::Font > &fonts)
reads a list of font (with position)
Definition: WriterPlsParser.cxx:1868
MWAWTextListenerPtr
std::shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:567
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
HanMacWrdKTextInternal::getSection
static Section getSection(const State &state, const long id)
Definition: HanMacWrdKText.cxx:272
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
MWAWTextParser
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:298
WriterPlsParserInternal::ColumnInfo::m_col
int m_col
Definition: WriterPlsParser.cxx:108
WriterPlsParserInternal::SectionInfo::m_numCol
int m_numCol
the number of columns(?)
Definition: WriterPlsParser.cxx:488
WriterPlsParserInternal::ColumnTableInfo::m_colX
int m_colX[2]
Definition: WriterPlsParser.cxx:135
WriterPlsParserInternal::Line::Line
Line()
Definition: WriterPlsParser.cxx:400
MWAWParser::getFontConverter
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
MWAWFont::set
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
WriterPlsParser::readParagraphInfo
bool readParagraphInfo(int zone)
read the paragraph info zone
Definition: WriterPlsParser.cxx:1320
WriterPlsParserInternal::ParagraphInfo::m_height2
int m_height2
Definition: WriterPlsParser.cxx:241
WriterPlsParserInternal::PageInfo::PageInfo
PageInfo()
Definition: WriterPlsParser.cxx:62
WriterPlsParserInternal::GraphicInfo::m_width
int m_width
the first character
Definition: WriterPlsParser.cxx:449
WriterPlsParserInternal::ParagraphInfo
Paragraph informations.
Definition: WriterPlsParser.cxx:141
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
WriterPlsParser::readColInfo
bool readColInfo(int zone)
read the col info zone ?
Definition: WriterPlsParser.cxx:1386
WriterPlsParserInternal::ParagraphInfo::ParagraphInfo
ParagraphInfo()
Definition: WriterPlsParser.cxx:142
WriterPlsParserInternal::ColumnTableInfo::ColumnTableInfo
ColumnTableInfo()
Definition: WriterPlsParser.cxx:113
WriterPlsParserInternal::ColumnTableInfo::m_height
int m_height
Definition: WriterPlsParser.cxx:133
MWAWHeaderFooter::HEADER
@ HEADER
Definition: MWAWPageSpan.hxx:48
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
WriterPlsParserInternal::WindowsInfo::getColumnLimitsFor
bool getColumnLimitsFor(int line, std::vector< int > &listPos)
Definition: WriterPlsParser.cxx:308
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
WriterPlsParserInternal::ParagraphData::m_height
int m_height
Definition: WriterPlsParser.cxx:561
MWAWListener::ColumnBreak
@ ColumnBreak
Definition: MWAWListener.hxx:58
WriterPlsParser::readTable
bool readTable(WriterPlsParserInternal::ParagraphInfo const &info)
read a table
Definition: WriterPlsParser.cxx:1563
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
WriterPlsParser::parse
void parse(librevenge::RVNGTextInterface *documentInterface) final
virtual function used to parse the input
Definition: WriterPlsParser.cxx:700
WriterPlsParserInternal::WindowsInfo::Zone::m_unknown
int m_unknown[3]
Definition: WriterPlsParser.cxx:274
WriterPlsParserInternal::Line::m_firstChar
int m_firstChar
the first character
Definition: WriterPlsParser.cxx:421
WriterPlsParserInternal::WindowsInfo::Zone::m_number
int m_number
Definition: WriterPlsParser.cxx:271
WriterPlsParserInternal::GraphicInfo
Internal: class to store the Graphic properties.
Definition: WriterPlsParser.cxx:430
WriterPlsParserInternal::ParagraphInfo::m_height
int m_height
Definition: WriterPlsParser.cxx:241
WriterPlsParserInternal::SubDocument
Internal: the subdocument of a WriterPlsParser.
Definition: WriterPlsParser.cxx:595
WriterPlsParserInternal::GraphicInfo::m_graphicWidth
int m_graphicWidth
the graphic width
Definition: WriterPlsParser.cxx:449
MWAWPosition::setRelativePosition
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
WriterPlsParserInternal::ParagraphInfo::getType
int getType() const
Definition: WriterPlsParser.cxx:154
WriterPlsParserInternal::PageInfo::m_heightFromBegin
int m_heightFromBegin
Definition: WriterPlsParser.cxx:81
WriterPlsParserInternal::ColumnTableInfo::m_flags
int m_flags
Definition: WriterPlsParser.cxx:137
MWAWCell::setPosition
void setPosition(MWAWVec2i posi)
set the cell positions : 0,0 -> A1, 0,1 -> A2
Definition: MWAWCell.hxx:189
WriterPlsParserInternal::ColumnTableInfo
Column informations in a table.
Definition: WriterPlsParser.cxx:112
MWAWFont::Script::sub100
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:125
WriterPlsParserInternal::ParagraphData::ParagraphData
ParagraphData()
Constructor.
Definition: WriterPlsParser.cxx:499
MWAWFont::boldBit
@ boldBit
Definition: MWAWFont.hxx:190
MWAWTextListener
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:64
WriterPlsParserInternal::SectionInfo::m_flags
int m_flags[4]
some flag
Definition: WriterPlsParser.cxx:492
WriterPlsParser::readText
bool readText(WriterPlsParserInternal::ParagraphInfo const &info)
read a text
Definition: WriterPlsParser.cxx:1424
MWAWTable.hxx
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
MWAWParagraph::setInterline
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
WriterPlsParserInternal::PageInfo
Page informations.
Definition: WriterPlsParser.cxx:61
WriterPlsParserInternal::Line
Internal: class to store the line properties.
Definition: WriterPlsParser.cxx:399
WriterPlsParserInternal::Line::operator<<
friend std::ostream & operator<<(std::ostream &o, Line const &l)
operator<<
Definition: WriterPlsParser.cxx:410
MWAWEntry.hxx
WriterPlsParserInternal::SectionInfo::m_dim
int m_dim[3]
unknown dimension
Definition: WriterPlsParser.cxx:490
WriterPlsParser.hxx
MWAWPageSpan::setMarginBottom
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
WriterPlsParserInternal::WindowsInfo::operator<<
friend std::ostream & operator<<(std::ostream &o, WindowsInfo const &w)
Definition: WriterPlsParser.cxx:349
MWAWFontConverter.hxx
MWAWEmbeddedObject
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
WriterPlsParserInternal
Internal: the structures of a WriterPlsParser.
Definition: WriterPlsParser.cxx:58
WriterPlsParserInternal::WindowsInfo::Zone::empty
bool empty() const
Definition: WriterPlsParser.cxx:257
WriterPlsParserInternal::WindowsInfo::Zone::m_width
int m_width
Definition: WriterPlsParser.cxx:273
WriterPlsParserInternal::operator<<
std::ostream & operator<<(std::ostream &o, WindowsInfo const &w)
Definition: WriterPlsParser.cxx:349
WriterPlsParserInternal::GraphicInfo::GraphicInfo
GraphicInfo()
Definition: WriterPlsParser.cxx:431
WriterPlsParserInternal::Line::m_maxFontSize
int m_maxFontSize
Definition: WriterPlsParser.cxx:423
WriterPlsParserInternal::WindowsInfo::m_footerY
int m_footerY
Definition: WriterPlsParser.cxx:299
MWAWPrinter.hxx
WriterPlsParser::init
void init()
inits all internal variables
Definition: WriterPlsParser.cxx:660
MWAWParagraph
class to store the paragraph properties
Definition: MWAWParagraph.hxx:84
MWAWPageSpan::setMarginLeft
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
WriterPlsParserInternal::ParagraphInfo::m_type
int m_type
Definition: WriterPlsParser.cxx:239
WriterPlsParserInternal::ColumnInfo::m_height
int m_height
Definition: WriterPlsParser.cxx:108
MWAWFont::Line::Simple
@ Simple
Definition: MWAWFont.hxx:49
WriterPlsParserInternal::ParagraphData::m_type
int m_type
Definition: WriterPlsParser.cxx:560
MWAW_FALLTHROUGH
#define MWAW_FALLTHROUGH
Definition: libmwaw_internal.hxx:118
MWAWPictData::get
static MWAWPictData * get(MWAWInputStreamPtr const &input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
MWAWHeaderFooter::m_subDocument
MWAWSubDocumentPtr m_subDocument
the document data
Definition: MWAWPageSpan.hxx:92
WriterPlsParserInternal::WindowsInfo::m_headerY
int m_headerY
Definition: WriterPlsParser.cxx:299
libmwaw::PrinterInfo
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
WriterPlsParserInternal::ColumnInfo::m_unknown
int m_unknown[4]
Definition: WriterPlsParser.cxx:107
MWAWParser::getTextListener
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
WriterPlsParserInternal::SectionInfo::SectionInfo
SectionInfo()
Definition: WriterPlsParser.cxx:457
WriterPlsParserInternal::WindowsInfo::Zone::operator<<
friend std::ostream & operator<<(std::ostream &o, Zone const &z)
Definition: WriterPlsParser.cxx:261
WriterPlsParser::newPage
void newPage(int number)
adds a new page
Definition: WriterPlsParser.cxx:682
libmwaw::DebugFile::addNote
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
MWAWSubDocument
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:41
MWAWPageSpan::getMarginLeft
double getMarginLeft() const
returns the left margin
Definition: MWAWPageSpan.hxx:132
MWAWParagraph::m_margins
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
WriterPlsParserInternal::ParagraphData::m_fonts
std::vector< Font > m_fonts
Definition: WriterPlsParser.cxx:566
WriterPlsParserInternal::ParagraphInfo::m_flags
int m_flags[6]
Definition: WriterPlsParser.cxx:243
WriterPlsParserInternal::ParagraphData::m_endPos
long m_endPos
Definition: WriterPlsParser.cxx:568
MWAWPosition::setNaturalSize
void setNaturalSize(MWAWVec2f const &naturalSz)
sets the natural size (if known)
Definition: MWAWPosition.hxx:220
WriterPlsParserInternal::WindowsInfo::Zone::m_size
int m_size
Definition: WriterPlsParser.cxx:272
MWAWParser::ascii
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
WriterPlsParserInternal::Font::m_font
MWAWFont m_font
the font
Definition: WriterPlsParser.cxx:392
MWAWFont::Script::super100
static Script super100()
return a yposition which correspond to a basic superscript100
Definition: MWAWFont.hxx:135
MWAWFont::embossBit
@ embossBit
Definition: MWAWFont.hxx:190
WriterPlsParserInternal::Line::m_flags
int m_flags[4]
the maximum font size
Definition: WriterPlsParser.cxx:425
MWAWSection::numColumns
int numColumns() const
returns the number of columns
Definition: MWAWSection.hxx:71
MWAWHeaderFooter
a class which stores the header/footer data
Definition: MWAWPageSpan.hxx:44
MWAWCell.hxx
MWAWTable::TableDimBit
@ TableDimBit
Definition: MWAWTable.hxx:56
WriterPlsParserInternal::WindowsInfo::WindowsInfo
WindowsInfo()
Definition: WriterPlsParser.cxx:279
WriterPlsParserInternal::GraphicInfo::operator<<
friend std::ostream & operator<<(std::ostream &o, GraphicInfo const &g)
operator<<
Definition: WriterPlsParser.cxx:439
WriterPlsParserInternal::ParagraphInfo::m_width
int m_width
Definition: WriterPlsParser.cxx:241
MWAWSubDocument.hxx
WriterPlsParserInternal::Font::operator<<
friend std::ostream & operator<<(std::ostream &o, Font const &f)
operator<<
Definition: WriterPlsParser.cxx:386
MWAWPageSpan::setFormLength
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
WriterPlsParserInternal::PageInfo::m_height
int m_height
Definition: WriterPlsParser.cxx:81
WriterPlsParser::getTextHeight
double getTextHeight() const
returns the page height, ie. paper size less margin (in inches) and header/footer
Definition: WriterPlsParser.cxx:674
MWAWParser::getPageWidth
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWParser.hxx:185
WriterPlsParserInternal::State::m_footerHeight
int m_footerHeight
the footer height if known
Definition: WriterPlsParser.cxx:590
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:188
WriterPlsParserInternal::Font::m_firstChar
int m_firstChar
the first character
Definition: WriterPlsParser.cxx:394
MWAWSubDocument::m_input
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
WriterPlsParserInternal::WindowsInfo::m_columns
std::vector< ColumnInfo > m_columns
Definition: WriterPlsParser.cxx:301
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
MWAWFont::m_extra
std::string m_extra
extra data
Definition: MWAWFont.hxx:573
MWAWDocument::MWAW_T_WRITERPLUS
@ MWAW_T_WRITERPLUS
WriterPlus.
Definition: MWAWDocument.hxx:157
MWAWFont::shadowBit
@ shadowBit
Definition: MWAWFont.hxx:191
MWAWParser::setTextListener
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:158
WriterPlsParserInternal::State::m_windows
WindowsInfo m_windows[3]
the information ( 0: main, 1: header, 2: footer)
Definition: WriterPlsParser.cxx:587
MWAWParser::setAsciiName
void setAsciiName(char const *name)
Debugging: change the default ascii file.
Definition: MWAWParser.hxx:227
MWAWParagraph.hxx
libmwaw::DebugFile::skipZone
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
WriterPlsParser::readWindowsZone
bool readWindowsZone(int zone)
read the page info zone
Definition: WriterPlsParser.cxx:955
WriterPlsParserInternal::ParagraphData::m_unknown
int m_unknown
Definition: WriterPlsParser.cxx:563
MWAWVec2::y
T y() const
second element
Definition: libmwaw_internal.hxx:673
WriterPlsParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: WriterPlsParser.cxx:803
MWAWParser::getPageSpan
const MWAWPageSpan & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
WriterPlsParser::~WriterPlsParser
~WriterPlsParser() final
destructor
Definition: WriterPlsParser.cxx:656
MWAWPageSpan::setFormWidth
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
MWAWPosition.hxx
WriterPlsParserInternal::WindowsInfo
Windows informations.
Definition: WriterPlsParser.cxx:248
WriterPlsParserInternal::PageInfo::m_firstLine
int m_firstLine
Definition: WriterPlsParser.cxx:79
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:668
WriterPlsParserInternal::State::m_numPages
int m_numPages
the number of page of the final document
Definition: WriterPlsParser.cxx:584
WriterPlsParserInternal::ColumnInfo::operator<<
friend std::ostream & operator<<(std::ostream &o, ColumnInfo const &c)
Definition: WriterPlsParser.cxx:94
WriterPlsParser::readWindowsInfo
bool readWindowsInfo(int zone)
read the main info for zone ( 0: MAIN ZONE, 1 : HEADER, 2 : FOOTER )
Definition: WriterPlsParser.cxx:831
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:47
WriterPlsParserInternal::ParagraphData::m_width
int m_width
Definition: WriterPlsParser.cxx:561
MWAWSection::m_columns
std::vector< Column > m_columns
the different column
Definition: MWAWSection.hxx:108
WriterPlsParserInternal::ParagraphData
Internal: class to store the beginning of all paragraph data.
Definition: WriterPlsParser.cxx:497
MWAWParser::asciiName
const std::string & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
MWAWRSRCParserPtr
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
MWAWPageSpan::getPageLength
double getPageLength() const
returns the page length (form width without margin )
Definition: MWAWPageSpan.hxx:152
MWAWSection::Column::m_width
double m_width
the columns width
Definition: MWAWSection.hxx:150
MWAWSection::Column
struct to store the columns properties
Definition: MWAWSection.hxx:120
WriterPlsParserInternal::ColumnTableInfo::operator<<
friend std::ostream & operator<<(std::ostream &o, ColumnTableInfo const &c)
Definition: WriterPlsParser.cxx:121
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
MWAWTable
a class used to recreate the table structure using cell informations, ....
Definition: MWAWTable.hxx:51
libmwaw::DebugFile::setStream
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
MWAWPict::MWAW_R_BAD
@ MWAW_R_BAD
Definition: MWAWPict.hxx:73
MWAWVec2< int >
MWAWPictMac.hxx
MWAWSection
a class which stores section properties
Definition: MWAWSection.hxx:45
libmwaw::ParseException
Definition: libmwaw_internal.hxx:143
MWAWDebug.hxx
WriterPlsParserInternal::WindowsInfo::dimensionInvalid
bool dimensionInvalid() const
Definition: WriterPlsParser.cxx:289
MWAWHeader
a function used by MWAWDocument to store the version of document
Definition: MWAWHeader.hxx:56
WriterPlsParserInternal::ParagraphInfo::operator<<
friend std::ostream & operator<<(std::ostream &o, ParagraphInfo const &p)
Definition: WriterPlsParser.cxx:159
WriterPlsParserInternal::Line::m_height
int m_height
the height
Definition: WriterPlsParser.cxx:422
WriterPlsParserInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: WriterPlsParser.cxx:604
WriterPlsParserInternal::SectionInfo::operator<<
friend std::ostream & operator<<(std::ostream &o, SectionInfo const &s)
operator<<
Definition: WriterPlsParser.cxx:474
MWAWTable::setColsSize
void setColsSize(std::vector< float > const &cSize)
define the columns size (in point)
Definition: MWAWTable.hxx:133
WriterPlsParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: WriterPlsParser.cxx:624
WriterPlsParserInternal::WindowsInfo::m_zone
Zone m_zone[7]
Definition: WriterPlsParser.cxx:305
MWAWFont::setId
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
WriterPlsParserInternal::WindowsInfo::m_pageDim
MWAWVec2i m_pageDim
Definition: WriterPlsParser.cxx:298
WriterPlsParserInternal::State::State
State()
constructor
Definition: WriterPlsParser.cxx:576
WriterPlsParser::WriterPlsParser
WriterPlsParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: WriterPlsParser.cxx:649
WriterPlsParserInternal::WindowsInfo::m_paragraphs
std::vector< ParagraphInfo > m_paragraphs
Definition: WriterPlsParser.cxx:302
MWAWPageSpan::setMarginTop
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
libmwaw::PrinterInfo::read
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
MWAWHeaderFooter::FOOTER
@ FOOTER
Definition: MWAWPageSpan.hxx:48
MWAWPosition::Char
@ Char
Definition: MWAWPosition.hxx:51
WriterPlsParserInternal::ParagraphData::m_indent
int m_indent[2]
Definition: WriterPlsParser.cxx:562
WriterPlsParser::createZones
bool createZones()
finds the different objects zones
Definition: WriterPlsParser.cxx:768
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
WriterPlsParserInternal::PageInfo::operator<<
friend std::ostream & operator<<(std::ostream &o, PageInfo const &p)
Definition: WriterPlsParser.cxx:69
WriterPlsParserInternal::ParagraphData::m_typeFlag
int m_typeFlag
Definition: WriterPlsParser.cxx:560
WriterPlsParser::m_state
std::shared_ptr< WriterPlsParserInternal::State > m_state
the state
Definition: WriterPlsParser.hxx:158
MWAWHeader.hxx
MWAWPictData::check
static ReadResult check(MWAWInputStreamPtr const &input, int size, MWAWBox2f &box)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:100
MWAWFont::setSize
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
MWAWHeaderFooter::ALL
@ ALL
Definition: MWAWPageSpan.hxx:50
WriterPlsParserInternal::WindowsInfo::m_pages
std::vector< PageInfo > m_pages
Definition: WriterPlsParser.cxx:300
WriterPlsParser::readPageInfo
bool readPageInfo(int zone)
read the page info zone
Definition: WriterPlsParser.cxx:1252
WriterPlsParserInternal::State
Internal: the state of a WriterPlsParser.
Definition: WriterPlsParser.cxx:574
WriterPlsParser::readGraphic
bool readGraphic(WriterPlsParserInternal::ParagraphInfo const &info)
read a graphic
Definition: WriterPlsParser.cxx:1630
MWAWFont::italicBit
@ italicBit
Definition: MWAWFont.hxx:190
MWAWSection::Column::m_widthUnit
librevenge::RVNGUnit m_widthUnit
the width unit (default inches)
Definition: MWAWSection.hxx:152
MWAWParagraph::m_marginsUnit
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:150
WriterPlsParser::readParagraphData
bool readParagraphData(WriterPlsParserInternal::ParagraphInfo const &info, bool hasFonts, WriterPlsParserInternal::ParagraphData &data)
reads a paragraph data
Definition: WriterPlsParser.cxx:1791
WriterPlsParserInternal::SectionInfo::empty
bool empty() const
Definition: WriterPlsParser.cxx:464
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
MWAWTextListener.hxx
WriterPlsParser::readUnknown
bool readUnknown(WriterPlsParserInternal::ParagraphInfo const &info)
read a unknown section
Definition: WriterPlsParser.cxx:1750
WriterPlsParserInternal::ColumnTableInfo::m_textX
int m_textX[3]
Definition: WriterPlsParser.cxx:136
MWAWSubDocument::m_parser
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
WriterPlsParserInternal::ColumnInfo
Column informations.
Definition: WriterPlsParser.cxx:85
WriterPlsParserInternal::SubDocument::m_id
int m_id
the subdocument id
Definition: WriterPlsParser.cxx:621
MWAWSection.hxx
MWAWTable::Left
@ Left
Definition: MWAWTable.hxx:62
WriterPlsParserInternal::ParagraphData::operator<<
friend std::ostream & operator<<(std::ostream &o, ParagraphData const &p)
operator<<
Definition: WriterPlsParser.cxx:513
WriterPlsParserInternal::ParagraphData::m_numData
int m_numData[2]
Definition: WriterPlsParser.cxx:569
WriterPlsParserInternal::ParagraphInfo::m_pos
long m_pos
Definition: WriterPlsParser.cxx:238
WriterPlsParserInternal::ColumnTableInfo::m_numData
int m_numData
Definition: WriterPlsParser.cxx:134
WriterPlsParser::readSection
bool readSection(WriterPlsParserInternal::ParagraphInfo const &info, bool mainBlock)
read a section
Definition: WriterPlsParser.cxx:1507
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
WriterPlsParserInternal::SubDocument::SubDocument
SubDocument(WriterPlsParser &pars, MWAWInputStreamPtr const &input, int zoneId)
Definition: WriterPlsParser.cxx:598
WriterPlsParser
the main class to read a Writerperfect file
Definition: WriterPlsParser.hxx:64
MWAWPageSpan::setMarginRight
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
WriterPlsParserInternal::PageInfo::m_unknown
int m_unknown[2]
Definition: WriterPlsParser.cxx:80
WriterPlsParserInternal::ParagraphInfo::m_linesHeight
std::vector< int > m_linesHeight
Definition: WriterPlsParser.cxx:242
MWAWPageSpan::setHeaderFooter
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
WriterPlsParserInternal::ColumnInfo::m_numCol
int m_numCol
Definition: WriterPlsParser.cxx:108
WriterPlsParserInternal::ParagraphInfo::m_numLines
int m_numLines
Definition: WriterPlsParser.cxx:241
WriterPlsParserInternal::Line::m_width
int m_width
the width
Definition: WriterPlsParser.cxx:422
MWAWBox2::size
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
WriterPlsParser::createDocument
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: WriterPlsParser.cxx:732
WriterPlsParserInternal::ColumnInfo::ColumnInfo
ColumnInfo()
Definition: WriterPlsParser.cxx:86
WriterPlsParser::readPrintInfo
bool readPrintInfo()
read the print info zone
Definition: WriterPlsParser.cxx:1972
WriterPlsParser::getParagraph
MWAWParagraph getParagraph(WriterPlsParserInternal::ParagraphData const &data)
returns a paragraph corresponding to a paragraph data
Definition: WriterPlsParser.cxx:1302
WriterPlsParserInternal::State::m_headerHeight
int m_headerHeight
the header height if known
Definition: WriterPlsParser.cxx:589
WriterPlsParser::sendWindow
bool sendWindow(int zone, MWAWVec2i limits=MWAWVec2i(-1,-1))
send a zone ( 0: MAIN ZONE, 1 : HEADER, 2 : FOOTER )
Definition: WriterPlsParser.cxx:1050
MWAWInputStream.hxx
WriterPlsParserInternal::State::m_actPage
int m_actPage
the actual page
Definition: WriterPlsParser.cxx:584
MWAWHeader::reset
void reset(MWAWDocument::Type type, int vers, Kind kind=MWAWDocument::MWAW_K_TEXT)
resets the data
Definition: MWAWHeader.hxx:84
MWAWListenerPtr
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
MWAWFont.hxx
librevenge
Definition: MWAWDocument.hxx:56
WriterPlsParserInternal::SubDocument::operator!=
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: WriterPlsParser.cxx:607
MWAWPageSpan::setMargins
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
WriterPlsParserInternal::Font
Internal: class to store the font properties.
Definition: WriterPlsParser.cxx:378
WriterPlsParserInternal::SectionInfo
Internal: class to store the Section properties.
Definition: WriterPlsParser.cxx:456
MWAWBox2< float >
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:43
MWAWCell
a structure used to define a cell and its format
Definition: MWAWCell.hxx:52
WriterPlsParserInternal::GraphicInfo::m_flags
int m_flags[7]
some flag
Definition: WriterPlsParser.cxx:451
WriterPlsParserInternal::WindowsInfo::Zone
Definition: WriterPlsParser.cxx:249
WriterPlsParserInternal::ParagraphData::m_text
std::string m_text
Definition: WriterPlsParser.cxx:565
MWAWTable::setAlignment
void setAlignment(Alignment align, float leftMargin=0, float rightMargin=0)
defines the current alignment
Definition: MWAWTable.hxx:106
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
WriterPlsParserInternal::Font::Font
Font()
Definition: WriterPlsParser.cxx:379
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MWAWParser.hxx
MWAWFont::setUnderlineStyle
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
WriterPlsParserInternal::WindowsInfo::Zone::Zone
Zone()
Definition: WriterPlsParser.cxx:250
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:98
MWAWParser::resetTextListener
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:163
WriterPlsParser::findSection
bool findSection(int zone, MWAWVec2i limits, MWAWSection &sec)
try to find the data which correspond to a section ( mainly column )
Definition: WriterPlsParser.cxx:1194
WriterPlsParser::readLines
bool readLines(WriterPlsParserInternal::ParagraphInfo const &info, int nLines, std::vector< WriterPlsParserInternal::Line > &lines)
reads a list of line (with position)
Definition: WriterPlsParser.cxx:1942
MWAWFont::setFlags
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
WriterPlsParserInternal::ColumnInfo::m_firstLine
int m_firstLine
Definition: WriterPlsParser.cxx:106