CWTable.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 ( table part )
*
*/
#ifndef CW_TABLE
# define CW_TABLE
#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 CWTableInternal
{
struct Table;
struct State;
}
class CWParser;
class CWStyleManager;
class CWTable
{
friend class CWParser;
friend struct CWTableInternal::Table;
public:
CWTable(CWParser &parser);
virtual ~CWTable();
int version() const;
int numPages() const;
shared_ptr<CWStruct::DSET> readTableZone
(CWStruct::DSET const &zone, MWAWEntry const &entry, bool &complete);
protected:
bool sendZone(int number);
bool askMainToSendZone(int number);
void flushExtra();
//
// Intermediate level
//
bool readTableBorders(CWTableInternal::Table &table);
bool readTableCells(CWTableInternal::Table &table);
bool readTableBordersId(CWTableInternal::Table &table);
bool readTablePointers(CWTableInternal::Table &table);
private:
CWTable(CWTable const &orig);
CWTable &operator=(CWTable const &orig);
protected:
//
// data
//
MWAWParserStatePtr m_parserState;
shared_ptr<CWTableInternal::State> m_state;
CWParser *m_mainParser;
shared_ptr<CWStyleManager> m_styleManager;
};
#endif
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
CWTableInternal::Table
the struct which stores the Table
Definition: CWTable.cxx:124
CWTable::m_mainParser
CWParser * m_mainParser
the main parser;
Definition: CWTable.hxx:131
CWStruct::DSET
main structure which correspond to a document part
Definition: CWStruct.hxx:55
CWTable::readTableZone
shared_ptr< CWStruct::DSET > readTableZone(CWStruct::DSET const &zone, MWAWEntry const &entry, bool &complete)
reads the zone Text DSET
Definition: CWTable.cxx:294
CWStyleManager
a structure to store the style list and the lookup zone
Definition: CWStyleManager.hxx:60
MWAWParser.hxx
MWAWEntry.hxx
MWAWSubDocument.hxx
CWTable::m_parserState
MWAWParserStatePtr m_parserState
the parser state
Definition: CWTable.hxx:125
CWTable::readTablePointers
bool readTablePointers(CWTableInternal::Table &table)
try to read a list of pointer ( unknown meaning )
Definition: CWTable.cxx:708
CWTable::operator=
CWTable & operator=(CWTable const &orig)
CWTable
the main class to read the text part of Claris Works file
Definition: CWTable.hxx:69
CWTable::readTableCells
bool readTableCells(CWTableInternal::Table &table)
try to read the table cells
Definition: CWTable.cxx:531
CWStruct.hxx
CWTable::m_state
shared_ptr< CWTableInternal::State > m_state
the state
Definition: CWTable.hxx:128
CWTable::readTableBordersId
bool readTableBordersId(CWTableInternal::Table &table)
try to read the table border
Definition: CWTable.cxx:647
CWTable::flushExtra
void flushExtra()
sends the data which have not yet been sent to the listener
Definition: CWTable.cxx:435
CWTable::m_styleManager
shared_ptr< CWStyleManager > m_styleManager
the style manager
Definition: CWTable.hxx:134
CWParser
the main class to read a Claris Works file
Definition: CWParser.hxx:73
CWTable::readTableBorders
bool readTableBorders(CWTableInternal::Table &table)
try to read the table border
Definition: CWTable.cxx:453
MWAWInputStream.hxx
MWAWDebug.hxx
CWTable::~CWTable
virtual ~CWTable()
destructor
Definition: CWTable.cxx:268
CWTable::askMainToSendZone
bool askMainToSendZone(int number)
ask the main parser to send a zone
Definition: CWTable.cxx:276
CWTable::sendZone
bool sendZone(int number)
sends the zone data to the listener (if it exists )
Definition: CWTable.cxx:414
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
CWTable::CWTable
CWTable(CWParser &parser)
constructor
Definition: CWTable.cxx:262
CWTable::numPages
int numPages() const
returns the number of pages
Definition: CWTable.cxx:282
CWTable::version
int version() const
returns the file version
Definition: CWTable.cxx:271