RagTimeParser.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 RAG_TIME_PARSER
35 # define RAG_TIME_PARSER
36 
37 #include <set>
38 #include <vector>
39 
40 #include "MWAWDebug.hxx"
41 #include "MWAWInputStream.hxx"
42 
43 #include "MWAWParser.hxx"
44 
45 namespace RagTimeParserInternal
46 {
47 struct Picture;
48 struct State;
49 class SubDocument;
50 }
51 
52 class RagTimeText;
53 class RagTimeSpreadsheet;
54 
60 class RagTimeParser final : public MWAWTextParser
61 {
63  friend class RagTimeText;
64  friend class RagTimeSpreadsheet;
65 
66 public:
68  RagTimeParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header);
70  ~RagTimeParser() 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 init();
81 
82  //
83  // interface
84  //
85 
87  bool getColor(int colId, MWAWColor &color, int listId=-1) const;
89  bool getDateTimeFormat(int dtId, std::string &dtFormat) const;
91  int getZoneDataFieldSize(int zId) const;
93  int getNewZoneId();
94 
95  //
96  // interface with text parser
97  //
98 
100  int getFontId(int localId) const;
102  bool getCharStyle(int charId, MWAWFont &font) const;
104  bool readTextZone(MWAWEntry &entry, int width, MWAWColor const &fontColor=MWAWColor::black());
105 
107  void createDocument(librevenge::RVNGTextInterface *documentInterface);
109  bool sendZones();
110 
112  void newPage(int number);
113 
115  bool createZones();
116 
118  bool findDataZones();
120  bool readDataZoneHeader(int id, long endPos);
122  bool findPagesZones();
123 
125  bool findRsrcZones();
126 
128  bool sendPageZone(int page);
130  bool send(int zId);
132  bool sendText(int zId, MWAWListenerPtr listener);
133 
135  bool sendPicture(int zId, MWAWPosition const &pos);
137  bool sendBitmap(RagTimeParserInternal::Picture const &pict, MWAWPosition const &pos);
139  bool sendBasicPicture(int zId, MWAWPosition const &pos);
141  void flushExtra();
142 
145  bool readPageZone(MWAWEntry &entry);
146 
148  bool readPictZone(MWAWEntry &entry);
149 
151  bool readPictZoneV2(MWAWEntry &entry);
152 
153  // some rsrc zone
154 
156  bool readColorMapV2(MWAWEntry &entry);
158  bool readColorsMap();
160  bool readPrintInfo(MWAWEntry &entry, bool inRSRCFork=false);
162  bool readLinks(MWAWEntry &entry);
164  bool readFormatsMap();
166  bool readMacroFormats(MWAWEntry &entry);
168  bool readColorTable(MWAWEntry &entry);
169 
170  // unknown data fork zone
171 
173  bool readZone6(MWAWEntry &entry);
174 
175  // unknown rsrc fork zone
177  bool readRsrcBeDc(MWAWEntry &entry);
178 
180  bool readRsrcStructured(MWAWEntry &entry);
181 
183  bool readRsrcBtch(MWAWEntry &entry);
185  bool readRsrcCalc(MWAWEntry &entry);
187  bool readRsrcfppr(MWAWEntry &entry);
189  bool readRsrcSele(MWAWEntry &entry);
190  // maybe FH=footer/header zone
192  bool readRsrcFHwl(MWAWEntry &entry);
193 protected:
194  //
195  // data
196  //
198  std::shared_ptr<RagTimeParserInternal::State> m_state;
202  std::shared_ptr<RagTimeText> m_textParser;
203 };
204 #endif
205 // 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
RagTimeParserInternal::State::m_actualZoneId
int m_actualZoneId
the actual zone id
Definition: RagTimeParser.cxx:304
RagTimeParser::sendPicture
bool sendPicture(int zId, MWAWPosition const &pos)
sends the picture
Definition: RagTimeParser.cxx:2394
RagTimeParser::findDataZones
bool findDataZones()
try to create the main data zones list
Definition: RagTimeParser.cxx:708
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
RagTimeParser::RagTimeParser
RagTimeParser(MWAWInputStreamPtr const &input, MWAWRSRCParserPtr const &rsrcParser, MWAWHeader *header)
constructor
Definition: RagTimeParser.cxx:390
RagTimeParserInternal::State::m_RSRCZoneMap
std::multimap< std::string, MWAWEntry > m_RSRCZoneMap
a map: type->entry (resource fork)
Definition: RagTimeParser.cxx:298
RagTimeParserInternal::Zone::Chart
@ Chart
Definition: RagTimeParser.cxx:132
RagTimeParserInternal::Zone::m_fontColor
MWAWColor m_fontColor
the font color (for text)
Definition: RagTimeParser.cxx:208
RagTimeParser::getDateTimeFormat
bool getDateTimeFormat(int dtId, std::string &dtFormat) const
returns the ith date format or ""
Definition: RagTimeParser.cxx:462
MWAWPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
RagTimeParser::createDocument
void createDocument(librevenge::RVNGTextInterface *documentInterface)
creates the listener which will be associated to the document
Definition: RagTimeParser.cxx:525
RagTimeParser::readMacroFormats
bool readMacroFormats(MWAWEntry &entry)
try to read the macro format zone: RTml zones
Definition: RagTimeParser.cxx:1942
RagTimeStruct::ResourceList::read
bool read(MWAWInputStreamPtr input, MWAWEntry &entry)
try to read the header block
Definition: RagTimeStruct.cxx:42
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
RagTimeParserInternal::Zone::m_extra
std::string m_extra
extra data
Definition: RagTimeParser.cxx:218
RagTimeParser::sendBasicPicture
bool sendBasicPicture(int zId, MWAWPosition const &pos)
sends a basic shape
Definition: RagTimeParser.cxx:2546
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:842
MWAWGraphicStyle::m_pattern
Pattern m_pattern
the pattern if it exists
Definition: MWAWGraphicStyle.hxx:530
libmwaw::DebugFile::addDelimiter
void addDelimiter(long pos, char c)
adds a not breaking delimiter in position pos
Definition: MWAWDebug.cxx:73
RagTimeStruct.hxx
RagTimeParser::readPageZone
bool readPageZone(MWAWEntry &entry)
try to read page zone ( unknown content of size 40).
Definition: RagTimeParser.cxx:1706
RagTimeParserInternal::Pattern::Pattern
Pattern(uint16_t const *pat=nullptr)
constructor ( 4 int by patterns )
Definition: RagTimeParser.cxx:68
RagTimeParser::checkHeader
bool checkHeader(MWAWHeader *header, bool strict=false) final
checks if the document header is correct (or not)
Definition: RagTimeParser.cxx:2315
RagTimeParser.hxx
MWAWGraphicStyle::setShadowColor
void setShadowColor(MWAWColor const &col, float opacity=1)
set the shadow color
Definition: MWAWGraphicStyle.hxx:458
RagTimeParser::m_state
std::shared_ptr< RagTimeParserInternal::State > m_state
the state
Definition: RagTimeParser.hxx:198
MWAWEntry::isParsed
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: MWAWEntry.hxx:121
RagTimeParser::RagTimeText
friend class RagTimeText
Definition: RagTimeParser.hxx:63
MWAWPosition::setPage
void setPage(int pg) const
sets the page
Definition: MWAWPosition.hxx:205
RagTimeStruct::ResourceList::getName
static std::string getName(Type type)
returns a string corresponding to a type
Definition: RagTimeStruct.hxx:75
RagTimeParser::getNewZoneId
int getNewZoneId()
returns a new unique zone id
Definition: RagTimeParser.cxx:452
MWAWGraphicStyle::Arrow::plain
static Arrow plain()
returns a basic plain arrow
Definition: MWAWGraphicStyle.hxx:74
RagTimeParser::flushExtra
void flushExtra()
flush unsent zone (debugging function)
Definition: RagTimeParser.cxx:2653
MWAWTextListener
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
RagTimeParser::getCharStyle
bool getCharStyle(int charId, MWAWFont &font) const
returns font style corresponding to a char style id
Definition: RagTimeParser.cxx:422
RagTimeParser::readPrintInfo
bool readPrintInfo(MWAWEntry &entry, bool inRSRCFork=false)
read a printInfo block (a PREC rsrc)
Definition: RagTimeParser.cxx:1539
MWAWColor::white
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
libmwaw::DebugFile::open
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
RagTimeParserInternal::SubDocument::parse
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: RagTimeParser.cxx:360
MWAWEntry::id
int id() const
returns the id
Definition: MWAWEntry.hxx:164
MWAWPosition::WBackground
@ WBackground
Definition: MWAWPosition.hxx:53
RagTimeParserInternal::Zone::Picture
@ Picture
Definition: RagTimeParser.cxx:132
MWAWPageSpan::setMarginBottom
void setMarginBottom(const double marginBottom)
set the page bottom margin
Definition: MWAWPageSpan.hxx:208
MWAWGraphicShape
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
RagTimeParser::newPage
void newPage(int number)
adds a new page
Definition: RagTimeParser.cxx:475
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:192
MWAWEmbeddedObject
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
MWAWSubDocumentPtr
std::shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:565
MWAWGraphicShape::line
static MWAWGraphicShape line(MWAWVec2f const &orign, MWAWVec2f const &dest)
static constructor to create a line
Definition: MWAWGraphicShape.cxx:228
MWAWParser::version
int version() const
returns the works version
Definition: MWAWParser.hxx:108
MWAWGraphicStyle::setBackgroundColor
void setBackgroundColor(MWAWColor const &col, float opacity=1)
set the background color
Definition: MWAWGraphicStyle.hxx:447
MWAWEntry::type
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
RagTimeParser::readColorMapV2
bool readColorMapV2(MWAWEntry &entry)
try to read the color map:v2
Definition: RagTimeParser.cxx:1443
RagTimeParser::createZones
bool createZones()
finds the different objects zones
Definition: RagTimeParser.cxx:562
RagTimeParserInternal::Zone::Zone
Zone()
constructor
Definition: RagTimeParser.cxx:134
RagTimeParserInternal::Zone::m_type
Type m_type
the zone type
Definition: RagTimeParser.cxx:194
MWAWGraphicStyle::Pattern::getAverageColor
bool getAverageColor(MWAWColor &col) const
return the average color
Definition: MWAWGraphicStyle.cxx:101
MWAWPrinter.hxx
RagTimeParserInternal::Zone::m_subType
int m_subType
the zone sub type
Definition: RagTimeParser.cxx:196
MWAWPageSpan::setMarginLeft
void setMarginLeft(const double marginLeft)
set the page left margin
Definition: MWAWPageSpan.hxx:193
RagTimeParser::readRsrcfppr
bool readRsrcfppr(MWAWEntry &entry)
try to read the fppr zone (zone with id=0)
Definition: RagTimeParser.cxx:2184
MWAWPictData::get
static MWAWPictData * get(MWAWInputStreamPtr const &input, int size)
checks if the data pointed by input is known
Definition: MWAWPictData.hxx:108
MWAWBorder::m_width
double m_width
the border total width in point
Definition: libmwaw_internal.hxx:387
libmwaw::PrinterInfo
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
RagTimeParserInternal::Picture
Internal: a picture of a RagTimeParser.
Definition: RagTimeParser.cxx:106
MWAWEntry::setParsed
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
MWAWPictBitmap::getBinary
bool getBinary(MWAWEmbeddedObject &picture) const override
returns the final picture
Definition: MWAWPictBitmap.hxx:225
RagTimeText.hxx
MWAWParser::getTextListener
MWAWTextListenerPtr & getTextListener()
returns the text listener
Definition: MWAWParser.hxx:145
RagTimeParserInternal::Picture::m_type
int m_type
the picture type(unsure)
Definition: RagTimeParser.cxx:117
MWAWBox2::setMin
void setMin(MWAWVec2< T > const &x)
resets the minimum point
Definition: libmwaw_internal.hxx:1085
libmwaw::DebugFile::addNote
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
RagTimeParserInternal::Pattern::m_percent
float m_percent
the percentage
Definition: RagTimeParser.cxx:98
MWAWSubDocument
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
RagTimeParserInternal::SubDocument::SubDocument
SubDocument(RagTimeParser &pars, MWAWInputStreamPtr const &input, int zoneId)
Definition: RagTimeParser.cxx:342
MWAWGraphicStyle
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
RagTimeParser::getZoneDataFieldSize
int getZoneDataFieldSize(int zId) const
returns the size of a zone data field
Definition: RagTimeParser.cxx:443
MWAWGraphicStyle::hasLine
bool hasLine() const
returns true if the border is defined
Definition: MWAWGraphicStyle.hxx:410
RagTimeParserInternal::State::m_numDataZone
int m_numDataZone
the number of data zone
Definition: RagTimeParser.cxx:294
MWAWGraphicStyle::Pattern::m_data
std::vector< unsigned char > m_data
the pattern data: a sequence of data: p[0..7,0],p[8..15,0]...p[0..7,1],p[8..15,1],...
Definition: MWAWGraphicStyle.hxx:363
RagTimeStruct::ResourceList
a structure used to store list in a resource fork
Definition: RagTimeStruct.hxx:57
RagTimeParser::readPictZoneV2
bool readPictZoneV2(MWAWEntry &entry)
try to read pictZone ( a big zone):v2
Definition: RagTimeParser.cxx:1310
MWAWParser::ascii
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MWAWParser.hxx:195
RagTimeParser
the main class to read a RagTime v2-3 file
Definition: RagTimeParser.hxx:61
RagTimeParser::m_spreadsheetParser
std::shared_ptr< RagTimeSpreadsheet > m_spreadsheetParser
the spreadsheet parser
Definition: RagTimeParser.hxx:200
MWAWGraphicStyle::Pattern::operator<<
friend std::ostream & operator<<(std::ostream &o, Pattern const &pat)
a print operator
Definition: MWAWGraphicStyle.hxx:340
RagTimeParser::readRsrcBeDc
bool readRsrcBeDc(MWAWEntry &entry)
try to read the BeDc zone ( zone of size 52, one by file with id=0);
Definition: RagTimeParser.cxx:2107
MWAWParser::asciiName
std::string const & asciiName() const
return the ascii file name
Definition: MWAWParser.hxx:232
MWAWGraphicStyle::Pattern
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:277
MWAWSubDocument.hxx
MWAWPageSpan::setFormLength
void setFormLength(const double formLength)
set the total page length
Definition: MWAWPageSpan.hxx:178
MWAWColor::barycenter
static MWAWColor barycenter(float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
return alpha*colA+beta*colB
Definition: libmwaw_internal.cxx:206
RagTimeParser::findRsrcZones
bool findRsrcZones()
try to create the resource zones list
Definition: RagTimeParser.cxx:1080
RagTimeParserInternal::Zone::m_style
MWAWGraphicStyle m_style
the style
Definition: RagTimeParser.cxx:206
MWAWParser::getPageWidth
double getPageWidth() const
returns the page width (form width without margin )
Definition: MWAWParser.hxx:185
RagTimeStruct::ResourceList::Undef
@ Undef
Definition: RagTimeStruct.hxx:59
RagTimeParserInternal::Zone::m_arrowFlags
int m_arrowFlags
arrow flag 1:begin, 2:end
Definition: RagTimeParser.cxx:210
RagTimeParser::RagTimeSpreadsheet
friend class RagTimeSpreadsheet
Definition: RagTimeParser.hxx:64
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:188
libmwaw::DebugFile::reset
void reset()
writes the current file and reset to zero
Definition: MWAWDebug.hxx:93
MWAWParser::getMainListener
MWAWListenerPtr getMainListener()
returns the main listener
Definition: MWAWParser.cxx:120
RagTimeParser::getFontId
int getFontId(int localId) const
returns a mac font id corresponding to a local id
Definition: RagTimeParser.cxx:417
RagTimeParser::sendBitmap
bool sendBitmap(RagTimeParserInternal::Picture const &pict, MWAWPosition const &pos)
sends a bitmap
Definition: RagTimeParser.cxx:2487
RagTimeParserInternal::SubDocument::m_id
int m_id
the subdocument id
Definition: RagTimeParser.cxx:357
MWAWPictBitmapBW
a bitmap of bool to store black-white bitmap
Definition: MWAWPictBitmap.hxx:269
RagTimeParserInternal::State::m_pageZonesIdMap
std::map< int, std::vector< int > > m_pageZonesIdMap
a map: page->main zone id
Definition: RagTimeParser.cxx:308
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
RagTimeParserInternal::SubDocument::operator!=
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: RagTimeParser.cxx:376
libmwaw::DebugFile::skipZone
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
RagTimeParser::readRsrcBtch
bool readRsrcBtch(MWAWEntry &entry)
try to read the Btch zone (zone with id=0)
Definition: RagTimeParser.cxx:2152
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
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
RagTimeParserInternal::Picture::m_headerPos
long m_headerPos
the beginning of the header(for debugging)
Definition: RagTimeParser.cxx:123
MWAWGraphicStyle::m_lineWidth
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:508
RagTimeParserInternal::Picture::Picture
Picture()
constructor
Definition: RagTimeParser.cxx:108
MWAWPageSpan::setFormWidth
void setFormWidth(const double formWidth)
set the total page width
Definition: MWAWPageSpan.hxx:183
MWAWPosition.hxx
MWAWPosition::setSize
void setSize(MWAWVec2f const &sz)
sets the frame size
Definition: MWAWPosition.hxx:215
MWAWEntry::setEnd
void setEnd(long off)
sets the end offset
Definition: MWAWEntry.hxx:77
RagTimeParser::parse
void parse(librevenge::RVNGTextInterface *documentInterface) final
virtual function used to parse the input
Definition: RagTimeParser.cxx:491
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:668
RagTimeParserInternal::Zone::m_dimension
MWAWBox2f m_dimension
the dimension
Definition: RagTimeParser.cxx:200
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
MWAWPictBitmapBW::setRowPacked
void setRowPacked(int j, unsigned char const *val, unsigned char const *end)
sets all cell contents of a row given packed m_data
Definition: MWAWPictBitmap.hxx:337
RagTimeParserInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: RagTimeParser.cxx:347
RagTimeParser::readRsrcFHwl
bool readRsrcFHwl(MWAWEntry &entry)
try to read the FHwl zone ( one by file with id=0), maybe width length?
Definition: RagTimeParser.cxx:2052
RagTimeParserInternal::Zone::Spreadsheet
@ Spreadsheet
Definition: RagTimeParser.cxx:132
MWAWBorder
a border
Definition: libmwaw_internal.hxx:333
MWAWEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
MWAWColor::isBlack
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:284
RagTimeParserInternal::Zone::getTypeString
std::string getTypeString() const
returns a zone name
Definition: RagTimeParser.cxx:163
RagTimeSpreadsheet
the main class to read the spreadsheet part of ragTime file
Definition: RagTimeSpreadsheet.hxx:72
RagTimeParserInternal::Zone::m_linkZones
int m_linkZones[5]
the link zones ( parent, prev, next, child, linked)
Definition: RagTimeParser.cxx:212
RagTimeParserInternal::State::State
State()
constructor
Definition: RagTimeParser.cxx:277
MWAWParser::setVersion
void setVersion(int vers)
sets the document's version
Definition: MWAWParser.hxx:206
RagTimeParser::~RagTimeParser
~RagTimeParser() final
destructor
Definition: RagTimeParser.cxx:399
MWAWGraphicStyle::Pattern::m_dim
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:358
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
MWAWGraphicStyle::setBorders
void setBorders(int wh, MWAWBorder const &border)
sets the cell border: wh=libmwaw::LeftBit|...
Definition: MWAWGraphicStyle.cxx:232
RagTimeText
the main class to read the text part of ragTime file
Definition: RagTimeText.hxx:71
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
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< float >
MWAWBox2::setMax
void setMax(MWAWVec2< T > const &y)
resets the maximum point
Definition: libmwaw_internal.hxx:1090
MWAWPictMac.hxx
RagTimeParser::m_textParser
std::shared_ptr< RagTimeText > m_textParser
the text parser
Definition: RagTimeParser.hxx:202
RagTimeParser::send
bool send(int zId)
try to send a zone
Definition: RagTimeParser.cxx:2589
MWAWGraphicShape.hxx
libmwaw::ParseException
Definition: libmwaw_internal.hxx:144
RagTimeParserInternal::Pattern::~Pattern
~Pattern() final
destructor
Definition: RagTimeParser.cxx:101
MWAWDebug.hxx
RagTimeParserInternal::Zone::Type
Type
the zone type
Definition: RagTimeParser.cxx:132
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
RagTimeParser::readColorsMap
bool readColorsMap()
try to read the color map:v3
Definition: RagTimeParser.cxx:1429
RagTimeParserInternal::Zone::m_isSent
bool m_isSent
a flag to know if the picture is sent
Definition: RagTimeParser.cxx:216
RagTimeParserInternal::State::m_dataZoneMap
std::multimap< std::string, MWAWEntry > m_dataZoneMap
a map: type->entry (datafork)
Definition: RagTimeParser.cxx:296
MWAWGraphicStyle::m_arrows
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:553
MWAWGraphicStyle::setPattern
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:426
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
RagTimeParserInternal::Zone::Page
@ Page
Definition: RagTimeParser.cxx:132
RagTimeParserInternal::Zone::Unknown
@ Unknown
Definition: RagTimeParser.cxx:132
MWAWEntry::setId
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
RagTimeParserInternal::Pattern::operator=
Pattern & operator=(Pattern const &)=default
RagTimeParser::readZone6
bool readZone6(MWAWEntry &entry)
try to read zone6 ( a big zone)
Definition: RagTimeParser.cxx:1608
MWAWPageSpan::setMarginTop
void setMarginTop(const double marginTop)
set the page top margin
Definition: MWAWPageSpan.hxx:203
libmwaw::PrinterInfo::read
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
RagTimeParserInternal::State::m_idZoneMap
std::map< int, Zone > m_idZoneMap
a map: zoneId->zone (datafork)
Definition: RagTimeParser.cxx:306
MWAWPosition::Char
@ Char
Definition: MWAWPosition.hxx:51
RagTimeParser::readColorTable
bool readColorTable(MWAWEntry &entry)
try to read the color table zone: CHTa zones
Definition: RagTimeParser.cxx:1836
MWAWGraphicStyle::Pattern::m_colors
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:361
MWAWParser::getParserState
MWAWParserStatePtr getParserState()
returns the parser state
Definition: MWAWParser.hxx:113
MWAWHeader.hxx
Defines MWAWHeader (document's type, version, kind)
RagTimeParser::sendText
bool sendText(int zId, MWAWListenerPtr listener)
try to send the text zone (interface of RagTimeText)
Definition: RagTimeParser.cxx:467
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
MWAWGraphicStyle::m_lineColor
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:516
RagTimeParserInternal::Pattern::operator=
Pattern & operator=(Pattern &&)=default
RagTimeSpreadsheet.hxx
MWAWGraphicStyle::Pattern::Pattern
Pattern()
constructor
Definition: MWAWGraphicStyle.hxx:279
RagTimeParser::sendZones
bool sendZones()
try to send the different zones
Definition: RagTimeParser.cxx:2582
RagTimeParserInternal::Zone::m_rotation
int m_rotation
the rotation
Definition: RagTimeParser.cxx:204
RagTimeParserInternal::Picture::m_pos
MWAWEntry m_pos
the data position
Definition: RagTimeParser.cxx:119
RagTimeParser::getColor
bool getColor(int colId, MWAWColor &color, int listId=-1) const
returns the ith color ( if possible)
Definition: RagTimeParser.cxx:427
MWAWGraphicStyle.hxx
RagTimeParser::readRsrcSele
bool readRsrcSele(MWAWEntry &entry)
try to read the Sele zone (zone with id=0), maybe related to selection
Definition: RagTimeParser.cxx:2220
RagTimeParser::readRsrcCalc
bool readRsrcCalc(MWAWEntry &entry)
try to read the Calc zone (zone with id=0)
Definition: RagTimeParser.cxx:2009
MWAWParser::getInput
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MWAWParser.hxx:123
RagTimeParser::findPagesZones
bool findPagesZones()
try to sort the zone on each page
Definition: RagTimeParser.cxx:761
MWAWTextListener.hxx
Defines MWAWTextListener: the libmwaw word processor listener.
RagTimeParser::sendPageZone
bool sendPageZone(int page)
try to send the different zones of a page
Definition: RagTimeParser.cxx:2572
RagTimeParserInternal::Zone::getBoundingBox
MWAWBox2f getBoundingBox() const
returns the bounding box
Definition: RagTimeParser.cxx:151
RagTimeParserInternal::Pattern
Internal: the pattern of a RagTimeManager.
Definition: RagTimeParser.cxx:66
RagTimeParserInternal::State
Internal: the state of a RagTimeParser.
Definition: RagTimeParser.cxx:275
RagTimeParserInternal::Zone
Internal: a zone of a RagTimeParser.
Definition: RagTimeParser.cxx:130
MWAWPosition::Page
@ Page
Definition: MWAWPosition.hxx:51
RagTimeParserInternal::Picture::m_dim
MWAWBox2f m_dim
the dimension
Definition: RagTimeParser.cxx:121
RagTimeParserInternal::State::m_idPictureMap
std::map< int, Picture > m_idPictureMap
a map: zoneId->picture (datafork)
Definition: RagTimeParser.cxx:310
RagTimeParserInternal::State::initDefaultPatterns
void initDefaultPatterns(int vers)
init the pattern to default
Definition: RagTimeParser.cxx:314
libmwaw::DebugFile::addPos
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
MWAWPosition::origin
MWAWVec2f const & origin() const
return the frame origin
Definition: MWAWPosition.hxx:130
MWAWPageSpan::setMarginRight
void setMarginRight(const double marginRight)
set the page right margin
Definition: MWAWPageSpan.hxx:198
RagTimeParserInternal::State::m_idColorsMap
std::map< int, std::vector< MWAWColor > > m_idColorsMap
the color map
Definition: RagTimeParser.cxx:300
RagTimeParserInternal::Zone::m_page
int m_page
the page
Definition: RagTimeParser.cxx:202
RagTimeParserInternal::Picture::m_isSent
bool m_isSent
a flag to know if the picture is sent
Definition: RagTimeParser.cxx:125
libmwaw::DebugFile
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
RagTimeStruct::ResourceList::m_type
Type m_type
the resource type
Definition: RagTimeStruct.hxx:83
MWAWPosition::WRunThrough
@ WRunThrough
Definition: MWAWPosition.hxx:53
HanMacWrdJTextInternal::Unknown
@ Unknown
Definition: HanMacWrdJText.cxx:61
MWAWInputStream.hxx
RagTimeParserInternal::Zone::m_sharedWith
int m_sharedWith
the zone which contains the content
Definition: RagTimeParser.cxx:214
RagTimeParserInternal::Zone::Text
@ Text
Definition: RagTimeParser.cxx:132
MWAWColor::isWhite
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:289
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
MWAWPosition::m_anchorTo
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:270
librevenge
Definition: MWAWDocument.hxx:57
MWAWGraphicStyle::m_rotate
float m_rotate
the rotation
Definition: MWAWGraphicStyle.hxx:544
MWAWPictBitmap.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
RagTimeParserInternal::Pattern::Pattern
Pattern(Pattern const &)=default
MWAWBox2< float >
RagTimeParser::readTextZone
bool readTextZone(MWAWEntry &entry, int width, MWAWColor const &fontColor=MWAWColor::black())
try to read a text zone (knowing the zone width in point and the font color)
Definition: RagTimeParser.cxx:457
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:44
RagTimeParser::readPictZone
bool readPictZone(MWAWEntry &entry)
try to read pictZone ( a big zone)
Definition: RagTimeParser.cxx:1189
MWAWGraphicStyle::m_shadowOffset
MWAWVec2f m_shadowOffset
the shadow offset
Definition: MWAWGraphicStyle.hxx:527
MWAWDocument::MWAW_T_RAGTIME
@ MWAW_T_RAGTIME
RagTime: -Mac v2.1-v3.2: done, -all v5.0-v6.5: incomplete, only try to retrieve the picture/shape/tex...
Definition: MWAWDocument.hxx:144
RagTimeParser::readLinks
bool readLinks(MWAWEntry &entry)
try to read the File Link zone: FLink
Definition: RagTimeParser.cxx:1751
MWAWBorder::m_color
MWAWColor m_color
the border color
Definition: libmwaw_internal.hxx:393
RagTimeParser::readDataZoneHeader
bool readDataZoneHeader(int id, long endPos)
try to read a data zone header
Definition: RagTimeParser.cxx:800
RagTimeParserInternal::State::m_patternList
std::vector< Pattern > m_patternList
a list patternId -> pattern
Definition: RagTimeParser.cxx:302
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
RagTimeParserInternal::Zone::Line
@ Line
Definition: RagTimeParser.cxx:132
RagTimeParser::readRsrcStructured
bool readRsrcStructured(MWAWEntry &entry)
try to read a structured zone
Definition: RagTimeParser.cxx:2265
RagTimeParserInternal
Internal: the structures of a RagTimeParser.
Definition: RagTimeParser.cxx:63
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
RagTimeParserInternal::SubDocument
Internal: the subdocument of a RagTimeParser.
Definition: RagTimeParser.cxx:339
MWAWParser::resetTextListener
void resetTextListener()
resets the listener
Definition: MWAWParser.cxx:163
RagTimeParser::readFormatsMap
bool readFormatsMap()
try to read the format map:v3
Definition: RagTimeParser.cxx:1824
RagTimeParser::init
void init()
inits all internal variables
Definition: RagTimeParser.cxx:403
RagTimeParserInternal::Zone::m_read32Size
bool m_read32Size
flag to know if the datasize in uint16 or uint32
Definition: RagTimeParser.cxx:198

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