MindWrtParser.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 MindWrite document
36  */
37 #ifndef MIND_WRT_PARSER
38 # define MIND_WRT_PARSER
39 
40 #include <string>
41 #include <vector>
42 
43 #include "MWAWDebug.hxx"
44 #include "MWAWInputStream.hxx"
45 
46 #include "MWAWParser.hxx"
47 
48 namespace MindWrtParserInternal
49 {
50 struct LineInfo;
51 struct State;
52 class SubDocument;
53 }
54 
60 class MindWrtParser final : public MWAWTextParser
61 {
63 
64 public:
66  MindWrtParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
68  ~MindWrtParser() final;
69 
71  bool checkHeader(MWAWHeader *header, bool strict=false) final;
72 
73  // the main parse function
74  void parse(librevenge::RVNGTextInterface *documentInterface) final;
75 
76 protected:
78  void init();
79 
81  void createDocument(librevenge::RVNGTextInterface *documentInterface);
82 
84  bool createZones();
85 
87  bool sendZone(int i);
88 
90  bool readGraphic(MindWrtParserInternal::LineInfo const &line);
91 
93  bool readRuler(MindWrtParserInternal::LineInfo &line);
94 
96  bool readCompressedText(MindWrtParserInternal::LineInfo const &line);
97 
99  bool readText(MindWrtParserInternal::LineInfo const &line);
100 
102  void sendText(std::string const &text, std::vector<MWAWFont> const &fonts, std::vector<int> const &textPos);
104  void sendHeaderFooter(bool header);
106  void sendHeaderFooterFields(bool header);
108  bool readFonts(MWAWEntry const &entry, std::vector<MWAWFont> &fonts, std::vector<int> &textPos);
109 
111  bool readPrintInfo(MWAWEntry &entry);
112 
114  bool readLinesInfo(MWAWEntry &entry);
115 
117  bool readLastZone(MWAWEntry &entry);
118 
120  bool readZone8(MWAWEntry &entry);
122  bool readHeadingStates(MWAWEntry &entry);
124  bool readHeadingFields(MWAWEntry &entry);
126  bool readHeadingProperties(MWAWEntry &entry);
128  bool readHeadingCustom(MWAWEntry &entry);
129 
131  void setProperty(MWAWParagraph const &para);
132 
134  void newPage(int number);
135 
136  //
137  // low level
138  //
139 
142 
143 protected:
144  //
145  // data
146  //
148  std::shared_ptr<MindWrtParserInternal::State> m_state;
149 };
150 #endif
151 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MindWrtParser::sendHeaderFooterFields
void sendHeaderFooterFields(bool header)
try to send the header/footer fields as text (in a textbox)
Definition: MindWrtParser.cxx:1101
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
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
MindWrtParserInternal::State::m_footerFieldList
std::vector< Field > m_footerFieldList
the footer field list
Definition: MindWrtParser.cxx:520
MindWrtParserInternal::LineInfo::m_listLevel
int m_listLevel
the item level
Definition: MindWrtParser.cxx:372
MindWrtParserInternal::SubDocument::operator!=
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: MindWrtParser.cxx:539
MindWrtParser::readGraphic
bool readGraphic(MindWrtParserInternal::LineInfo const &line)
try to read a graphic
Definition: MindWrtParser.cxx:942
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
MindWrtParserInternal::ListProperties::m_listLevelsRepeatPos
int m_listLevelsRepeatPos
the position used to repeat level
Definition: MindWrtParser.cxx:155
MindWrtParserInternal::LineInfo::m_entry
MWAWEntry m_entry
the main entry
Definition: MindWrtParser.cxx:356
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
MWAWHeaderFooter::HEADER
@ HEADER
Definition: MWAWPageSpan.hxx:48
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
MWAWListLevel::m_suffix
librevenge::RVNGString m_suffix
string which follows the number if we have an ordered level
Definition: MWAWList.hxx:113
MWAWParagraph::m_listStartValue
MWAWVariable< int > m_listStartValue
the list start value (if set )
Definition: MWAWParagraph.hxx:178
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
MindWrtParserInternal::Field
Internal: a field of a MindWrtParser.
Definition: MindWrtParser.cxx:63
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
MindWrtParser::newPage
void newPage(int number)
adds a new page
Definition: MindWrtParser.cxx:615
MindWrtParserInternal::State::m_numLinesByZone
int m_numLinesByZone[3]
the number of paragraph by zones ( main, header, footer )
Definition: MindWrtParser.cxx:506
MindWrtParserInternal::Field::ok
bool ok() const
return true is the field is defined
Definition: MindWrtParser.cxx:72
MWAWDocument::MWAW_T_MINDWRITE
@ MWAW_T_MINDWRITE
MindWrite.
Definition: MWAWDocument.hxx:128
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
MindWrtParser::setProperty
void setProperty(MWAWParagraph const &para)
sends a paragraph property to the listener
Definition: MindWrtParser.cxx:2086
MWAWEntry::isParsed
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:121
MindWrtParser::readFonts
bool readFonts(MWAWEntry const &entry, std::vector< MWAWFont > &fonts, std::vector< int > &textPos)
try to read the fonts
Definition: MindWrtParser.cxx:1336
MWAWField::m_DTFormat
std::string m_DTFormat
the date/time format using strftime format if defined
Definition: libmwaw_internal.hxx:424
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
MindWrtParserInternal::LineInfo::m_extra
std::string m_extra
extra data
Definition: MindWrtParser.cxx:378
MWAWTextListener
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
MindWrtParserInternal::ZoneInfo::ZoneInfo
ZoneInfo()
Definition: MindWrtParser.cxx:384
MWAWParagraph::m_listLevelIndex
MWAWVariable< int > m_listLevelIndex
the actual level index
Definition: MWAWParagraph.hxx:174
MWAWListLevel::NONE
@ NONE
Definition: MWAWList.hxx:46
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
MWAWTabStop::CENTER
@ CENTER
Definition: MWAWParagraph.hxx:48
MindWrtParserInternal::LineInfo::m_y
int m_y
the y pos
Definition: MindWrtParser.cxx:362
MWAWParagraph::setInterline
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
MWAWListLevel::LOWER_ALPHA
@ LOWER_ALPHA
Definition: MWAWList.hxx:46
MindWrtParser::sendHeaderFooter
void sendHeaderFooter(bool header)
try to send the header/footer zone
Definition: MindWrtParser.cxx:1079
MWAWListLevel::m_startValue
int m_startValue
the actual value (if this is an ordered level )
Definition: MWAWList.hxx:110
MWAWEntry::id
int id() const
returns the id
Definition: MWAWEntry.hxx:164
MindWrtParserInternal::State::m_numPages
int m_numPages
the number of page of the final document
Definition: MindWrtParser.cxx:515
MWAWPosition::WBackground
@ WBackground
Definition: MWAWPosition.hxx:53
MindWrtParserInternal::State::m_headerFieldList
std::vector< Field > m_headerFieldList
the actual list id the header field list
Definition: MindWrtParser.cxx:518
MindWrtParserInternal::Field::m_type
MWAWField::Type m_type
the field type
Definition: MindWrtParser.cxx:121
MindWrtParserInternal::LineInfo::m_height
int m_height
the height
Definition: MindWrtParser.cxx:360
MWAWPageSpan::setMarginBottom
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
MWAWFontConverter.hxx
libmwaw::appendUnicode
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libmwaw_internal.cxx:63
MWAWEmbeddedObject
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
MWAWField::Type
Type
Defines some basic type for field.
Definition: libmwaw_internal.hxx:401
MWAWParagraph::m_spacings
MWAWVariable< double > m_spacings[3]
the line spacing
Definition: MWAWParagraph.hxx:156
MWAWEntry::type
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
MindWrtParser::readHeadingStates
bool readHeadingStates(MWAWEntry &entry)
read the heading state
Definition: MindWrtParser.cxx:1626
MWAWPrinter.hxx
MindWrtParserInternal::LineInfo::m_specialHeadingInterface
bool m_specialHeadingInterface
true if the paragraph
Definition: MindWrtParser.cxx:368
MWAWParagraph
class to store the paragraph properties
Definition: MWAWParagraph.hxx:85
MWAWPageSpan::setMarginLeft
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
MWAWListManager::getNewList
std::shared_ptr< MWAWList > getNewList(std::shared_ptr< MWAWList > actList, int levl, MWAWListLevel const &level)
returns a new list corresponding to a list where we have a new level
Definition: MWAWList.cxx:404
MWAWFont::Line::Simple
@ Simple
Definition: MWAWFont.hxx:49
MWAWListLevel::UPPER_ALPHA
@ UPPER_ALPHA
Definition: MWAWList.hxx:46
MindWrtParser::readPrintInfo
bool readPrintInfo(MWAWEntry &entry)
read the print info zone
Definition: MindWrtParser.cxx:1990
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
MindWrtParserInternal::ListProperties::m_showFirstLevel
bool m_showFirstLevel
true if we show the level 1 label
Definition: MindWrtParser.cxx:157
libmwaw::PrinterInfo
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
MindWrtParser::readEntry
MWAWEntry readEntry()
read a file entry
Definition: MindWrtParser.cxx:628
MindWrtParser::readHeadingFields
bool readHeadingFields(MWAWEntry &entry)
read the heading field zone ( zone 12 )
Definition: MindWrtParser.cxx:1932
MWAWEntry::setParsed
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
MWAWParser::getTextListener
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
MindWrtParserInternal::LineInfo::m_paragraphSet
bool m_paragraphSet
true if the paragraph is reset
Definition: MindWrtParser.cxx:370
MindWrtParserInternal::Field::m_extra
std::string m_extra
extra data
Definition: MindWrtParser.cxx:125
MindWrtParser::sendText
void sendText(std::string const &text, std::vector< MWAWFont > const &fonts, std::vector< int > const &textPos)
try to send the text
Definition: MindWrtParser.cxx:2056
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
MindWrtParserInternal::LineInfo::m_flags
int m_flags[4]
two flags
Definition: MindWrtParser.cxx:376
MindWrtParserInternal::ZoneInfo::updateListId
void updateListId(ListProperties &prop, MWAWListManager &listManager)
update the line list id
Definition: MindWrtParser.cxx:396
MWAWListLevel::m_labelBeforeSpace
double m_labelBeforeSpace
the extra space between inserting a label
Definition: MWAWList.hxx:104
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
MindWrtParser::m_state
std::shared_ptr< MindWrtParserInternal::State > m_state
the state
Definition: MindWrtParser.hxx:148
MindWrtParser::MindWrtParser
MindWrtParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: MindWrtParser.cxx:590
MWAWHeaderFooter
a class which stores the header/footer data
Definition: MWAWPageSpan.hxx:45
MWAWField::PageCount
@ PageCount
Definition: libmwaw_internal.hxx:401
MWAWCell.hxx
Defines MWAWCell (cell content and format)
MWAWField::Date
@ Date
Definition: libmwaw_internal.hxx:401
MWAWParser::asciiName
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
MWAWField::BookmarkEnd
@ BookmarkEnd
Definition: libmwaw_internal.hxx:401
MWAWTabStop
class to store a tab use by MWAWParagraph
Definition: MWAWParagraph.hxx:46
MindWrtParserInternal::LineInfo::m_listType
int m_listType
the item type
Definition: MindWrtParser.cxx:374
MWAWSubDocument.hxx
MindWrtParserInternal::SubDocument
Internal: the subdocument of a MindWrtParser.
Definition: MindWrtParser.cxx:526
MWAWListLevel::isNumeric
bool isNumeric() const
returns true if the list is decimal, alpha or roman
Definition: MWAWList.hxx:81
MWAWPageSpan::setFormLength
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
MWAWParser::getPageWidth
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWParser.hxx:185
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
MWAWParagraph::JustificationCenter
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
MWAWFont::shadowBit
@ shadowBit
Definition: MWAWFont.hxx:191
MWAWEntry::setType
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:132
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
MWAWListLevel::UPPER_ROMAN
@ UPPER_ROMAN
Definition: MWAWList.hxx:47
libmwaw::DebugFile::skipZone
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
MindWrtParserInternal::SubDocument::m_step
int m_step
the current step: 0 mean send header, 1 mean send header fields
Definition: MindWrtParser.cxx:556
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
MindWrtParser::readText
bool readText(MindWrtParserInternal::LineInfo const &line)
try to read a non compressed text zone
Definition: MindWrtParser.cxx:1169
MWAWField::Database
@ Database
Definition: libmwaw_internal.hxx:401
MindWrtParser::readRuler
bool readRuler(MindWrtParserInternal::LineInfo &line)
try to read a ruler
Definition: MindWrtParser.cxx:984
MWAWPageSpan::setFormWidth
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
MindWrtParserInternal::LineInfo::LineInfo
LineInfo()
Definition: MindWrtParser.cxx:257
MWAWPosition.hxx
MindWrtParserInternal::State
Internal: the state of a MindWrtParser.
Definition: MindWrtParser.cxx:488
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:668
MindWrtParserInternal::Field::operator<<
friend std::ostream & operator<<(std::ostream &o, Field const &field)
operator<<
Definition: MindWrtParser.cxx:86
MindWrtParserInternal::ListProperties::m_startListIndex
int m_startListIndex
the first list index
Definition: MindWrtParser.cxx:147
MindWrtParserInternal::ListProperties::m_headingStyle
int m_headingStyle
the heading labels style
Definition: MindWrtParser.cxx:149
MindWrtParserInternal::State::m_compressCorr
std::string m_compressCorr
the correspondance between int compressed and char : must be 15 character
Definition: MindWrtParser.cxx:503
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
MindWrtParserInternal::ListProperties::updateHeadingList
void updateHeadingList()
updates the heading list
Definition: MindWrtParser.cxx:194
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
MindWrtParserInternal::ListProperties::m_headingListLevels
std::vector< MWAWListLevel > m_headingListLevels
the heading list
Definition: MindWrtParser.cxx:153
MindWrtParser::createZones
bool createZones()
finds the different objects zones
Definition: MindWrtParser.cxx:740
MindWrtParser::createDocument
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: MindWrtParser.cxx:696
MWAWRSRCParserPtr
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
MWAWPosition::m_wrapping
Wrapping m_wrapping
Wrapping.
Definition: MWAWPosition.hxx:278
MWAWEntry::length
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
MindWrtParserInternal::Field::Field
Field(MWAWField::Type type=MWAWField::None)
constructor
Definition: MindWrtParser.cxx:65
MindWrtParserInternal::State::m_zones
ZoneInfo m_zones[3]
the zones
Definition: MindWrtParser.cxx:508
libmwaw::DebugFile::setStream
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
MWAWField::None
@ None
Definition: libmwaw_internal.hxx:401
MWAWVec2< int >
MindWrtParserInternal::State::m_entryMap
std::multimap< std::string, MWAWEntry > m_entryMap
the zones map
Definition: MindWrtParser.cxx:511
MindWrtParser::readLastZone
bool readLastZone(MWAWEntry &entry)
read the last zone ( pos + 7fffffff )
Definition: MindWrtParser.cxx:1584
MWAWPictMac.hxx
MWAWTabStop::m_alignment
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:76
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
MindWrtParserInternal::LineInfo::m_paragraph
MWAWParagraph m_paragraph
the paragraph
Definition: MindWrtParser.cxx:366
MindWrtParserInternal::ZoneInfo::m_linesList
std::vector< LineInfo > m_linesList
the list of line information
Definition: MindWrtParser.cxx:393
MWAWHeader
a function used by MWAWDocument to store the version of document
Definition: MWAWHeader.hxx:57
MindWrtParser::readCompressedText
bool readCompressedText(MindWrtParserInternal::LineInfo const &line)
try to read a compressed text zone
Definition: MindWrtParser.cxx:1237
MWAWEntry::begin
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
MWAWField::BookmarkStart
@ BookmarkStart
Definition: libmwaw_internal.hxx:401
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
MindWrtParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: MindWrtParser.cxx:1398
MWAWListLevel::LOWER_ROMAN
@ LOWER_ROMAN
Definition: MWAWList.hxx:47
MWAWTabStop::m_position
double m_position
the tab position
Definition: MWAWParagraph.hxx:74
MindWrtParser::parse
void parse(librevenge::RVNGTextInterface *documentInterface) final
virtual function used to parse the input
Definition: MindWrtParser.cxx:643
MWAWFont::setId
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
MindWrtParser::readHeadingCustom
bool readHeadingCustom(MWAWEntry &entry)
read the heading custom zone
Definition: MindWrtParser.cxx:1674
MWAWEntry::setId
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
MindWrtParserInternal::Field::getField
MWAWField getField() const
Definition: MindWrtParser.cxx:76
MWAWField
a field
Definition: libmwaw_internal.hxx:399
MWAWField::PageNumber
@ PageNumber
Definition: libmwaw_internal.hxx:401
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
MWAWPosition::Char
@ Char
Definition: MWAWPosition.hxx:51
MindWrtParserInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: MindWrtParser.cxx:536
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MWAWHeader.hxx
Defines MWAWHeader (document's type, version, kind)
MindWrtParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: MindWrtParser.cxx:559
MindWrtParser::readLinesInfo
bool readLinesInfo(MWAWEntry &entry)
read the lines information zone
Definition: MindWrtParser.cxx:1505
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
MindWrtParserInternal::State::m_actPage
int m_actPage
the actual page
Definition: MindWrtParser.cxx:515
MWAWHeaderFooter::ALL
@ ALL
Definition: MWAWPageSpan.hxx:50
MindWrtParserInternal::Field::m_pos
MWAWVec2i m_pos
the field position: x position in point, y position in line (-1: means no field )
Definition: MindWrtParser.cxx:123
MWAWList.hxx
MindWrtParserInternal::LineInfo::m_type
int m_type
the entry type
Definition: MindWrtParser.cxx:358
MWAWListLevel::DECIMAL
@ DECIMAL
Definition: MWAWList.hxx:46
MWAWFont::italicBit
@ italicBit
Definition: MWAWFont.hxx:190
MWAWParagraph::m_marginsUnit
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:150
MindWrtParser::readZone8
bool readZone8(MWAWEntry &entry)
read the 8th zone ( unknown zone)
Definition: MindWrtParser.cxx:1878
MindWrtParser
the main class to read a MindWrite file
Definition: MindWrtParser.hxx:61
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
MWAWTextListener.hxx
Defines MWAWTextListener: the libmwaw word processor listener.
MWAWListLevel::BULLET
@ BULLET
Definition: MWAWList.hxx:46
MindWrtParserInternal::ListProperties::ListProperties
ListProperties()
constructor
Definition: MindWrtParser.cxx:132
MindWrtParserInternal::ListProperties::m_headingFullSubLevels
bool m_headingFullSubLevels
true if heading labels show all sub level
Definition: MindWrtParser.cxx:151
MWAWSubDocument::m_parser
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
MWAWParagraph::JustificationFull
@ JustificationFull
Definition: MWAWParagraph.hxx:90
MWAWListLevel::m_labelWidth
double m_labelWidth
the minimum label width
Definition: MWAWList.hxx:105
MWAWParagraph::JustificationRight
@ JustificationRight
Definition: MWAWParagraph.hxx:91
MindWrtParserInternal::ListProperties
Internal: the list properties of a MindWrtParser.
Definition: MindWrtParser.cxx:130
MWAWListLevel
small structure to keep information about a list level
Definition: MWAWList.hxx:44
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MWAWListLevel::m_type
Type m_type
the type of the level
Definition: MWAWList.hxx:101
MWAWPageSpan::setMarginRight
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
MindWrtParserInternal::ZoneInfo
Internal: a zone information of a MindWrtParser.
Definition: MindWrtParser.cxx:383
MWAWEntry::valid
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
MWAWPageSpan::setHeaderFooter
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
MWAWListLevel::m_numBeforeLabels
int m_numBeforeLabels
the number of label to show before this
Definition: MWAWList.hxx:103
MindWrtParserInternal::ListProperties::m_useHeadingStyle
bool m_useHeadingStyle
true if we need to use heading style
Definition: MindWrtParser.cxx:159
MWAWListLevel::m_labelAfterSpace
double m_labelAfterSpace
the minimum distance between the label and the text
Definition: MWAWList.hxx:106
MindWrtParser::init
void init()
inits all internal variables
Definition: MindWrtParser.cxx:601
MWAWListManager
a manager which manages the lists, keeps the different kind of lists, to assure the unicity of each l...
Definition: MWAWList.hxx:216
MWAWPosition::Paragraph
@ Paragraph
Definition: MWAWPosition.hxx:51
MWAWInputStream.hxx
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
MindWrtParserInternal::LineInfo::m_page
int m_page
the page number
Definition: MindWrtParser.cxx:364
MindWrtParserInternal::LineInfo::operator<<
friend std::ostream & operator<<(std::ostream &o, LineInfo const &line)
operator<<
Definition: MindWrtParser.cxx:274
MWAWFont.hxx
MWAWPosition::m_anchorTo
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:270
librevenge
Definition: MWAWDocument.hxx:57
MindWrtParser.hxx
MWAWPageSpan::setMargins
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
MindWrtParser::~MindWrtParser
~MindWrtParser() final
destructor
Definition: MindWrtParser.cxx:597
MWAWBox2< float >
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:44
MindWrtParser::readHeadingProperties
bool readHeadingProperties(MWAWEntry &entry)
read the heading property zone
Definition: MindWrtParser.cxx:1801
MindWrtParserInternal::ListProperties::getLevel
MWAWListLevel getLevel(int level) const
returns a list level
Definition: MindWrtParser.cxx:162
MWAWListLevel::m_prefix
librevenge::RVNGString m_prefix
string which preceedes the number if we have an ordered level
Definition: MWAWList.hxx:112
MWAWParagraph::m_extra
std::string m_extra
a string to store some errors
Definition: MWAWParagraph.hxx:190
MWAWField::Title
@ Title
Definition: libmwaw_internal.hxx:401
MindWrtParser::sendZone
bool sendZone(int i)
try to send a zone
Definition: MindWrtParser.cxx:855
MindWrtParserInternal::State::State
State()
constructor
Definition: MindWrtParser.cxx:490
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
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
MindWrtParserInternal::State::m_listProperties
ListProperties m_listProperties
the list properties
Definition: MindWrtParser.cxx:514
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
MindWrtParserInternal
Internal: the structures of a MindWrtParser.
Definition: MindWrtParser.cxx:60
MWAWParser::resetTextListener
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:163
MindWrtParserInternal::LineInfo
Internal: a line information of a MindWrtParser.
Definition: MindWrtParser.cxx:256
MindWrtParserInternal::SubDocument::SubDocument
SubDocument(MindWrtParser &pars, MWAWInputStreamPtr const &input, int zoneId, int step)
Definition: MindWrtParser.cxx:528
MindWrtParserInternal::SubDocument::m_id
int m_id
the subdocument id
Definition: MindWrtParser.cxx:554
MWAWFont::setFlags
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325

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