ClarisWksSpreadsheet.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 CLARIS_WKS_SPREADSHEET
# define CLARIS_WKS_SPREADSHEET
#include <list>
#include <string>
#include <vector>
#include "MWAWEntry.hxx"
#include "MWAWSubDocument.hxx"
#include "MWAWDebug.hxx"
#include "MWAWInputStream.hxx"
#include "MWAWParser.hxx"
#include "ClarisWksStruct.hxx"
namespace ClarisWksSpreadsheetInternal
{
struct Spreadsheet;
struct Field;
struct State;
}
class ClarisWksDocument;
class ClarisWksParser;
class ClarisWksSpreadsheet
{
friend class ClarisWksParser;
public:
explicit ClarisWksSpreadsheet(ClarisWksDocument &document);
virtual ~ClarisWksSpreadsheet();
int version() const;
int numPages() const;
std::shared_ptr<ClarisWksStruct::DSET> readSpreadsheetZone
(ClarisWksStruct::DSET const &zone, MWAWEntry const &entry, bool &complete);
bool canSendSpreadsheetAsGraphic(int) const
{
return false;
}
bool sendSpreadsheet(int number, MWAWListenerPtr listener);
bool sendSpreadsheetAsTable(int number, MWAWListenerPtr listener);
protected:
//
// Intermediate level
//
bool readZone1(ClarisWksSpreadsheetInternal::Spreadsheet &sheet);
bool readRowHeightZone(ClarisWksSpreadsheetInternal::Spreadsheet &sheet);
//
// low level
//
private:
ClarisWksSpreadsheet(ClarisWksSpreadsheet const &orig) = delete;
ClarisWksSpreadsheet &operator=(ClarisWksSpreadsheet const &orig) = delete;
protected:
//
// data
//
ClarisWksDocument &m_document;
MWAWParserStatePtr m_parserState;
std::shared_ptr<ClarisWksSpreadsheetInternal::State> m_state;
MWAWParser *m_mainParser;
};
#endif
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
ClarisWksStruct.hxx
MWAWDebug.hxx
MWAWEntry.hxx
MWAWInputStream.hxx
MWAWParser.hxx
MWAWSubDocument.hxx
ClarisWksDocument
main document information used to create a ClarisWorks file
Definition ClarisWksDocument.hxx:74
ClarisWksParser
the main class to read a Claris Works file
Definition ClarisWksParser.hxx:68
ClarisWksSpreadsheet::~ClarisWksSpreadsheet
virtual ~ClarisWksSpreadsheet()
destructor
Definition ClarisWksSpreadsheet.cxx:156
ClarisWksSpreadsheet::operator=
ClarisWksSpreadsheet & operator=(ClarisWksSpreadsheet const &orig)=delete
ClarisWksSpreadsheet::sendSpreadsheet
bool sendSpreadsheet(int number, MWAWListenerPtr listener)
sends the zone data to the listener (if it exists )
Definition ClarisWksSpreadsheet.cxx:474
ClarisWksSpreadsheet::m_mainParser
MWAWParser * m_mainParser
the main parser;
Definition ClarisWksSpreadsheet.hxx:132
ClarisWksSpreadsheet::numPages
int numPages() const
returns the number of pages
Definition ClarisWksSpreadsheet.cxx:165
ClarisWksSpreadsheet::sendSpreadsheetAsTable
bool sendSpreadsheetAsTable(int number, MWAWListenerPtr listener)
sends the zone data to the listener (if it exists )
Definition ClarisWksSpreadsheet.cxx:583
ClarisWksSpreadsheet::ClarisWksSpreadsheet
ClarisWksSpreadsheet(ClarisWksDocument &document)
constructor
Definition ClarisWksSpreadsheet.cxx:148
ClarisWksSpreadsheet::ClarisWksParser
friend class ClarisWksParser
Definition ClarisWksSpreadsheet.hxx:72
ClarisWksSpreadsheet::canSendSpreadsheetAsGraphic
bool canSendSpreadsheetAsGraphic(int) const
check if we can send a spreadsheet as graphic
Definition ClarisWksSpreadsheet.hxx:90
ClarisWksSpreadsheet::version
int version() const
returns the file version
Definition ClarisWksSpreadsheet.cxx:159
ClarisWksSpreadsheet::m_state
std::shared_ptr< ClarisWksSpreadsheetInternal::State > m_state
the state
Definition ClarisWksSpreadsheet.hxx:129
ClarisWksSpreadsheet::readRowHeightZone
bool readRowHeightZone(ClarisWksSpreadsheetInternal::Spreadsheet &sheet)
try to read the row height zone
Definition ClarisWksSpreadsheet.cxx:420
ClarisWksSpreadsheet::readZone1
bool readZone1(ClarisWksSpreadsheetInternal::Spreadsheet &sheet)
try to read the first spreadsheet zone
Definition ClarisWksSpreadsheet.cxx:353
ClarisWksSpreadsheet::readSpreadsheetZone
std::shared_ptr< ClarisWksStruct::DSET > readSpreadsheetZone(ClarisWksStruct::DSET const &zone, MWAWEntry const &entry, bool &complete)
reads the zone Text DSET
Definition ClarisWksSpreadsheet.cxx:177
ClarisWksSpreadsheet::ClarisWksSpreadsheet
ClarisWksSpreadsheet(ClarisWksSpreadsheet const &orig)=delete
ClarisWksSpreadsheet::m_document
ClarisWksDocument & m_document
the document
Definition ClarisWksSpreadsheet.hxx:123
ClarisWksSpreadsheet::m_parserState
MWAWParserStatePtr m_parserState
the parser state
Definition ClarisWksSpreadsheet.hxx:126
MWAWEntry
basic class to store an entry in a file This contained :
Definition MWAWEntry.hxx:47
MWAWParser
virtual class which defines the ancestor of all main zone parser
Definition MWAWParser.hxx:100
MWAWParserStatePtr
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition libmwaw_internal.hxx:557
MWAWListenerPtr
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition libmwaw_internal.hxx:553
ClarisWksSpreadsheetInternal
Internal: the structures of a ClarisWksSpreadsheet.
Definition ClarisWksSpreadsheet.cxx:59
ClarisWksSpreadsheetInternal::Spreadsheet
Internal the spreadsheet.
Definition ClarisWksSpreadsheet.cxx:61
ClarisWksSpreadsheetInternal::State
Internal: the state of a ClarisWksSpreadsheet.
Definition ClarisWksSpreadsheet.cxx:133
ClarisWksStruct::DSET
main structure which correspond to a document part
Definition ClarisWksStruct.hxx:87