StudentWritingCParser.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 Student Writing Center 1.0 text document
36  *
37  */
38 #ifndef STUDENT_WRITING_C__PARSER
39 # define STUDENT_WRITING_C__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 Zone;
53 
54 class SubDocument;
55 }
56 
63 {
65 
66 public:
68  StudentWritingCParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
70  ~StudentWritingCParser() final;
71 
73  bool checkHeader(MWAWHeader *header, bool strict=false) final;
74 
75  // the main parse function
76  void parse(librevenge::RVNGTextInterface *documentInterface) final;
77 
78 protected:
80  void createDocument(librevenge::RVNGTextInterface *documentInterface);
81 
83  bool createZones();
84 
86  bool readTextZone(StudentWritingCParserInternal::Zone const &zone);
88  bool readFrame(StudentWritingCParserInternal::Zone &zone);
94  bool readFontsList(MWAWEntry const &entry);
96  bool readPrintInfo();
97 
99  bool sendZone(int id);
101  bool sendText(StudentWritingCParserInternal::Zone const &zone, StudentWritingCParserInternal::Zone const &parent, bool isMain=false);
103  bool sendPicture(MWAWPosition const &pos, int id);
104 
107 protected:
108  //
109  // data
110  //
111 
113  std::shared_ptr<StudentWritingCParserInternal::State> m_state;
114 };
115 #endif
116 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
StudentWritingCParserInternal::LWZDecoder::LWZEntry::LWZEntry
LWZEntry(unsigned int prefixCode=0, unsigned char suffix=0)
constructor
Definition: StudentWritingCParser.cxx:2284
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
StudentWritingCParser::readParagraph
bool readParagraph(StudentWritingCParserInternal::Zone &zone)
try to read the paragraph zone with type=4
Definition: StudentWritingCParser.cxx:1375
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
StudentWritingCParserInternal::Zone::m_idToEntryMap
std::map< int, MWAWEntry > m_idToEntryMap
the id to sub zone map
Definition: StudentWritingCParser.cxx:172
StudentWritingCParserInternal::LWZDecoder::e_maxCodeLen
static int const e_maxCodeLen
Definition: StudentWritingCParser.cxx:2232
MWAWParser::getFontConverter
MWAWFontConverterPtr & getFontConverter()
returns the font converter
Definition: MWAWParser.hxx:150
StudentWritingCParserInternal::Zone::m_type
int m_type
the zone type
Definition: StudentWritingCParser.cxx:168
MWAWFont::set
void set(Script const &newscript)
sets the script position
Definition: MWAWFont.hxx:314
StudentWritingCParserInternal::PictureStruct
an structure of StudentWritingCParserInternal to store the position of a picture and its entries
Definition: StudentWritingCParser.cxx:104
MWAWNote
a note
Definition: libmwaw_internal.hxx:445
StudentWritingCParserInternal::FrameStruct
an structure of StudentWritingCParserInternal to store the position of a frame and its entries
Definition: StudentWritingCParser.cxx:66
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
StudentWritingCParserInternal::Zone::m_idToDataMap
std::map< int, ZoneStruct > m_idToDataMap
a map id to main zone data, ...
Definition: StudentWritingCParser.cxx:180
StudentWritingCParserInternal::State::getColor
bool getColor(int id, MWAWColor &color) const
try to return a color corresponding to a color id
Definition: StudentWritingCParser.cxx:218
MWAWHeaderFooter::HEADER
@ HEADER
Definition: MWAWPageSpan.hxx:48
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
StudentWritingCParserInternal::LWZDecoder::LWZEntry::m_prefixCode
unsigned int m_prefixCode
code for remaining chars in string
Definition: StudentWritingCParser.cxx:2292
StudentWritingCParserInternal::FrameStruct::m_boxes
MWAWBox2f m_boxes[2]
the bounding boxes
Definition: StudentWritingCParser.cxx:81
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
StudentWritingCParserInternal::LWZDecoder::getBit
unsigned getBit() const
Definition: StudentWritingCParser.cxx:2256
MWAWListener::ColumnBreak
@ ColumnBreak
Definition: MWAWListener.hxx:58
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
StudentWritingCParserInternal::FrameStruct::m_type
int m_type
the frame type
Definition: StudentWritingCParser.cxx:75
StudentWritingCParserInternal::FrameStruct::m_page
int m_page
the page
Definition: StudentWritingCParser.cxx:77
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
StudentWritingCParserInternal::Zone::m_idToPictureMap
std::map< int, PictureStruct > m_idToPictureMap
a map id to picture positions, ...
Definition: StudentWritingCParser.cxx:192
StudentWritingCParserInternal::State::m_numPages
int m_numPages
the number of page of the final document
Definition: StudentWritingCParser.cxx:238
StudentWritingCParserInternal::Zone
a list of entry of StudentWritingCParser defining a zone
Definition: StudentWritingCParser.cxx:137
StudentWritingCParser::readFontsList
bool readFontsList(MWAWEntry const &entry)
try to read the font list: the first entry of a zone with type=7
Definition: StudentWritingCParser.cxx:1592
StudentWritingCParser::readPrintInfo
bool readPrintInfo()
try to read the printer information
Definition: StudentWritingCParser.cxx:1664
MWAWPosition::setPage
void setPage(int pg) const
sets the page
Definition: MWAWPosition.hxx:205
MWAWField::m_DTFormat
std::string m_DTFormat
the date/time format using strftime format if defined
Definition: libmwaw_internal.hxx:424
StudentWritingCParserInternal::LWZDecoder
a basic LWZ decoder
Definition: StudentWritingCParser.cxx:2230
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
StudentWritingCParserInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: StudentWritingCParser.cxx:272
MWAWInputStream
Internal class used to read the file stream Internal class used to read the file stream,...
Definition: MWAWInputStream.hxx:54
MWAWDocument::MWAW_T_STUDENTWRITING
@ MWAW_T_STUDENTWRITING
Student Writing Center: v1.
Definition: MWAWDocument.hxx:245
MWAWTextListener
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
MWAWTable.hxx
MWAWFont::setColor
void setColor(MWAWColor color)
sets the font color
Definition: MWAWFont.hxx:341
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
StudentWritingCParserInternal::LWZDecoder::LWZDecoder
LWZDecoder(unsigned char const *data, unsigned long len)
constructor
Definition: StudentWritingCParser.cxx:2236
MWAWTabStop::CENTER
@ CENTER
Definition: MWAWParagraph.hxx:48
MWAWParagraph::setInterline
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: MWAWParagraph.hxx:129
StudentWritingCParserInternal::PictureStruct::m_box
MWAWBox2f m_box
the bounding box
Definition: StudentWritingCParser.cxx:112
MWAWEntry::id
int id() const
returns the id
Definition: MWAWEntry.hxx:164
MWAWPosition::WBackground
@ WBackground
Definition: MWAWPosition.hxx:53
MWAWEntry.hxx
MWAWPageSpan::setMarginBottom
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
StudentWritingCParserInternal::LWZDecoder::e_firstCode
static int const e_firstCode
Definition: StudentWritingCParser.cxx:2231
MWAWFontConverter.hxx
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:192
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
StudentWritingCParserInternal::SubDocument
Internal: the subdocument of a StudentWritingCParser.
Definition: StudentWritingCParser.cxx:263
MWAWSection::setColumns
void setColumns(int num, double width, librevenge::RVNGUnit widthUnit, double colSep=0)
a function which sets n uniform columns
Definition: MWAWSection.cxx:109
MWAWSubDocumentPtr
std::shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:565
StudentWritingCParser::readPicture
bool readPicture(StudentWritingCParserInternal::Zone &zone)
try to read a picture zone with type=6
Definition: StudentWritingCParser.cxx:1506
MWAWFont::outlineBit
@ outlineBit
Definition: MWAWFont.hxx:191
StudentWritingCParserInternal::State::m_sendZoneSet
std::set< int > m_sendZoneSet
a set to keep the list of send zone (to avoid loop)
Definition: StudentWritingCParser.cxx:255
StudentWritingCParserInternal::PageStruct::m_pageNumber
int m_pageNumber
the page number
Definition: StudentWritingCParser.cxx:94
MWAWPrinter.hxx
StudentWritingCParserInternal::Zone::m_idToParagraphMap
std::map< int, MWAWParagraph > m_idToParagraphMap
a map id to paragraph
Definition: StudentWritingCParser.cxx:177
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
StudentWritingCParserInternal::LWZDecoder::decode
bool decode(std::vector< unsigned char > &output)
decode data
Definition: StudentWritingCParser.cxx:2328
StudentWritingCParser
the main class to read a Student Writing Center file
Definition: StudentWritingCParser.hxx:63
MWAWPosition::WDynamic
@ WDynamic
Definition: MWAWPosition.hxx:53
StudentWritingCParser::~StudentWritingCParser
~StudentWritingCParser() final
destructor
Definition: StudentWritingCParser.cxx:325
MWAWFont::Line::Simple
@ Simple
Definition: MWAWFont.hxx:49
StudentWritingCParserInternal::Zone::m_idToPageMap
std::map< int, PageStruct > m_idToPageMap
a map id to page positions, ...
Definition: StudentWritingCParser.cxx:182
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
StudentWritingCParser::StudentWritingCParser
StudentWritingCParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: StudentWritingCParser.cxx:313
StudentWritingCParserInternal::LWZDecoder::m_data
unsigned char const * m_data
Definition: StudentWritingCParser.cxx:2321
StudentWritingCParserInternal::State::m_sendBoxesStack
std::stack< MWAWBox2f > m_sendBoxesStack
a stack of send bounding box (use to send background picture)
Definition: StudentWritingCParser.cxx:257
StudentWritingCParserInternal::ZoneEntry
std::pair< int, int > ZoneEntry
Definition: StudentWritingCParser.cxx:64
StudentWritingCParserInternal::Zone::m_frames
std::vector< FrameStruct > m_frames
a list of frames
Definition: StudentWritingCParser.cxx:184
MWAWParser::getTextListener
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
StudentWritingCParserInternal::SubDocument::SubDocument
SubDocument(StudentWritingCParser &pars, MWAWInputStreamPtr const &input, int id)
Definition: StudentWritingCParser.cxx:265
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
StudentWritingCParserInternal::LWZDecoder::LWZDecoder
LWZDecoder(LWZDecoder const &)=delete
MWAWParagraph::m_margins
MWAWVariable< double > m_margins[3]
the margins
Definition: MWAWParagraph.hxx:148
StudentWritingCParserInternal::State::m_isUncompressed
bool m_isUncompressed
a flag to know if we have uncompress the data
Definition: StudentWritingCParser.cxx:241
MWAWTabStop::DECIMAL
@ DECIMAL
Definition: MWAWParagraph.hxx:48
StudentWritingCParser::readFrame
bool readFrame(StudentWritingCParserInternal::Zone &zone)
try to read a frame zone with type=3
Definition: StudentWritingCParser.cxx:1110
StudentWritingCParserInternal::State::m_idToFontNameMap
std::map< int, std::string > m_idToFontNameMap
a map id to font name
Definition: StudentWritingCParser.cxx:250
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
MWAWHeaderFooter
a class which stores the header/footer data
Definition: MWAWPageSpan.hxx:45
StudentWritingCParserInternal::ZoneStruct::m_flags
int m_flags
the zone flag
Definition: StudentWritingCParser.cxx:129
MWAWCell.hxx
Defines MWAWCell (cell content and format)
MWAWField::Date
@ Date
Definition: libmwaw_internal.hxx:401
StudentWritingCParser::sendText
bool sendText(StudentWritingCParserInternal::Zone const &zone, StudentWritingCParserInternal::Zone const &parent, bool isMain=false)
try to send the text(s) corresponding to a zone of type 5
Definition: StudentWritingCParser.cxx:1927
StudentWritingCParserInternal::FrameStruct::m_id
ZoneEntry m_id
the zone id
Definition: StudentWritingCParser.cxx:79
MWAWParser::asciiName
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
StudentWritingCParserInternal::ZoneStruct::m_margins
float m_margins[4]
the margins: LTRB
Definition: StudentWritingCParser.cxx:133
MWAWTabStop
class to store a tab use by MWAWParagraph
Definition: MWAWParagraph.hxx:46
StudentWritingCParserInternal::PageStruct::m_numColumns
int m_numColumns
the number of columns
Definition: StudentWritingCParser.cxx:98
MWAWSubDocument.hxx
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
StudentWritingCParserInternal::PictureStruct::PictureStruct
PictureStruct()
constructor
Definition: StudentWritingCParser.cxx:106
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:188
StudentWritingCParser::createDocument
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: StudentWritingCParser.cxx:366
StudentWritingCParserInternal::PageStruct::m_hfIds
ZoneEntry m_hfIds[2]
the header/footer id
Definition: StudentWritingCParser.cxx:100
MWAWSubDocument::m_input
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
StudentWritingCParserInternal::LWZDecoder::operator=
LWZDecoder & operator=(LWZDecoder const &)=delete
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
MWAWParagraph::JustificationCenter
@ JustificationCenter
Definition: MWAWParagraph.hxx:90
StudentWritingCParserInternal::PageStruct
an structure of StudentWritingCParserInternal to store the page's data
Definition: StudentWritingCParser.cxx:85
MWAWFont::Line::None
@ None
Definition: MWAWFont.hxx:49
MWAWFont::shadowBit
@ shadowBit
Definition: MWAWFont.hxx:191
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
MWAWVec2::y
T y() const
second element
Definition: libmwaw_internal.hxx:673
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
StudentWritingCParserInternal::State::m_idToFontNameUsed
std::set< int > m_idToFontNameUsed
a set to store the font name used
Definition: StudentWritingCParser.cxx:252
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
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:668
StudentWritingCParserInternal::State::m_idToZoneMap
std::map< int, std::shared_ptr< Zone > > m_idToZoneMap
a map id to zone data
Definition: StudentWritingCParser.cxx:247
StudentWritingCParserInternal::State::checkIfZone
bool checkIfZone(int id, int type) const
small function to know if a zone with given type exists
Definition: StudentWritingCParser.cxx:233
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
StudentWritingCParserInternal::PageStruct::PageStruct
PageStruct()
constructor
Definition: StudentWritingCParser.cxx:87
StudentWritingCParserInternal::SubDocument::operator!=
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: StudentWritingCParser.cxx:275
StudentWritingCParserInternal::ZoneStruct::m_ids
ZoneEntry m_ids[9]
the zone ids
Definition: StudentWritingCParser.cxx:127
StudentWritingCParser::createZones
bool createZones()
finds the different objects zones
Definition: StudentWritingCParser.cxx:442
StudentWritingCParserInternal::ZoneStruct
an structure of StudentWritingCParserInternal to store the position of a zone and its entries
Definition: StudentWritingCParser.cxx:118
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
libmwaw::DebugFile::setStream
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
StudentWritingCParserInternal::LWZDecoder::LWZEntry::m_suffix
unsigned char m_suffix
last char in encoded string
Definition: StudentWritingCParser.cxx:2290
MWAWVec2< int >
MWAWPictMac.hxx
MWAWTabStop::m_alignment
Alignment m_alignment
the alignment ( left, center, ...)
Definition: MWAWParagraph.hxx:76
MWAWSection
a class which stores section properties
Definition: MWAWSection.hxx:46
StudentWritingCParser::m_state
std::shared_ptr< StudentWritingCParserInternal::State > m_state
the state
Definition: StudentWritingCParser.hxx:113
libmwaw::ParseException
Definition: libmwaw_internal.hxx:144
MWAWDebug.hxx
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
StudentWritingCParserInternal::LWZDecoder::LWZEntry
Definition: StudentWritingCParser.cxx:2282
MWAWParser::getPageSpan
MWAWPageSpan const & getPageSpan() const
returns the actual page dimension
Definition: MWAWParser.hxx:160
StudentWritingCParserInternal::LWZDecoder::m_len
unsigned long m_len
Definition: StudentWritingCParser.cxx:2322
MWAWColor::black
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
MWAWBox2f
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1193
MWAWTabStop::m_position
double m_position
the tab position
Definition: MWAWParagraph.hxx:74
MWAWFont::setId
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:264
StudentWritingCParserInternal::Zone::m_idToFrameNoteMap
std::map< int, ZoneEntry > m_idToFrameNoteMap
a map id to frame note entry
Definition: StudentWritingCParser.cxx:188
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
MWAWPageSpan::setMarginTop
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
StudentWritingCParserInternal::LWZDecoder::m_pos
unsigned long m_pos
Definition: StudentWritingCParser.cxx:2323
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
StudentWritingCParserInternal::Zone::m_idToObjectMap
std::map< int, MWAWEmbeddedObject > m_idToObjectMap
a map id to an embedded object
Definition: StudentWritingCParser.cxx:194
StudentWritingCParserInternal::Zone::insert
bool insert(int id, MWAWEntry const &entry)
insert a new entry
Definition: StudentWritingCParser.cxx:158
StudentWritingCParserInternal::Zone::m_id
int m_id
the zone id
Definition: StudentWritingCParser.cxx:170
StudentWritingCParserInternal::State::State
State()
constructor
Definition: StudentWritingCParser.cxx:201
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
StudentWritingCParserInternal::Zone::m_idToFrameBiblioMap
std::map< int, librevenge::RVNGString > m_idToFrameBiblioMap
a map id to biblio text
Definition: StudentWritingCParser.cxx:190
StudentWritingCParserInternal::LWZDecoder::decodeRec
unsigned char decodeRec(unsigned int code, std::vector< unsigned char > &output)
Definition: StudentWritingCParser.cxx:2295
StudentWritingCParserInternal::ZoneStruct::ZoneStruct
ZoneStruct()
constructor
Definition: StudentWritingCParser.cxx:120
MWAWHeader.hxx
Defines MWAWHeader (document's type, version, kind)
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
StudentWritingCParser::readTextZone
bool readTextZone(StudentWritingCParserInternal::Zone const &zone)
try to read a text zone with type=1
Definition: StudentWritingCParser.cxx:867
MWAWHeaderFooter::ALL
@ ALL
Definition: MWAWPageSpan.hxx:50
StudentWritingCParserInternal::PictureStruct::m_ids
int m_ids[2]
the zone id and the zone sub ids
Definition: StudentWritingCParser.cxx:114
StudentWritingCParser.hxx
StudentWritingCParserInternal
Internal: the structures of a StudentWritingCParser.
Definition: StudentWritingCParser.cxx:63
StudentWritingCParserInternal::FrameStruct::FrameStruct
FrameStruct(int type)
constructor
Definition: StudentWritingCParser.cxx:68
MWAWFont::italicBit
@ italicBit
Definition: MWAWFont.hxx:190
MWAWParagraph::m_marginsUnit
MWAWVariable< librevenge::RVNGUnit > m_marginsUnit
the margins INCH, ...
Definition: MWAWParagraph.hxx:150
StudentWritingCParserInternal::LWZDecoder::m_dictionary
std::vector< LWZEntry > m_dictionary
Definition: StudentWritingCParser.cxx:2325
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
StudentWritingCParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: StudentWritingCParser.cxx:292
MWAWTextListener.hxx
Defines MWAWTextListener: the libmwaw word processor listener.
StudentWritingCParserInternal::SubDocument::m_zoneId
int m_zoneId
the zone id
Definition: StudentWritingCParser.cxx:289
MWAWPosition::Page
@ Page
Definition: MWAWPosition.hxx:51
MWAWSubDocument::m_parser
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
MWAWParagraph::JustificationFull
@ JustificationFull
Definition: MWAWParagraph.hxx:90
MWAWSection.hxx
MWAWParagraph::JustificationRight
@ JustificationRight
Definition: MWAWParagraph.hxx:91
StudentWritingCParserInternal::LWZDecoder::getCodeWord
unsigned getCodeWord(unsigned codeLen) const
Definition: StudentWritingCParser.cxx:2267
StudentWritingCParserInternal::Zone::Zone
Zone(int type, int id)
constructor
Definition: StudentWritingCParser.cxx:139
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
StudentWritingCParserInternal::LWZDecoder::e_maxCode
static int const e_maxCode
Definition: StudentWritingCParser.cxx:2233
StudentWritingCParserInternal::State::m_actPage
int m_actPage
the actual page
Definition: StudentWritingCParser.cxx:238
MWAWPageSpan::setMarginRight
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
StudentWritingCParserInternal::ZoneStruct::m_subZones2
int m_subZones2
the number of subzone in zone2
Definition: StudentWritingCParser.cxx:131
MWAWPageSpan::setHeaderFooter
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
StudentWritingCParser::parse
void parse(librevenge::RVNGTextInterface *documentInterface) final
virtual function used to parse the input
Definition: StudentWritingCParser.cxx:332
StudentWritingCParser::sendZone
bool sendZone(int id)
try to send a zone knowing its id
Definition: StudentWritingCParser.cxx:1768
MWAWPosition::Frame
@ Frame
Definition: MWAWPosition.hxx:51
StudentWritingCParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: StudentWritingCParser.cxx:1728
MWAWFont::Script
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:106
StudentWritingCParserInternal::State::m_ids
ZoneEntry m_ids[2]
the main zone id and the font id
Definition: StudentWritingCParser.cxx:243
StudentWritingCParserInternal::LWZDecoder::m_bit
unsigned long m_bit
Definition: StudentWritingCParser.cxx:2323
MWAWStringStream.hxx
MWAWInputStream.hxx
StudentWritingCParser::decode
MWAWInputStreamPtr decode()
low level: try to uncompress the different compressed zone
Definition: StudentWritingCParser.cxx:2394
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
MWAWFont::flags
uint32_t flags() const
returns the font flags
Definition: MWAWFont.hxx:320
MWAWPageSpan::setMargins
void setMargins(double margin, int wh=libmwaw::LeftBit|libmwaw::RightBit|libmwaw::TopBit|libmwaw::BottomBit)
set all the margins
Definition: MWAWPageSpan.hxx:213
MWAWTabStop::RIGHT
@ RIGHT
Definition: MWAWParagraph.hxx:48
MWAWBox2< float >
StudentWritingCParser::sendPicture
bool sendPicture(MWAWPosition const &pos, int id)
try to send a picture: type 6
Definition: StudentWritingCParser.cxx:1894
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:44
MWAWNote::EndNote
@ EndNote
Definition: libmwaw_internal.hxx:447
StudentWritingCParserInternal::PageStruct::m_firstChar
int m_firstChar
the first character
Definition: StudentWritingCParser.cxx:96
StudentWritingCParserInternal::LWZDecoder::initDictionary
void initDictionary()
Definition: StudentWritingCParser.cxx:2250
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
StudentWritingCParserInternal::State::m_zones
std::vector< std::shared_ptr< Zone > > m_zones
the list of zone
Definition: StudentWritingCParser.cxx:245
libmwaw::DebugStream
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MWAWParser.hxx
StudentWritingCParserInternal::Zone::m_frameDates
std::vector< std::array< int, 3 > > m_frameDates
a list of frames date
Definition: StudentWritingCParser.cxx:186
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
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
MWAWParser::resetTextListener
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:163
StudentWritingCParserInternal::State
Internal: the state of a StudentWritingCParser.
Definition: StudentWritingCParser.cxx:199
MWAWFont::setFlags
void setFlags(uint32_t fl)
sets the font attributes bold, ...
Definition: MWAWFont.hxx:325

Generated on Mon Jul 26 2021 00:00:00 for libmwaw by doxygen 1.8.20