Go to the documentation of this file.
34 #ifndef MS_WKS_DOCUMENT
35 # define MS_WKS_DOCUMENT
41 #include <librevenge/librevenge.h>
173 void getPageSpanList(std::vector<MWAWPageSpan> &pagesList,
int &numPages);
177 std::vector<MWAWColor>
const &
getPalette(
int vers);
186 std::multimap<std::string, MWAWEntry> &
getEntryMap();
196 void newPage(
int page,
bool softBreak=
false);
223 bool readDBNumber(
long endPos,
double &res,
bool &isNan, std::string &str);
245 std::shared_ptr<MsWksDocumentInternal::State>
m_state;
bool hasHeader() const
returns true if the document has some header ( found by checkHeader3)
Definition: MsWksDocument.cxx:411
@ F_CellList
Definition: MWAWCell.hxx:398
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
@ MWAW_K_DATABASE
database
Definition: MWAWDocument.hxx:87
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
void readContentZones(MWAWEntry const &entry, bool mainOle)
final reading of a text zone
Definition: MsWks4Zone.cxx:566
int m_numPages
the number of page of the final document
Definition: MsWksDocument.cxx:115
@ MWAW_T_MICROSOFTWORKS
Microsoft Works Mac: export database(as spreadsheet), graphic, spreadsheet and text files.
Definition: MWAWDocument.hxx:133
void parse(MWAWListenerPtr &listener, libmwaw::SubDocumentType type) final
the parser function
Definition: MsWksDocument.cxx:248
int m_footerHeight
the footer height if known
Definition: MsWksDocument.cxx:118
MWAWInputStreamPtr & getInput()
returns the actual input
Definition: MsWksDocument.hxx:113
MWAWParser * m_parser
the main parser
Definition: MsWksDocument.hxx:252
a zone of a MsWksDocument ( main, header, footer )
Definition: MsWksDocument.hxx:80
the main class to read/store generic data of a MsWorks document v1-v3
Definition: MsWksDocument.hxx:69
void setName(std::string const &nam)
sets the name of the entry
Definition: MWAWEntry.hxx:148
a note
Definition: libmwaw_internal.hxx:445
The class which parses text zones in a mac MS Works document v4.
Definition: MsWks4Text.hxx:65
void setPageSpan(const int pageSpan)
set the page span ( default 1)
Definition: MWAWPageSpan.hxx:268
@ MWAW_K_SPREADSHEET
spreadsheet
Definition: MWAWDocument.hxx:86
std::shared_ptr< MsWks3Text > getTextParser3()
returns the text parser (for v1-v3 document)
Definition: MsWksDocument.cxx:323
std::shared_ptr< MsWks4Zone > m_headerParser
parser of the header ole
Definition: MsWksDocument.cxx:107
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
long m_fileHeaderSize
the file header size
Definition: MsWksDocument.cxx:95
@ Text
Definition: MsWksDocument.cxx:221
MWAWDocument::Kind m_kind
the type of document
Definition: MsWksDocument.cxx:93
void(MWAWParser::* NewPage)(int page, bool softBreak)
callback used to send a page break
Definition: MsWksDocument.hxx:268
Internal: the structures of a MsWksDocument.
Definition: MsWksDocument.cxx:64
Internal: the state of a MsWksDocument.
Definition: MsWksDocument.cxx:68
bool readGroupHeaderFooter(bool header, int check)
try to read a header/footer group
Definition: MsWksDocument.cxx:875
void getPageSpanList(std::vector< MWAWPageSpan > &pagesList, int &numPages)
get the page span list and the number of page for a v1-v3 document
Definition: MsWksDocument.cxx:426
the main class to read a Microsoft Works graphic file
Definition: MsWksDRParser.hxx:60
std::vector< MWAWColor > const & getPalette(int vers)
returns a list of color corresponding to a version
Definition: MsWksDocument.cxx:578
Internal: the subdocument of a MsWksDocument.
Definition: MsWksDocument.cxx:219
void sendZone(int zoneType)
try to send a zone (v1-v3 document)
Definition: MsWksDocument.cxx:388
int m_id
the rbil id
Definition: MsWksGraph.hxx:122
std::vector< std::string > m_unparsedOlesName
the list of unparsed OLEs
Definition: MsWksDocument.cxx:112
@ F_Operator
Definition: MWAWCell.hxx:398
bool readZone(Zone &zone)
try to read a generic zone
Definition: MsWksDocument.cxx:973
MWAWEntry getTextPosition() const
return the text positions ( used for frame text)
Definition: MsWks4Zone.cxx:261
@ Zone
Definition: MsWksDocument.cxx:221
bool open(std::string const &filename)
opens/creates a file to store a result
Definition: MWAWDebug.cxx:46
friend class MsWks4Zone
Definition: MsWksDocument.hxx:72
bool readDocumentInfo(long sz=-1)
try to read the documentinfo ( v1-v3)
Definition: MsWksDocument.cxx:761
small class use to define a formula instruction
Definition: MWAWCell.hxx:397
@ Z_NONE
Definition: MsWksDocument.hxx:78
the class to store a color
Definition: libmwaw_internal.hxx:192
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
MWAWPosition::AnchorTo m_anchor
the anchor
Definition: MsWksGraph.hxx:124
std::shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:565
Zone(ZoneType type=Z_NONE, int zoneId=-1)
the constructor
Definition: MsWksDocument.hxx:82
bool getColor(int id, MWAWColor &col, int vers)
returns the color which correspond to an index
Definition: MsWksDocument.cxx:583
void setKind(MWAWDocument::Kind kind)
sets the document's kind
Definition: MsWksDocument.cxx:350
the main class to read a Microsoft Works file: v1-v4
Definition: MsWksParser.hxx:60
Kind
an enum to define the kind of document
Definition: MWAWDocument.hxx:80
@ MWAW_K_DRAW
vectorized grphic
Definition: MWAWDocument.hxx:83
the main class to read the graphic of a Microsoft Works file
Definition: MsWksGraph.hxx:74
@ F_Function
Definition: MWAWCell.hxx:398
a class used to parse some basic oles Tries to read the different ole parts and stores their contents...
Definition: MWAWOLEParser.hxx:86
void initAsciiFile(std::string const &name)
inits the ascii file
Definition: MsWksDocument.cxx:317
the AppleŠ printer information : TPrint
Definition: MWAWPrinter.hxx:82
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
int m_freeZoneId
an id to count the number of free map
Definition: MsWksDocument.cxx:97
abstract class used to store a subdocument (with a comparison function)
Definition: MWAWSubDocument.hxx:42
std::string m_content
the content ( if type == F_Operator or type = F_Function or type==F_Text)
Definition: MWAWCell.hxx:417
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
ZoneType m_type
the zone type
Definition: MsWksDocument.hxx:89
State()
constructor
Definition: MsWksDocument.cxx:70
SubDocument(MsWksDocument &document, MWAWInputStreamPtr const &input, Type type, int zoneId)
Definition: MsWksDocument.cxx:222
libmwaw::DebugFile m_asciiFile
the debug file of the actual input
Definition: MsWksDocument.hxx:258
NewPage m_newPage
the new page callback
Definition: MsWksDocument.hxx:271
Defines MWAWCell (cell content and format)
bool readCellInFormula(MWAWCellContent::FormulaInstruction &instr, bool is2D)
reads a cell
Definition: MsWksDocument.cxx:1212
std::multimap< int, MsWksDocument::Zone > m_typeZoneMap
the list of zone (for v1-v3) document
Definition: MsWksDocument.cxx:99
ZoneType
the different type of zone (v1-v3)
Definition: MsWksDocument.hxx:78
SubDocumentType
Definition: libmwaw_internal.hxx:188
@ Z_FOOTER
Definition: MsWksDocument.hxx:78
std::shared_ptr< MWAWInputStream > m_input
the input
Definition: MWAWSubDocument.hxx:77
bool m_hasFooter
true if there is a footer v3
Definition: MsWksDocument.cxx:102
std::shared_ptr< MsWksGraph > m_graphParser
the graph document
Definition: MsWksDocument.hxx:261
std::vector< FormulaInstruction > m_formula
the formula list of instruction
Definition: MWAWCell.hxx:491
bool operator!=(MWAWSubDocument const &doc) const final
operator!=
Definition: MsWksDocument.cxx:282
int m_textId
the text internal id
Definition: MsWksDocument.hxx:93
MWAWVec2i m_size
the size of the data ( used by rbil )
Definition: MsWksGraph.hxx:128
T y() const
second element
Definition: libmwaw_internal.hxx:673
std::shared_ptr< MsWks4Zone > m_footerParser
parser of the footer ole
Definition: MsWksDocument.cxx:107
This class provides all the functions needed by applications to parse many pre-MacOSX documents.
Definition: MWAWDocument.hxx:70
Type m_type
the type
Definition: MWAWCell.hxx:415
Zone getZone(ZoneType type) const
returns the zone corresponding to a zoneType (v1-v3 document)
Definition: MsWksDocument.cxx:360
MsWksDocument(MWAWInputStreamPtr const &input, MWAWParser &parser)
constructor
Definition: MsWksDocument.cxx:297
libmwaw::DebugFile & ascii()
a DebugFile used to write what we recognize when we parse the document
Definition: MsWksDocument.hxx:132
T x() const
first element
Definition: libmwaw_internal.hxx:668
the main class to read the text part of Microsoft Works file
Definition: MsWks3Text.hxx:70
void sendOLE(int id, MWAWPosition const &pos, MWAWGraphicStyle const &style)
send an OLE zone
Definition: MsWksDocument.cxx:514
MWAWInputStreamPtr m_input
the input which can be an OLE in MSWorks 4 file
Definition: MsWksDocument.hxx:256
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
std::multimap< std::string, MWAWEntry > & getEntryMap()
returns the document entry map of a v4 document
Definition: MsWksDocument.cxx:373
bool createZones(bool mainOle)
finds and parses all the zones to prepare the data
Definition: MsWks4Zone.cxx:471
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
std::shared_ptr< MsWks4Text > m_textParser4
the text document (for v4 document)
Definition: MsWksDocument.hxx:265
bool checkHeader3(MWAWHeader *header, bool strict=false)
checks if the file header corresponds to a v1-v3 document (or not)
Definition: MsWksDocument.cxx:1020
@ RBIL
Definition: MsWksGraph.hxx:120
void sendFootnote(int id)
tries to send a footnote
Definition: MsWksDocument.cxx:503
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
void sendFootnoteContent(int noteId)
try to send a footnote content (v4 document)
Definition: MsWksDocument.cxx:396
@ Z_HEADER
Definition: MsWksDocument.hxx:78
void setStream(MWAWInputStreamPtr const &ip)
resets the input
Definition: MWAWDebug.hxx:81
The class which parses the main zones of a mac MS Works document v4.
Definition: MsWks4Zone.hxx:74
small class use to define a sheet cell content
Definition: MWAWCell.hxx:394
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
the main class to read a Microsoft Works database file and convert it in a spreadsheet file
Definition: MsWksDBParser.hxx:66
std::vector< MWAWColor > const & getPalette(int vers)
returns a color palette
Definition: MsWksDocument.cxx:121
void setVersion(int vers)
sets the document's version
Definition: MsWksDocument.cxx:335
std::vector< std::string > const & getUnparsedOLEZones() const
returns the list of unparsed OLE zones
Definition: MsWksDocument.cxx:608
std::shared_ptr< MWAWParserState > m_parserState
the parser state
Definition: MsWksDocument.hxx:248
int m_id
the subdocument id
Definition: MsWksDocument.cxx:245
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
MsWksDocument & operator=(MsWksDocument const &orig)=delete
int m_actPage
the actual page
Definition: MsWksDocument.cxx:115
bool read(MWAWInputStreamPtr input)
reads the struture in a file
Definition: MWAWPrinter.cxx:235
the main class to read a Microsoft Works spreadsheet file
Definition: MsWksSSParser.hxx:66
std::shared_ptr< MsWks4Text > getTextParser4()
returns the text parser (for v4 document)
Definition: MsWksDocument.cxx:329
@ Char
Definition: MWAWPosition.hxx:51
double m_doubleValue
value ( if type==F_Double )
Definition: MWAWCell.hxx:421
@ F_Cell
Definition: MWAWCell.hxx:398
long getLengthOfFileHeader3() const
returns the length of the file header of a v1-v3 document (if know)
Definition: MsWksDocument.cxx:378
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
small struct used which picture need to be send
Definition: MsWksGraph.hxx:109
virtual class which defines the ancestor of all main zone parser
Definition: MWAWParser.hxx:100
@ Note
Definition: MsWksDocument.cxx:221
MWAWDocument::Kind getKind() const
returns the document's kind
Definition: MsWksDocument.cxx:345
void sendRBIL(int id, MWAWVec2i const &sz)
send a rbil zone
Definition: MsWksDocument.cxx:530
std::map< std::string, std::shared_ptr< MsWks4Zone > > m_frameParserMap
the frame parsers: name-> parser
Definition: MsWksDocument.cxx:110
float getHeaderFooterHeight(bool header) const
returns the header/footer height (found by readGroupHeaderFooter)
Definition: MsWksDocument.cxx:421
Defines MWAWTextListener: the libmwaw word processor listener.
bool readDBNumber(long endPos, double &res, bool &isNan, std::string &str)
try to read a number
Definition: MsWksDocument.cxx:1202
MWAWParser * m_parser
the main zone parser
Definition: MWAWSubDocument.hxx:75
@ F_Double
Definition: MWAWCell.hxx:398
Type
Definition: MsWksDocument.cxx:221
MWAWVec2i m_position[2]
cell position ( if type==F_Cell or F_CellList )
Definition: MWAWCell.hxx:423
MWAWVec2< T > const & min() const
the minimum 2D point (in x and in y)
Definition: libmwaw_internal.hxx:1039
virtual ~MsWksDocument()
destructor
Definition: MsWksDocument.cxx:313
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
std::shared_ptr< MsWks3Text > m_textParser3
the text document (for v1-3 document)
Definition: MsWksDocument.hxx:263
~SubDocument() final
destructor
Definition: MsWksDocument.cxx:231
void setHeaderFooter(MWAWHeaderFooter const &headerFooter)
add a header/footer on some page
Definition: MWAWPageSpan.cxx:227
@ Z_MAIN
Definition: MsWksDocument.hxx:78
void sendText(int id)
try to send a text zone (v1-v3 document)
Definition: MsWksDocument.cxx:383
MsWksDocument * m_parentDocument
the parent document (if this is not the main document)
Definition: MsWksDocument.hxx:254
MWAWParser & getMainParser()
returns the main parser
Definition: MsWksDocument.hxx:118
bool readDBString(long endPos, std::string &res)
try to read a string
Definition: MsWksDocument.cxx:1187
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
int getNewZoneId() const
returns a free zone'id
Definition: MsWksDocument.cxx:355
std::shared_ptr< MsWks4Zone > m_footnoteParser
parser of the footnote ole
Definition: MsWksDocument.cxx:108
std::multimap< std::string, MWAWEntry > m_entryMap
the list of entries, name->entry ( for v4 document)
Definition: MsWksDocument.cxx:101
bool createOLEZones(MWAWInputStreamPtr input)
finds the different OLE zones
Definition: MsWksDocument.cxx:613
int version() const
returns the document's version
Definition: MsWksDocument.cxx:340
std::vector< MWAWColor > m_colorPalette[4]
the color palette
Definition: MsWksDocument.cxx:114
@ FootNote
Definition: libmwaw_internal.hxx:447
MsWksDocument & m_document
the main document
Definition: MsWksDocument.cxx:241
MWAWVec2b m_positionRelative[2]
relative cell position ( if type==F_Cell or F_CellList )
Definition: MWAWCell.hxx:425
std::shared_ptr< MsWksDocumentInternal::State > m_state
the state
Definition: MsWksDocument.hxx:245
int m_zoneId
the parser zone id
Definition: MsWksDocument.hxx:91
@ OLE
Definition: MsWksDocument.cxx:221
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition: libmwaw_internal.hxx:553
std::shared_ptr< MWAWOLEParser > m_oleParser
the ole parser
Definition: MsWksDocument.cxx:106
std::shared_ptr< MsWksGraph > getGraphParser()
returns the graph parser
Definition: MsWksDocument.hxx:123
bool m_hasHeader
true if there is a header v3
Definition: MsWksDocument.cxx:102
bool readPrintInfo()
read the print info zone (v1-v3)
Definition: MsWksDocument.cxx:695
void newPage(int page, bool softBreak=false)
tries to create a new page
Definition: MsWksDocument.cxx:492
bool hasFooter() const
returns true if the document has some footer ( found by checkHeader3)
Definition: MsWksDocument.cxx:416
Type m_type
the type
Definition: MsWksDocument.cxx:243
MWAWVec2< bool > MWAWVec2b
MWAWVec2 of bool.
Definition: libmwaw_internal.hxx:836
enum MsWksGraph::SendData::Type m_type
void sendTextbox(MWAWEntry const &entry, std::string const &frame)
send a textbox
Definition: MsWksDocument.cxx:540
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
int m_headerHeight
the header height if known
Definition: MsWksDocument.cxx:117
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
MsWksDocument(MsWksDocument const &orig)=delete
std::multimap< int, Zone > & getTypeZoneMap()
returns the document entry map of a v1-v3 document
Definition: MsWksDocument.cxx:368
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:99
bool readFormula(long endPos, MWAWCellContent &content, std::string &extra)
Definition: MsWksDocument.cxx:1250
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20