34 #ifndef MS_WKS_DOCUMENT 35 # define MS_WKS_DOCUMENT 41 #include <librevenge/librevenge.h> 78 enum ZoneType { Z_MAIN, Z_HEADER, Z_FOOTER, Z_NONE };
82 Zone(
ZoneType type=Z_NONE,
int zoneId=-1) : m_type(type), m_zoneId(zoneId), m_textId(-1) {}
101 void setVersion(
int vers);
120 return m_graphParser;
123 shared_ptr<MsWks3Text> getTextParser3();
125 shared_ptr<MsWks4Text> getTextParser4();
137 bool checkHeader3(
MWAWHeader *header,
bool strict=
false);
139 long getLengthOfFileHeader3()
const;
141 bool readPrintInfo();
143 bool readDocumentInfo(
long sz=-1);
145 bool readZone(
Zone &zone);
147 bool readGroupHeaderFooter(
bool header,
int check);
156 std::vector<std::string>
const &getUnparsedOLEZones()
const;
162 bool hasHeader()
const;
164 bool hasFooter()
const;
166 float getHeaderFooterHeight(
bool header)
const;
168 void getPageSpanList(std::vector<MWAWPageSpan> &pagesList,
int &numPages);
172 std::vector<MWAWColor>
const &getPalette(
int vers);
175 std::multimap<int, Zone> &getTypeZoneMap();
179 int getNewZoneId()
const;
181 std::multimap<std::string, MWAWEntry> &getEntryMap();
186 void sendZone(
int zoneType);
191 void newPage(
int page,
bool softBreak=
false);
193 void sendFootnoteContent(
int noteId);
195 void sendFootnote(
int id);
197 void sendText(
int id);
204 void sendRBIL(
int id,
MWAWVec2i const &sz);
206 void sendTextbox(
MWAWEntry const &entry, std::string
const &frame);
216 bool readDBString(
long endPos, std::string &res);
218 bool readDBNumber(
long endPos,
double &res,
bool &isNan, std::string &str);
220 bool readFormula(
long endPos,
MWAWCellContent &content, std::string &extra);
228 void initAsciiFile(std::string
const &name);
240 shared_ptr<MsWksDocumentInternal::State>
m_state;
263 typedef void (
MWAWParser::* NewPage)(
int page,
bool softBreak);
small class use to define a formula instruction
Definition: MWAWCell.hxx:359
shared_ptr< MsWksDocumentInternal::State > m_state
the state
Definition: MsWksDocument.hxx:240
MWAWInputStreamPtr m_input
the input which can be an OLE in MSWorks 4 file
Definition: MsWksDocument.hxx:251
the main class to read a Microsoft Works database file and convert it in a spreadsheet file ...
Definition: MsWksDBParser.hxx:65
shared_ptr< MsWksGraph > getGraphParser()
returns the graph parser
Definition: MsWksDocument.hxx:118
int m_zoneId
the parser zone id
Definition: MsWksDocument.hxx:86
the main class to read a Microsoft Works file: v1-v4
Definition: MsWksParser.hxx:59
The class which parses text zones in a mac MS Works document v4.
Definition: MsWks4Text.hxx:64
MWAWParser & getMainParser()
returns the main parser
Definition: MsWksDocument.hxx:113
ZoneType m_type
the zone type
Definition: MsWksDocument.hxx:84
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:65
libmwaw::DebugFile m_asciiFile
the debug file of the actual input
Definition: MsWksDocument.hxx:253
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:47
ZoneType
the different type of zone (v1-v3)
Definition: MsWksDocument.hxx:78
a zone of a MsWksDocument ( main, header, footer )
Definition: MsWksDocument.hxx:80
MsWksDocument * m_parentDocument
the parent document (if this is not the main document)
Definition: MsWksDocument.hxx:249
the class to store a color
Definition: libmwaw_internal.hxx:182
small class use to define a sheet cell content
Definition: MWAWCell.hxx:355
shared_ptr< MsWks3Text > m_textParser3
the text document (for v1-3 document)
Definition: MsWksDocument.hxx:258
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MsWksDocument.hxx:108
MWAWParser * m_parser
the main parser
Definition: MsWksDocument.hxx:247
Internal: the structures of a MsWksDocument.
Definition: MsWksDocument.cxx:63
shared_ptr< MWAWParserState > m_parserState
the parser state
Definition: MsWksDocument.hxx:243
The class which parses the main zones of a mac MS Works document v4.
Definition: MsWks4Zone.hxx:73
the main class to read the text part of Microsoft Works file
Definition: MsWks3Text.hxx:69
the main class to read a Microsoft Works graphic file
Definition: MsWksDRParser.hxx:59
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:500
NewPage m_newPage
the new page callback
Definition: MsWksDocument.hxx:266
the main class to read the graphic of a Microsoft Works file
Definition: MsWksGraph.hxx:73
the main class to read a Microsoft Works spreadsheet file
Definition: MsWksSSParser.hxx:65
Kind
an enum to define the kind of document
Definition: MWAWDocument.hxx:80
bool getColor(int color, MWAWColor &col)
try to convert a file data to a color
Definition: FullWrtStruct.cxx:45
Internal: the subdocument of a MsWksDocument.
Definition: MsWksDocument.cxx:203
int m_textId
the text internal id
Definition: MsWksDocument.hxx:88
Defines MWAWCell (cell content and format)
virtual class which defines the ancestor of all main zone parser
Definition: MWAWParser.hxx:97
Class to define the position of an object (textbox, picture, ..) in the document. ...
Definition: MWAWPosition.hxx:47
shared_ptr< MsWksGraph > m_graphParser
the graph document
Definition: MsWksDocument.hxx:256
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
shared_ptr< MsWks4Text > m_textParser4
the text document (for v4 document)
Definition: MsWksDocument.hxx:260
Zone(ZoneType type=Z_NONE, int zoneId=-1)
the constructor
Definition: MsWksDocument.hxx:82
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MsWksDocument.hxx:127
the main class to read/store generic data of a MsWorks document v1-v3
Definition: MsWksDocument.hxx:68