RagTimeSpreadsheet.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 spreadsheet's part of a RagTime document
36  *
37  */
38 #ifndef RAGTIME_SPREADSHEET
39 # define RAGTIME_SPREADSHEET
40 
41 #include <list>
42 #include <string>
43 #include <vector>
44 
45 #include "libmwaw_internal.hxx"
46 
47 #include "MWAWCell.hxx"
48 #include "MWAWDebug.hxx"
49 #include "MWAWEntry.hxx"
50 #include "MWAWInputStream.hxx"
51 
52 #include "MWAWParser.hxx"
53 
55 {
56 struct Cell;
57 struct Spreadsheet;
58 
59 struct State;
60 }
61 
62 class RagTimeParser;
63 
70 {
71  friend class RagTimeParser;
72 public:
76  virtual ~RagTimeSpreadsheet();
77 
79  int version() const;
80 
81 protected:
83  bool readSpreadsheet(MWAWEntry &entry);
85  bool readSpreadsheetV2(MWAWEntry &entry);
90 
92  bool send(int zId, MWAWPosition const &pos);
94  void flushExtra();
95 
96  //
97  // low level
98  //
99 
103  bool readFormula(Vec2i const &cellPos, std::vector<MWAWCellContent::FormulaInstruction> &formula, long endPos, std::string &extra);
105  bool readCellInFormula(Vec2i const &pos, bool canBeList, MWAWCellContent::FormulaInstruction &instr, long endPos, std::string &extra);
108 
109 private:
112 
113 protected:
114  //
115  // data
116  //
119 
121  shared_ptr<RagTimeSpreadsheetInternal::State> m_state;
122 
125 };
126 #endif
127 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
bool readCellInFormula(Vec2i const &pos, bool canBeList, MWAWCellContent::FormulaInstruction &instr, long endPos, std::string &extra)
try to read a cell in a formula
Definition: RagTimeSpreadsheet.cxx:953
small class use to define a formula instruction
Definition: MWAWCell.hxx:360
bool readFormula(Vec2i const &cellPos, std::vector< MWAWCellContent::FormulaInstruction > &formula, long endPos, std::string &extra)
try to read a formula
Definition: RagTimeSpreadsheet.cxx:1074
bool readSpreadsheetV2(MWAWEntry &entry)
try to read spreadsheet zone ( a big zone):v2
Definition: RagTimeSpreadsheet.cxx:280
Internal: a spreadsheet's zone of a RagTimeSpreadsheet.
Definition: RagTimeSpreadsheet.cxx:94
RagTimeSpreadsheet & operator=(RagTimeSpreadsheet const &orig)
int version() const
returns the file version
Definition: RagTimeSpreadsheet.cxx:180
Internal: a cell of a RagTimeSpreadsheet.
Definition: RagTimeSpreadsheet.cxx:61
void flushExtra()
flush extra data
Definition: RagTimeSpreadsheet.cxx:926
shared_ptr< RagTimeSpreadsheetInternal::State > m_state
the state
Definition: RagTimeSpreadsheet.hxx:121
RagTimeParser * m_mainParser
the main parser;
Definition: RagTimeSpreadsheet.hxx:124
bool send(int zId, MWAWPosition const &pos)
send a spreadsheet corresponding to zId
Definition: RagTimeSpreadsheet.cxx:900
the main class to read a RagTime v3 file
Definition: RagTimeParser.hxx:59
bool readSpreadsheetCellsV2(MWAWEntry &entry, RagTimeSpreadsheetInternal::Spreadsheet &sheet)
try to read spreadsheet cells :v2
Definition: RagTimeSpreadsheet.cxx:343
the main class to read the spreadsheet part of ragTime file
Definition: RagTimeSpreadsheet.hxx:69
shared_ptr< MWAWSpreadsheetListener > MWAWSpreadsheetListenerPtr
a smart pointer of MWAWSpreadsheetListener
Definition: libmwaw_internal.hxx:390
RagTimeSpreadsheet(RagTimeParser &parser)
constructor
Definition: RagTimeSpreadsheet.cxx:172
virtual ~RagTimeSpreadsheet()
destructor
Definition: RagTimeSpreadsheet.cxx:177
bool readSpreadsheetExtraV2(MWAWEntry &entry, RagTimeSpreadsheetInternal::Spreadsheet &sheet)
try to read spreadsheet end zone (positions, ...) :v2
Definition: RagTimeSpreadsheet.cxx:764
Internal: the structures of a RagTimeSpreadsheet.
Definition: RagTimeSpreadsheet.cxx:58
Defines MWAWCell (cell content and format)
bool readSpreadsheet(MWAWEntry &entry)
try to read a spreadsheet zone: v3-...
Definition: RagTimeSpreadsheet.cxx:195
bool readSpreadsheetCellV2(RagTimeSpreadsheetInternal::Cell &cell, long endPos)
try to read a cell :v2
Definition: RagTimeSpreadsheet.cxx:411
shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:386
MWAWParserStatePtr m_parserState
the parser state
Definition: RagTimeSpreadsheet.hxx:118
Class to define the position of an object (textbox, picture, ..) in the document. ...
Definition: MWAWPosition.hxx:47
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46

Generated for libmwaw by doxygen 1.8.8