MacWrtParser.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 #ifndef MAC_WRT_PARSER
35 # define MAC_WRT_PARSER
36 
37 #include <vector>
38 
39 #include "MWAWDebug.hxx"
40 #include "MWAWInputStream.hxx"
41 
42 #include "MWAWParser.hxx"
43 
44 namespace MacWrtParserInternal
45 {
46 struct State;
47 struct Information;
48 class SubDocument;
49 }
50 
56 class MacWrtParser final : public MWAWTextParser
57 {
59 
60 public:
62  MacWrtParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
64  ~MacWrtParser() final;
65 
67  bool checkHeader(MWAWHeader *header, bool strict=false) final;
68 
69  // the main parse function
70  void parse(librevenge::RVNGTextInterface *documentInterface) final;
71 
72 protected:
74  void init();
75 
77  void createDocument(librevenge::RVNGTextInterface *documentInterface);
78 
80  bool sendWindow(int zone);
81 
83  bool createZones();
84 
86  bool createZonesV3();
87 
89  bool readPrintInfo();
90 
92  bool readWindowsInfo(int wh);
93 
95  bool readLinesHeight(MWAWEntry const &entry, std::vector<int> &firstParagLine,
96  std::vector<int> &linesHeight);
97 
99  bool readInformationsV3(int numInfo,
100  std::vector<MacWrtParserInternal::Information> &informations);
101 
103  bool readInformations(MWAWEntry const &entry,
104  std::vector<MacWrtParserInternal::Information> &informations);
105 
107  bool readParagraph(MacWrtParserInternal::Information const &info);
108 
110  bool readGraphic(MacWrtParserInternal::Information const &info);
113  static bool isMagicPic(librevenge::RVNGBinaryData const &dt);
114 
116  bool readText(MacWrtParserInternal::Information const &info, std::vector<int> const &lineHeight);
117 
119  bool readPageBreak(MacWrtParserInternal::Information const &info);
120 
122  bool checkFreeList();
123 
125  void newPage(int number);
126 
127 protected:
128  //
129  // data
130  //
132  std::shared_ptr<MacWrtParserInternal::State> m_state;
133 };
134 #endif
135 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
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:47
MWAWField::Time
@ Time
Definition: libmwaw_internal.hxx:401
MacWrtParserInternal::WindowsInfo::m_startSel
MWAWVec2i m_startSel
Definition: MacWrtParser.cxx:264
MWAWParagraph::m_justify
MWAWVariable< Justification > m_justify
the justification
Definition: MWAWParagraph.hxx:167
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:299
MacWrtParserInternal::WindowsInfo::m_pageNumber
MWAWVec2i m_pageNumber
Definition: MacWrtParser.cxx:268
MacWrtParserInternal::WindowsInfo::m_time
MWAWVec2i m_time
Definition: MacWrtParser.cxx:268
MWAWTabStop::LEFT
@ LEFT
Definition: MWAWParagraph.hxx:48
MacWrtParserInternal::Information::TEXT
@ TEXT
Definition: MacWrtParser.cxx:120
MacWrtParserInternal::FileHeader::m_freeListAllocated
long m_freeListAllocated
free list allocated
Definition: MacWrtParser.cxx:86
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
MacWrtParserInternal::Information::operator<<
friend std::ostream & operator<<(std::ostream &o, Information const &info)
operator<<
Definition: MacWrtParser.cxx:162
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
MacWrtParserInternal::Information::m_compressed
bool m_compressed
a flag to know if the text data are compressed
Definition: MacWrtParser.cxx:142
MWAWHeaderFooter::HEADER
@ HEADER
Definition: MWAWPageSpan.hxx:48
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
MacWrtParserInternal::State::State
State()
constructor
Definition: MacWrtParser.cxx:285
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MacWrtParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: MacWrtParser.cxx:335
MacWrtParserInternal::FileHeader::m_numParagraphs
int m_numParagraphs[3]
the number of lines : text, header footer
Definition: MacWrtParser.cxx:76
MacWrtParserInternal::FileHeader::m_freeListPos
long m_freeListPos
free list start position
Definition: MacWrtParser.cxx:82
MacWrtParser::readText
bool readText(MacWrtParserInternal::Information const &info, std::vector< int > const &lineHeight)
read a text zone
Definition: MacWrtParser.cxx:1236
MWAWPosition::setRelativePosition
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: MWAWPosition.hxx:237
MWAWParagraph::m_tabs
MWAWVariable< std::vector< MWAWTabStop > > m_tabs
the tabulations
Definition: MWAWParagraph.hxx:162
MacWrtParser::readWindowsInfo
bool readWindowsInfo(int wh)
read the windows zone
Definition: MacWrtParser.cxx:874
MacWrtParserInternal::SubDocument
Internal: the subdocument of a MacWrtParser.
Definition: MacWrtParser.cxx:313
MWAWPosition::setPage
void setPage(int pg) const
sets the page
Definition: MWAWPosition.hxx:205
MacWrtParserInternal::WindowsInfo::m_endSel
MWAWVec2i m_endSel
Definition: MacWrtParser.cxx:264
MacWrtParserInternal::WindowsInfo::m_date
MWAWVec2i m_date
Definition: MacWrtParser.cxx:268
MacWrtParserInternal::State::m_footerHeight
int m_footerHeight
the footer height if known
Definition: MacWrtParser.cxx:307
MWAWFont::Script::sub100
static Script sub100()
return a yposition which correspond to a basic subscript100
Definition: MWAWFont.hxx:125
MWAWFont::boldBit
@ boldBit
Definition: MWAWFont.hxx:190
MWAWTextListener
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
MWAWEmbeddedObject::m_dataList
std::vector< librevenge::RVNGBinaryData > m_dataList
the picture content: one data by representation
Definition: libmwaw_internal.hxx:512
MacWrtParserInternal::SubDocument::SubDocument
SubDocument(MacWrtParser &pars, MWAWInputStreamPtr const &input, int zoneId)
Definition: MacWrtParser.cxx:315
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
MacWrtParserInternal::State::m_windows
WindowsInfo m_windows[3]
the information of main document, header, footer
Definition: MacWrtParser.cxx:304
MacWrtParser::readLinesHeight
bool readLinesHeight(MWAWEntry const &entry, std::vector< int > &firstParagLine, std::vector< int > &linesHeight)
read the line height
Definition: MacWrtParser.cxx:984
MWAWParagraph::setInterline
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
MWAWEntry::id
int id() const
returns the id
Definition: MWAWEntry.hxx:164
MacWrtParserInternal::Information::m_justifySet
bool m_justifySet
true if the justification must be used
Definition: MacWrtParser.cxx:154
MWAWPageSpan::setMarginBottom
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
MacWrtParserInternal::Information
the paragraph... information
Definition: MacWrtParser.cxx:118
MWAWFontConverter.hxx
MWAWEmbeddedObject
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
MWAWParser::version
int version() const
returns the works version
Definition: MWAWParser.hxx:108
MWAWParagraph::JustificationFullAllLines
@ JustificationFullAllLines
Definition: MWAWParagraph.hxx:91
MWAWPrinter.hxx
MacWrtParserInternal::Information::RULER
@ RULER
Definition: MacWrtParser.cxx:120
MWAWParagraph
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
MacWrtParserInternal::FileHeader
Document header.
Definition: MacWrtParser.cxx:61
MWAWPageSpan::setMarginLeft
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
MacWrtParser::MacWrtParser
MacWrtParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: MacWrtParser.cxx:369
MWAWFont::Line::Simple
@ Simple
Definition: MWAWFont.hxx:49
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
libmwaw::PrinterInfo
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
MacWrtParser::init
void init()
inits all internal variables
Definition: MacWrtParser.cxx:380
MWAWParser::getTextListener
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
MacWrtParser::readPageBreak
bool readPageBreak(MacWrtParserInternal::Information const &info)
read a page break zone ( version <= 3)
Definition: MacWrtParser.cxx:1512
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
MWAWParagraph::m_margins
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
MacWrtParserInternal::FileHeader::m_startNumberPage
int m_startNumberPage
the first number page
Definition: MacWrtParser.cxx:80
MacWrtParser::readPrintInfo
bool readPrintInfo()
read the print info zone
Definition: MacWrtParser.cxx:821
MWAWTabStop::DECIMAL
@ DECIMAL
Definition: MWAWParagraph.hxx:48
MWAWPosition::setNaturalSize
void setNaturalSize(MWAWVec2f const &naturalSz)
sets the natural size (if known)
Definition: MWAWPosition.hxx:220
MWAWParser::ascii
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
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
MacWrtParser.hxx
MWAWHeaderFooter
a class which stores the header/footer data
Definition: MWAWPageSpan.hxx:45
MWAWField::Date
@ Date
Definition: libmwaw_internal.hxx:401
MWAWParser::asciiName
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
MacWrtParserInternal::WindowsInfo::m_firstParagLine
std::vector< int > m_firstParagLine
Definition: MacWrtParser.cxx:267
MWAWSubDocument.hxx
MacWrtParserInternal::FileHeader::FileHeader
FileHeader()
Definition: MacWrtParser.cxx:62
MWAWPageSpan::setFormLength
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
MWAWPageSpan::getPageSpan
int getPageSpan() const
Definition: MWAWPageSpan.hxx:170
MacWrtParser::readInformations
bool readInformations(MWAWEntry const &entry, std::vector< MacWrtParserInternal::Information > &informations)
read the information
Definition: MacWrtParser.cxx:1103
MWAWParser::getPageWidth
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWParser.hxx:185
MacWrtParserInternal::WindowsInfo::m_posTopY
int m_posTopY
Definition: MacWrtParser.cxx:265
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:188
MWAWSubDocument::m_input
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
MacWrtParserInternal::Information::Type
Type
the different type
Definition: MacWrtParser.cxx:120
MWAWParagraph::JustificationCenter
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
MacWrtParser::createZonesV3
bool createZonesV3()
finds the different objects zones (version <= 3)
Definition: MacWrtParser.cxx:548
MWAWParagraph::Justification
Justification
an enum used to defined the paragraph justification: left, center, right, full ...
Definition: MWAWParagraph.hxx:90
MWAWFont::shadowBit
@ shadowBit
Definition: MWAWFont.hxx:191
MacWrtParserInternal::Information::Information
Information()
constructor
Definition: MacWrtParser.cxx:123
MWAWParser::setTextListener
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:158
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
MWAWRSRCParser.hxx
MWAWVec2::y
T y() const
second element
Definition: libmwaw_internal.hxx:673
MWAWParser::getRSRCParser
MWAWRSRCParserPtr & getRSRCParser()
returns the rsrc parser
Definition: MWAWParser.hxx:190
MacWrtParserInternal::FileHeader::m_dataPos
long m_dataPos
the begin of data ( if version == 3)
Definition: MacWrtParser.cxx:88
libmwaw::Debug::dumpFile
bool dumpFile(librevenge::RVNGBinaryData &data, char const *fileName)
a debug function to store in a datafile in the current directory WARNING: this function erase the fil...
Definition: MWAWDebug.cxx:193
MacWrtParserInternal::WindowsInfo::operator<<
friend std::ostream & operator<<(std::ostream &o, WindowsInfo const &w)
Definition: MacWrtParser.cxx:271
MacWrtParserInternal::Information::m_font
MWAWFont m_font
the font
Definition: MacWrtParser.cxx:159
MacWrtParserInternal::State::m_fileHeader
FileHeader m_fileHeader
the header
Definition: MacWrtParser.cxx:301
MWAWPageSpan::setFormWidth
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
MWAWPosition.hxx
MWAWEntry::setEnd
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
MacWrtParserInternal::Information::m_justify
MWAWParagraph::Justification m_justify
paragraph justification : MWAW_PARAGRAPH_JUSTIFICATION*
Definition: MacWrtParser.cxx:151
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:668
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
MacWrtParser::readGraphic
bool readGraphic(MacWrtParserInternal::Information const &info)
read a graphics
Definition: MacWrtParser.cxx:1560
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
MacWrtParserInternal::FileHeader::operator<<
friend std::ostream & operator<<(std::ostream &o, FileHeader const &header)
Definition: MacWrtParser.cxx:91
MWAWParser::setVersion
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
MWAWRSRCParserPtr
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
MacWrtParser::m_state
std::shared_ptr< MacWrtParserInternal::State > m_state
the state
Definition: MacWrtParser.hxx:132
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
libmwaw::ParseException
Definition: libmwaw_internal.hxx:144
MWAWDebug.hxx
MWAWFont::getDebugString
std::string getDebugString(std::shared_ptr< MWAWFontConverter > &converter) const
returns a string which can be used for debugging
Definition: MWAWFont.cxx:181
MWAWHeader
a function used by MWAWDocument to store the version of document
Definition: MWAWHeader.hxx:57
MWAWEntry::begin
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
MWAWEntry::setLength
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
MWAWParser::getPageSpan
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
MacWrtParser::readParagraph
bool readParagraph(MacWrtParserInternal::Information const &info)
read a paragraph
Definition: MacWrtParser.cxx:1421
MacWrtParserInternal::State
Internal: the state of a MacWrtParser.
Definition: MacWrtParser.cxx:283
MWAWFont::setId
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
MacWrtParserInternal::FileHeader::m_freeListLength
long m_freeListLength
free list length
Definition: MacWrtParser.cxx:84
MWAWEntry::setId
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
MWAWField
a field
Definition: libmwaw_internal.hxx:399
MWAWField::PageNumber
@ PageNumber
Definition: libmwaw_internal.hxx:401
MacWrtParser::isMagicPic
static bool isMagicPic(librevenge::RVNGBinaryData const &dt)
test if a graphic is empty.
Definition: MacWrtParser.cxx:1636
MWAWPageSpan::setMarginTop
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
MWAWParagraph::JustificationLeft
@ JustificationLeft
Definition: MWAWParagraph.hxx:90
libmwaw::PrinterInfo::read
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
MWAWHeaderFooter::FOOTER
@ FOOTER
Definition: MWAWPageSpan.hxx:48
MacWrtParserInternal::FileHeader::m_hideFirstPageHeaderFooter
bool m_hideFirstPageHeaderFooter
true if the first page header/footer must be draw
Definition: MacWrtParser.cxx:78
MWAWPosition::Char
@ Char
Definition: MWAWPosition.hxx:51
MacWrtParser
the main class to read a MacWrite file
Definition: MacWrtParser.hxx:57
MWAWDocument::MWAW_T_MACWRITE
@ MWAW_T_MACWRITE
MacWrite.
Definition: MWAWDocument.hxx:134
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MWAWHeader.hxx
Defines MWAWHeader (document's type, version, kind)
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
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
MWAWFont::setSize
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:275
MWAWHeaderFooter::ALL
@ ALL
Definition: MWAWPageSpan.hxx:50
MacWrtParserInternal::Information::m_pos
MWAWPosition m_pos
top left position
Definition: MacWrtParser.cxx:145
MacWrtParser::checkFreeList
bool checkFreeList()
check the free list
Definition: MacWrtParser.cxx:1651
MWAWFont::italicBit
@ italicBit
Definition: MWAWFont.hxx:190
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
MacWrtParserInternal::Information::PAGEBREAK
@ PAGEBREAK
Definition: MacWrtParser.cxx:120
MWAWTextListener.hxx
Defines MWAWTextListener: the libmwaw word processor listener.
MacWrtParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: MacWrtParser.cxx:718
MacWrtParserInternal::Information::GRAPHIC
@ GRAPHIC
Definition: MacWrtParser.cxx:120
MWAWSubDocument::m_parser
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
MWAWParagraph::JustificationFull
@ JustificationFull
Definition: MWAWParagraph.hxx:90
MacWrtParserInternal::State::m_actPage
int m_actPage
the actual page
Definition: MacWrtParser.cxx:298
MWAWParagraph::JustificationRight
@ JustificationRight
Definition: MWAWParagraph.hxx:91
MacWrtParserInternal::State::m_numPages
int m_numPages
the number of page of the final document
Definition: MacWrtParser.cxx:298
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MacWrtParser::~MacWrtParser
~MacWrtParser() final
destructor
Definition: MacWrtParser.cxx:376
MacWrtParserInternal::State::m_compressCorr
std::string m_compressCorr
the correspondance between int compressed and char : must be 15 character
Definition: MacWrtParser.cxx:296
MacWrtParser::newPage
void newPage(int number)
adds a new page
Definition: MacWrtParser.cxx:394
MWAWPageSpan::setMarginRight
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
MacWrtParserInternal::SubDocument::operator!=
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: MacWrtParser.cxx:356
MacWrtParserInternal::WindowsInfo::m_informations
std::vector< Information > m_informations
Definition: MacWrtParser.cxx:266
MWAWVariable::get
T const & get() const
return the current value
Definition: libmwaw_internal.hxx:630
MWAWPageSpan::setHeaderFooter
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
MacWrtParserInternal::WindowsInfo::isEmpty
bool isEmpty() const
small function used to recognized empty header or footer
Definition: MacWrtParser.cxx:235
MWAWBox2::size
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
MacWrtParserInternal::operator<<
std::ostream & operator<<(std::ostream &o, FileHeader const &header)
Definition: MacWrtParser.cxx:91
MacWrtParserInternal::State::m_headerHeight
int m_headerHeight
the header height if known
Definition: MacWrtParser.cxx:306
MacWrtParserInternal::Information::m_type
Type m_type
the type
Definition: MacWrtParser.cxx:139
MacWrtParserInternal::Information::UNKNOWN
@ UNKNOWN
Definition: MacWrtParser.cxx:120
MacWrtParser::createDocument
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MacWrtParser.cxx:450
MacWrtParser::parse
void parse(librevenge::RVNGTextInterface *documentInterface) final
virtual function used to parse the input
Definition: MacWrtParser.cxx:410
MWAWInputStream.hxx
MacWrtParserInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: MacWrtParser.cxx:322
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:57
MWAWPageSpan::setMargins
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
MacWrtParserInternal::WindowsInfo::m_linesHeight
std::vector< int > m_linesHeight
Definition: MacWrtParser.cxx:267
MacWrtParserInternal::WindowsInfo::WindowsInfo
WindowsInfo()
Definition: MacWrtParser.cxx:221
MWAWBox2< float >
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:44
MacWrtParserInternal
Internal: the structures of a MacWrtParser.
Definition: MacWrtParser.cxx:58
MacWrtParser::sendWindow
bool sendWindow(int zone)
send a zone ( 0: MAIN ZONE, 1 : HEADER, 2 : FOOTER )
Definition: MacWrtParser.cxx:650
MacWrtParser::createZones
bool createZones()
finds the different objects zones
Definition: MacWrtParser.cxx:496
MacWrtParserInternal::Information::m_height
int m_height
the paragraph height
Definition: MacWrtParser.cxx:148
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
MacWrtParserInternal::Information::m_data
MWAWEntry m_data
the position in the file
Definition: MacWrtParser.cxx:156
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
MacWrtParser::readInformationsV3
bool readInformationsV3(int numInfo, std::vector< MacWrtParserInternal::Information > &informations)
read the information ( version <= 3)
Definition: MacWrtParser.cxx:1057
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
MacWrtParserInternal::WindowsInfo
the windows structure
Definition: MacWrtParser.cxx:220
MWAWParser::resetTextListener
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:163
MWAWFont::setFlags
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325
MacWrtParserInternal::SubDocument::m_id
int m_id
the subdocument id
Definition: MacWrtParser.cxx:332

Generated on Fri Sep 18 2020 18:14:52 for libmwaw by doxygen 1.8.20