MarinerWrtParser.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 Mariner Write document
36  */
37 #ifndef MARINER_WRT_PARSER
38 # define MARINER_WRT_PARSER
39 
40 #include <iostream>
41 #include <string>
42 #include <vector>
43 
44 #include <librevenge/librevenge.h>
45 
46 #include "MWAWDebug.hxx"
47 #include "MWAWEntry.hxx"
48 #include "MWAWInputStream.hxx"
49 
50 #include "MWAWParser.hxx"
51 
53 {
54 struct State;
55 class SubDocument;
56 }
57 
58 class MarinerWrtGraph;
59 class MarinerWrtText;
60 
62 struct MarinerWrtEntry : public MWAWEntry {
65  {
66  }
68  virtual ~MarinerWrtEntry();
70  std::string name() const;
72  friend std::ostream &operator<< (std::ostream &o, MarinerWrtEntry const &ent)
73  {
74  if (ent.m_N || ent.m_value || ent.m_extra.length()) {
75  o << "[";
76  if (ent.m_N) o << "N=" << ent.m_N << ",";
77  if (ent.m_value) o << "unkn=" << ent.m_value << ",";
78  if (ent.m_extra.length()) o << ent.m_extra;
79  o << "],";
80  }
81  return o;
82  }
86  int m_N;
88  int m_value;
89 };
90 
95  {
96  }
98  friend std::ostream &operator<<(std::ostream &o, MarinerWrtStruct const &dt);
100  int numValues() const
101  {
102  return int(m_data.size());
103  }
105  bool isBasic() const
106  {
107  return (m_type==1 || m_type==2) && m_data.size()<=1;
108  }
110  long value(int i) const;
112  long m_filePos;
116  int m_type;
118  std::vector<long> m_data;
119 };
120 
127 {
128  friend class MarinerWrtGraph;
129  friend class MarinerWrtText;
131 
132 public:
136  virtual ~MarinerWrtParser();
137 
139  bool checkHeader(MWAWHeader *header, bool strict=false);
140 
141  // the main parse function
142  void parse(librevenge::RVNGTextInterface *documentInterface);
143 
144 protected:
146  void init();
147 
149  void createDocument(librevenge::RVNGTextInterface *documentInterface);
150 
152  bool createZones();
154  bool readZone(int &actZone, bool onlyTest=false);
155 
157  MWAWVec2f getPageLeftTop() const;
159  MWAWSection getSection(int zoneId) const;
160 
162  void newPage(int number);
163 
164  // interface with the text parser
165 
167  int getZoneId(uint32_t fileId, bool &endNote);
169  void sendText(int zoneId);
170 
171  // interface with the graph parser
173  float getPatternPercent(int id) const;
175  void sendToken(int zoneId, long tokenId);
176 
177  //
178  // low level
179  //
180 
182  bool readEntryHeader(MarinerWrtEntry &entry);
184  bool decodeZone(std::vector<MarinerWrtStruct> &dataList, long numData=999999);
185 
187  bool readSeparator(MarinerWrtEntry const &entry);
189  bool readZoneDim(MarinerWrtEntry const &entry, int zoneId);
191  bool readZoneHeader(MarinerWrtEntry const &entry, int zoneId, bool onlyTest);
193  bool readZoneb(MarinerWrtEntry const &entry, int zoneId);
195  bool readZonec(MarinerWrtEntry const &entry, int zoneId);
197  bool readZone13(MarinerWrtEntry const &entry, int zoneId);
199  bool readDocInfo(MarinerWrtEntry const &entry, int zoneId);
201  bool readPrintInfo(MarinerWrtEntry const &entry);
203  bool readCPRT(MarinerWrtEntry const &entry);
204 
206  bool readNumbersString(int num, std::vector<long> &res);
207 
208 protected:
209  //
210  // data
211  //
213  shared_ptr<MarinerWrtParserInternal::State> m_state;
214 
217 
219  shared_ptr<MarinerWrtGraph> m_graphParser;
220 
222  shared_ptr<MarinerWrtText> m_textParser;
223 };
224 #endif
225 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
MarinerWrtParser::readZoneDim
bool readZoneDim(MarinerWrtEntry const &entry, int zoneId)
try to read the zone dimension ( normal and with margin )
Definition: MarinerWrtParser.cxx:837
MWAWTextParser
virtual class which defines the ancestor of all text zone parser
Definition: MWAWParser.hxx:296
MarinerWrtParser::readCPRT
bool readCPRT(MarinerWrtEntry const &entry)
try to read a xml printinfo zone
Definition: MarinerWrtParser.cxx:1257
MarinerWrtEntry::m_value
int m_value
a unknown value
Definition: MarinerWrtParser.hxx:88
MWAWTextListenerPtr
shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition: libmwaw_internal.hxx:519
MarinerWrtParserInternal::State::m_firstPageFooter
bool m_firstPageFooter
a flag to know if we have a first page footer
Definition: MarinerWrtParser.cxx:175
MarinerWrtParser::MarinerWrtGraph
friend class MarinerWrtGraph
Definition: MarinerWrtParser.hxx:128
MarinerWrtParserInternal::Zone
Internal: the struct used to store the zone of a MarinerWrtParser.
Definition: MarinerWrtParser.cxx:69
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:262
MWAWHeaderFooter::HEADER
@ HEADER
Definition: MWAWPageSpan.hxx:48
MarinerWrtParser::readNumbersString
bool readNumbersString(int num, std::vector< long > &res)
try to read a number or a list of number entries
Definition: MarinerWrtParser.cxx:1367
MarinerWrtParser::m_graphParser
shared_ptr< MarinerWrtGraph > m_graphParser
the graph parser
Definition: MarinerWrtParser.hxx:219
MarinerWrtParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type)
the parser function
Definition: MarinerWrtParser.cxx:217
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
MarinerWrtParserInternal::State::m_numPages
int m_numPages
the number of page of the final document
Definition: MarinerWrtParser.cxx:173
MarinerWrtParserInternal::Zone::Z_Footer
@ Z_Footer
Definition: MarinerWrtParser.cxx:71
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
MarinerWrtParserInternal::State::m_zonesList
std::vector< Zone > m_zonesList
the list of zone
Definition: MarinerWrtParser.cxx:170
MarinerWrtParser::init
void init()
inits all internal variables
Definition: MarinerWrtParser.cxx:247
MarinerWrtEntry::name
std::string name() const
returns the entry name;
Definition: MarinerWrtParser.cxx:1526
MarinerWrtStruct::value
long value(int i) const
returns the ith value (or 0 if it does not exists )
Definition: MarinerWrtParser.cxx:1579
MarinerWrtParserInternal::Zone::m_section
MWAWSection m_section
the section
Definition: MarinerWrtParser.cxx:98
MarinerWrtParser::sendToken
void sendToken(int zoneId, long tokenId)
ask the graph parser to send a token
Definition: MarinerWrtParser.cxx:322
MarinerWrtParserInternal::Zone::Z_Unknown
@ Z_Unknown
Definition: MarinerWrtParser.cxx:71
MWAWHeaderFooter::EVEN
@ EVEN
Definition: MWAWPageSpan.hxx:50
MWAWTextListener
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
MWAWSection::m_columnSeparator
MWAWBorder m_columnSeparator
the vertical separator between columns
Definition: MWAWSection.hxx:104
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
MarinerWrtParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition: MarinerWrtParser.cxx:1492
MarinerWrtParser::parse
void parse(librevenge::RVNGTextInterface *documentInterface)
virtual function used to parse the input
Definition: MarinerWrtParser.cxx:333
MWAWEntry.hxx
MWAWPageSpan::setMarginBottom
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:202
MarinerWrtParserInternal::State::m_headerHeight
int m_headerHeight
the header height if known
Definition: MarinerWrtParser.cxx:178
MarinerWrtParser::readSeparator
bool readSeparator(MarinerWrtEntry const &entry)
try to read the separator of differents part
Definition: MarinerWrtParser.cxx:601
MWAWFontConverter.hxx
MarinerWrtEntry::MarinerWrtEntry
MarinerWrtEntry()
constructor
Definition: MarinerWrtParser.hxx:64
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:182
MarinerWrtEntry::m_fileType
int m_fileType
the entry type
Definition: MarinerWrtParser.hxx:84
MWAWDocument::MWAW_T_MARINERWRITE
@ MWAW_T_MARINERWRITE
Mariner Write (only v1.6-v3.5 Mac Classic)
Definition: MWAWDocument.hxx:127
MWAWPrinter.hxx
MWAWBox2l
MWAWBox2< long > MWAWBox2l
MWAWBox2 of long.
Definition: libmwaw_internal.hxx:1136
MWAWPageSpan::setMarginLeft
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:187
MarinerWrtEntry::~MarinerWrtEntry
virtual ~MarinerWrtEntry()
destructor
Definition: MarinerWrtParser.cxx:1522
MWAWHeaderFooter::m_subDocument
MWAWSubDocumentPtr m_subDocument
the document data
Definition: MWAWPageSpan.hxx:89
libmwaw::PrinterInfo
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
MarinerWrtParserInternal::State::m_footerHeight
int m_footerHeight
the footer height if known
Definition: MarinerWrtParser.cxx:179
MWAWParser::getTextListener
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
MarinerWrtEntry::operator<<
friend std::ostream & operator<<(std::ostream &o, MarinerWrtEntry const &ent)
operator<<
Definition: MarinerWrtParser.hxx:72
MarinerWrtParser::MarinerWrtParser
MarinerWrtParser(MWAWInputStreamPtr input, MWAWRSRCParserPtr rsrcParser, MWAWHeader *header)
constructor
Definition: MarinerWrtParser.cxx:237
MarinerWrtParser::getSection
MWAWSection getSection(int zoneId) const
returns the section information corresponding to a zone
Definition: MarinerWrtParser.cxx:270
MarinerWrtParser::readDocInfo
bool readDocInfo(MarinerWrtEntry const &entry, int zoneId)
try to read the doc info zone
Definition: MarinerWrtParser.cxx:921
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
MarinerWrtParserInternal
Internal: the structures of a MarinerWrtParser.
Definition: MarinerWrtParser.cxx:66
MarinerWrtParserInternal::State::State
State()
constructor
Definition: MarinerWrtParser.cxx:164
MWAWParser::ascii
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
MarinerWrtParserInternal::Zone::m_dim
MWAWBox2l m_dim
the zone total position
Definition: MarinerWrtParser.cxx:92
MWAWHeaderFooter
a class which stores the header/footer data
Definition: MWAWPageSpan.hxx:45
MWAWCell.hxx
MarinerWrtParserInternal::Zone::m_type
Type m_type
the zone type
Definition: MarinerWrtParser.cxx:84
MarinerWrtParser::readZonec
bool readZonec(MarinerWrtEntry const &entry, int zoneId)
try to read a unknown zone of 9 int
Definition: MarinerWrtParser.cxx:1112
MarinerWrtParser::getPatternPercent
float getPatternPercent(int id) const
return the pattern percent which corresponds to an id (or -1)
Definition: MarinerWrtParser.cxx:317
MarinerWrtParser::MarinerWrtText
friend class MarinerWrtText
Definition: MarinerWrtParser.hxx:129
MarinerWrtParserInternal::SubDocument::operator==
virtual bool operator==(MWAWSubDocument const &doc) const
operator!==
Definition: MarinerWrtParser.cxx:204
MWAWParser::asciiName
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
MarinerWrtParserInternal::Zone::m_pageDim
MWAWBox2i m_pageDim
the page dimension (?)
Definition: MarinerWrtParser.cxx:94
MWAWSubDocument.hxx
MarinerWrtParserInternal::SubDocument::SubDocument
SubDocument(MarinerWrtParser &pars, MWAWInputStreamPtr input, int zoneId)
Definition: MarinerWrtParser.cxx:187
MWAWPageSpan::setFormLength
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:172
MWAWPageSpan::getPageSpan
int getPageSpan() const
Definition: MWAWPageSpan.hxx:164
MarinerWrtParserInternal::Zone::m_endNote
bool m_endNote
a flag to know if this an endnote
Definition: MarinerWrtParser.cxx:86
MarinerWrtParser::createZones
bool createZones()
finds the different objects zones
Definition: MarinerWrtParser.cxx:456
MarinerWrtParserInternal::Zone::m_fileId
uint32_t m_fileId
the file zone id
Definition: MarinerWrtParser.cxx:82
MarinerWrtParserInternal::operator<<
std::ostream & operator<<(std::ostream &o, Zone const &zone)
Definition: MarinerWrtParser.cxx:105
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:178
MWAWPageSpan::setBackgroundColor
void setBackgroundColor(MWAWColor color=MWAWColor::white())
set the background color
Definition: MWAWPageSpan.hxx:252
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:85
MarinerWrtParser::decodeZone
bool decodeZone(std::vector< MarinerWrtStruct > &dataList, long numData=999999)
try to decode a zone
Definition: MarinerWrtParser.cxx:1425
MWAWParser::setTextListener
void setTextListener(MWAWTextListenerPtr &listener)
sets the text listener
Definition: MWAWParser.cxx:146
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
MWAWVec2::y
T y() const
second element
Definition: libmwaw_internal.hxx:620
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:197
MarinerWrtParserInternal::Zone::Z_Header
@ Z_Header
Definition: MarinerWrtParser.cxx:71
MarinerWrtParserInternal::Zone::m_height
long m_height
height of the zone
Definition: MarinerWrtParser.cxx:88
MWAWPageSpan::setFormWidth
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:177
MWAWPosition.hxx
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:615
MarinerWrtParserInternal::Zone::m_backgroundColor
MWAWColor m_backgroundColor
the background color
Definition: MarinerWrtParser.cxx:100
MarinerWrtStruct::operator<<
friend std::ostream & operator<<(std::ostream &o, MarinerWrtStruct const &dt)
operator<<
Definition: MarinerWrtParser.cxx:1589
MarinerWrtGraph
the main class to read the graphic part of a Mariner Write file
Definition: MarinerWrtGraph.hxx:69
MarinerWrtParserInternal::State::m_actPage
int m_actPage
the actual page
Definition: MarinerWrtParser.cxx:173
MarinerWrtParserInternal::Zone::Z_Footnote
@ Z_Footnote
Definition: MarinerWrtParser.cxx:71
MWAWBorder
a border
Definition: libmwaw_internal.hxx:314
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
MWAWColor::isBlack
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:265
MWAWSection::m_columns
std::vector< Column > m_columns
the different column
Definition: MWAWSection.hxx:100
MarinerWrtParser::newPage
void newPage(int number)
adds a new page
Definition: MarinerWrtParser.cxx:280
MarinerWrtParserInternal::Zone::m_pageTextDim
MWAWBox2i m_pageTextDim
the zone of text dimension ( ie page less margins)
Definition: MarinerWrtParser.cxx:96
MWAWParser::setVersion
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
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
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
MWAWVec2< long >
MarinerWrtParser::getPageLeftTop
MWAWVec2f getPageLeftTop() const
returns the page left top point ( in inches)
Definition: MarinerWrtParser.cxx:264
MWAWHeaderFooter::ODD
@ ODD
Definition: MWAWPageSpan.hxx:50
MWAWPictMac.hxx
MarinerWrtParserInternal::Zone::m_RBpos
MWAWVec2l m_RBpos
right/bottom position
Definition: MarinerWrtParser.cxx:90
MWAWSection
a class which stores section properties
Definition: MWAWSection.hxx:46
libmwaw::ParseException
Definition: libmwaw_internal.hxx:142
MWAWDebug.hxx
MarinerWrtParser::readZoneb
bool readZoneb(MarinerWrtEntry const &entry, int zoneId)
try to read a unknown zone : one by separator?, borderdim?
Definition: MarinerWrtParser.cxx:1071
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:72
MarinerWrtParserInternal::Zone::m_id
int m_id
the zone id
Definition: MarinerWrtParser.cxx:80
MWAWEntry::setLength
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:61
MWAWParser::getPageSpan
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
MarinerWrtStruct::m_pos
MWAWEntry m_pos
the file data position (for type=0 data )
Definition: MarinerWrtParser.hxx:114
MarinerWrtParser
the main class to read a Mariner Write file
Definition: MarinerWrtParser.hxx:127
MWAWHeaderFooter::Occurrence
Occurrence
the header/footer occurrence in the file
Definition: MWAWPageSpan.hxx:50
MarinerWrtParserInternal::Zone::Type
Type
a enum to define the diffent zone type
Definition: MarinerWrtParser.cxx:71
MarinerWrtParser::getZoneId
int getZoneId(uint32_t fileId, bool &endNote)
return a zoneid corresponding to a fileId (or -1) and set the endnote flag
Definition: MarinerWrtParser.cxx:296
MarinerWrtStruct::m_type
int m_type
the data type
Definition: MarinerWrtParser.hxx:116
MarinerWrtParserInternal::Zone::Zone
Zone()
constructor
Definition: MarinerWrtParser.cxx:73
MarinerWrtParser::m_textParser
shared_ptr< MarinerWrtText > m_textParser
the text parser
Definition: MarinerWrtParser.hxx:222
MWAWPageSpan::setMarginTop
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:197
MarinerWrtStruct::m_filePos
long m_filePos
the file position where the field description begin
Definition: MarinerWrtParser.hxx:112
libmwaw::PrinterInfo::read
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:218
MWAWHeaderFooter::FOOTER
@ FOOTER
Definition: MWAWPageSpan.hxx:48
MarinerWrtParser::createDocument
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MarinerWrtParser.cxx:368
MarinerWrtParserInternal::State::m_hasOddEvenHeaderFooter
bool m_hasOddEvenHeaderFooter
a flag to know if we have odd/even header footer
Definition: MarinerWrtParser.cxx:177
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MarinerWrtParserInternal::Zone::m_extra
std::string m_extra
extra data
Definition: MarinerWrtParser.cxx:102
MWAWHeader.hxx
MWAWInputStreamPtr
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
MWAWEntry::m_extra
std::string m_extra
an extra string
Definition: MWAWEntry.hxx:191
MarinerWrtEntry
a entry to store a zone structure
Definition: MarinerWrtParser.hxx:62
MWAWEntry::end
long end() const
returns the end offset
Definition: MWAWEntry.hxx:77
MarinerWrtStruct::numValues
int numValues() const
returns the number of values
Definition: MarinerWrtParser.hxx:100
MWAWHeaderFooter::ALL
@ ALL
Definition: MWAWPageSpan.hxx:50
MarinerWrtParserInternal::Zone::operator<<
friend std::ostream & operator<<(std::ostream &o, Zone const &zone)
operator<<
Definition: MarinerWrtParser.cxx:105
MarinerWrtParser::sendText
void sendText(int zoneId)
ask the text parser to send a zone
Definition: MarinerWrtParser.cxx:309
MarinerWrtStruct::isBasic
bool isBasic() const
returns true if this corresponds to a simple container
Definition: MarinerWrtParser.hxx:105
MarinerWrtParser::m_state
shared_ptr< MarinerWrtParserInternal::State > m_state
the state
Definition: MarinerWrtParser.hxx:213
MWAWList.hxx
MarinerWrtParserInternal::SubDocument
Internal: the subdocument of a MarinerWrtParser.
Definition: MarinerWrtParser.cxx:185
MarinerWrtText
the main class to read the text part of Mariner Write file
Definition: MarinerWrtText.hxx:61
MarinerWrtParserInternal::Zone::Z_Main
@ Z_Main
Definition: MarinerWrtParser.cxx:71
MarinerWrtStruct
Internal: a struct used to read some field.
Definition: MarinerWrtParser.hxx:92
MWAWSection::Column::m_widthUnit
librevenge::RVNGUnit m_widthUnit
the width unit (default inches)
Definition: MWAWSection.hxx:143
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
MWAWPageSpan::checkMargins
void checkMargins()
check if the page margins are consistent with the page dimension, if not update them
Definition: MWAWPageSpan.cxx:266
MarinerWrtParser::readZone
bool readZone(int &actZone, bool onlyTest=false)
try to read a zone
Definition: MarinerWrtParser.cxx:468
MWAWTextListener.hxx
MarinerWrtParser::readPrintInfo
bool readPrintInfo(MarinerWrtEntry const &entry)
try to read a printinfo zone
Definition: MarinerWrtParser.cxx:1283
libmwaw::Right
@ Right
Definition: libmwaw_internal.hxx:166
MWAWVec2l
MWAWVec2< long > MWAWVec2l
MWAWVec2 of long.
Definition: libmwaw_internal.hxx:783
MWAWSubDocument::m_parser
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
MWAWSection.hxx
MarinerWrtParser::readZone13
bool readZone13(MarinerWrtEntry const &entry, int zoneId)
try to read a unknown zone of 23 int
Definition: MarinerWrtParser.cxx:1162
MarinerWrtParser::~MarinerWrtParser
virtual ~MarinerWrtParser()
destructor
Definition: MarinerWrtParser.cxx:243
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
MWAWPageSpan::setMarginRight
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:192
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:88
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
libmwaw::Left
@ Left
Definition: libmwaw_internal.hxx:166
MWAWBox2::size
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1008
MarinerWrtParserInternal::State::m_fileToZoneMap
std::map< uint32_t, int > m_fileToZoneMap
a map fileZoneId -> localZoneId
Definition: MarinerWrtParser.cxx:172
MarinerWrtStruct::MarinerWrtStruct
MarinerWrtStruct()
constructor
Definition: MarinerWrtParser.hxx:94
MarinerWrtStruct::m_data
std::vector< long > m_data
the data block
Definition: MarinerWrtParser.hxx:118
MWAWInputStream.hxx
MarinerWrtParser::readZoneHeader
bool readZoneHeader(MarinerWrtEntry const &entry, int zoneId, bool onlyTest)
try to read the zone header
Definition: MarinerWrtParser.cxx:630
MWAWColor::isWhite
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:270
MWAWHeader::reset
void reset(MWAWDocument::Type type, int vers, Kind kind=MWAWDocument::MWAW_K_TEXT)
resets the data
Definition: MWAWHeader.hxx:82
MWAWFont.hxx
MarinerWrtEntry::m_N
int m_N
the number of value
Definition: MarinerWrtParser.hxx:86
MWAWPageSpan::setMargins
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:207
MWAWBox2< long >
MarinerWrtParserInternal::SubDocument::operator!=
virtual bool operator!=(MWAWSubDocument const &doc) const
operator!=
Definition: MarinerWrtParser.cxx:194
MarinerWrtParserInternal::State
Internal: the state of a MarinerWrtParser.
Definition: MarinerWrtParser.cxx:162
operator<<
std::ostream & operator<<(std::ostream &o, MarinerWrtStruct const &dt)
Definition: MarinerWrtParser.cxx:1589
MarinerWrtParser::readEntryHeader
bool readEntryHeader(MarinerWrtEntry &entry)
try to read an entry header
Definition: MarinerWrtParser.cxx:1342
MarinerWrtParser.hxx
MarinerWrtText.hxx
MarinerWrtParserInternal::SubDocument::~SubDocument
virtual ~SubDocument()
destructor
Definition: MarinerWrtParser.cxx:191
MarinerWrtParser::m_pageMarginsSpanSet
bool m_pageMarginsSpanSet
a flag to know if page margins span are set
Definition: MarinerWrtParser.hxx:216
MarinerWrtParserInternal::SubDocument::m_id
int m_id
the subdocument id
Definition: MarinerWrtParser.cxx:214
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
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
MarinerWrtGraph.hxx
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
MWAWSection::Column::m_margins
double m_margins[4]
the margins in inches using libmwaw::Position orders
Definition: MWAWSection.hxx:145

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