CWSpreadsheet.hxx
Go to the documentation of this file.
/* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
/* libmwaw
* Version: MPL 2.0 / LGPLv2+
*
* The contents of this file are subject to the Mozilla Public License Version
* 2.0 (the "License"); you may not use this file except in compliance with
* the License or as specified alternatively below. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Major Contributor(s):
* Copyright (C) 2002 William Lachance (wrlach@gmail.com)
* Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
* Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
* Copyright (C) 2006, 2007 Andrew Ziem
* Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
*
*
* All Rights Reserved.
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms of
* the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
* in which case the provisions of the LGPLv2+ are applicable
* instead of those above.
*/
/*
* Parser to Claris Works text document ( spreadsheet part )
*
*/
#ifndef CW_MWAW_SPREADSHEET
# define CW_MWAW_SPREADSHEET
#include <list>
#include <string>
#include <vector>
#include "MWAWEntry.hxx"
#include "MWAWSubDocument.hxx"
#include "MWAWDebug.hxx"
#include "MWAWInputStream.hxx"
#include "MWAWParser.hxx"
#include "CWStruct.hxx"
namespace CWSpreadsheetInternal
{
struct Spreadsheet;
struct Field;
struct State;
}
class CWParser;
class CWStyleManager;
class CWSpreadsheet
{
friend class CWParser;
public:
CWSpreadsheet(CWParser &parser);
virtual ~CWSpreadsheet();
int version() const;
int numPages() const;
shared_ptr<CWStruct::DSET> readSpreadsheetZone
(CWStruct::DSET const &zone, MWAWEntry const &entry, bool &complete);
protected:
//
// Intermediate level
//
bool readZone1(CWSpreadsheetInternal::Spreadsheet &sheet);
bool readContent(CWSpreadsheetInternal::Spreadsheet &sheet);
private:
CWSpreadsheet(CWSpreadsheet const &orig);
CWSpreadsheet &operator=(CWSpreadsheet const &orig);
protected:
//
// data
//
MWAWParserStatePtr m_parserState;
shared_ptr<CWSpreadsheetInternal::State> m_state;
CWParser *m_mainParser;
shared_ptr<CWStyleManager> m_styleManager;
};
#endif
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
CWStruct::DSET
main structure which correspond to a document part
Definition: CWStruct.hxx:55
CWSpreadsheet::m_state
shared_ptr< CWSpreadsheetInternal::State > m_state
the state
Definition: CWSpreadsheet.hxx:113
CWStyleManager
a structure to store the style list and the lookup zone
Definition: CWStyleManager.hxx:60
MWAWParser.hxx
MWAWEntry.hxx
MWAWSubDocument.hxx
CWSpreadsheet
the main class to read the text part of Claris Works file
Definition: CWSpreadsheet.hxx:70
CWSpreadsheet::version
int version() const
returns the file version
Definition: CWSpreadsheet.cxx:92
CWSpreadsheet::m_parserState
MWAWParserStatePtr m_parserState
the parser state
Definition: CWSpreadsheet.hxx:110
CWSpreadsheet::m_mainParser
CWParser * m_mainParser
the main parser;
Definition: CWSpreadsheet.hxx:116
CWStruct.hxx
CWSpreadsheet::readSpreadsheetZone
shared_ptr< CWStruct::DSET > readSpreadsheetZone(CWStruct::DSET const &zone, MWAWEntry const &entry, bool &complete)
reads the zone Text DSET
Definition: CWSpreadsheet.cxx:110
CWSpreadsheet::~CWSpreadsheet
virtual ~CWSpreadsheet()
destructor
Definition: CWSpreadsheet.cxx:89
CWParser
the main class to read a Claris Works file
Definition: CWParser.hxx:73
CWSpreadsheet::readZone1
bool readZone1(CWSpreadsheetInternal::Spreadsheet &sheet)
try to read the first spreadsheet zone
Definition: CWSpreadsheet.cxx:238
CWSpreadsheet::operator=
CWSpreadsheet & operator=(CWSpreadsheet const &orig)
MWAWInputStream.hxx
MWAWDebug.hxx
CWSpreadsheet::CWSpreadsheet
CWSpreadsheet(CWParser &parser)
constructor
Definition: CWSpreadsheet.cxx:83
CWSpreadsheetInternal::Spreadsheet
Internal the spreadsheet.
Definition: CWSpreadsheet.cxx:56
MWAWParserStatePtr
shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:342
MWAWEntry
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:46
CWSpreadsheet::numPages
int numPages() const
returns the number of pages
Definition: CWSpreadsheet.cxx:98
CWSpreadsheet::m_styleManager
shared_ptr< CWStyleManager > m_styleManager
the style manager
Definition: CWSpreadsheet.hxx:119
CWSpreadsheet::readContent
bool readContent(CWSpreadsheetInternal::Spreadsheet &sheet)
try to read the record structure
Definition: CWSpreadsheet.cxx:305