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

Generated on Wed Jun 17 2020 06:30:13 for libmwaw by doxygen 1.8.18