MsWksTable.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 Microsoft Works text document ( table and chart )
*/
#ifndef MS_WKS_MWAW_TABLE
# define MS_WKS_MWAW_TABLE
#include <list>
#include <string>
#include <vector>
#include "MWAWEntry.hxx"
#include "MWAWParser.hxx"
#include "MsWksGraph.hxx"
namespace MsWksTableInternal
{
struct Table;
struct State;
}
class MsWksDocument;
class MsWksTable
{
friend class MsWksGraph;
public:
MsWksTable(MWAWParser &parser, MsWksDocument &zone, MsWksGraph &graph);
virtual ~MsWksTable();
int version() const;
bool readTable(int numCol, int numRow, int zoneId, MsWksGraph::Style const &style);
bool sendTable(int zoneId);
bool readChart(int chartId, MsWksGraph::Style const &style);
void setChartZoneId(int chartId, int zoneId);
bool sendChart(int chartId);
private:
MsWksTable(MsWksTable const &orig) = delete;
MsWksTable &operator=(MsWksTable const &orig) = delete;
protected:
//
// data
//
MWAWParserStatePtr m_parserState;
std::shared_ptr<MsWksTableInternal::State> m_state;
MWAWParser *m_mainParser;
MsWksGraph *m_graphParser;
MsWksDocument &m_zone;
};
#endif
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWEntry.hxx
MWAWParser.hxx
MsWksGraph.hxx
MWAWParser
virtual class which defines the ancestor of all main zone parser
Definition MWAWParser.hxx:100
MsWksDocument
the main class to read/store generic data of a MsWorks document v1-v3
Definition MsWksDocument.hxx:69
MsWksTable::MsWksTable
MsWksTable(MWAWParser &parser, MsWksDocument &zone, MsWksGraph &graph)
constructor
Definition MsWksTable.cxx:177
MsWksTable::m_zone
MsWksDocument & m_zone
the input zone
Definition MsWksTable.hxx:101
MsWksTable::MsWksGraph
friend class MsWksGraph
Definition MsWksTable.hxx:60
MsWksTable::m_parserState
MWAWParserStatePtr m_parserState
the parser state
Definition MsWksTable.hxx:91
MsWksTable::~MsWksTable
virtual ~MsWksTable()
destructor
Definition MsWksTable.cxx:186
MsWksTable::MsWksTable
MsWksTable(MsWksTable const &orig)=delete
MsWksTable::m_graphParser
MsWksGraph * m_graphParser
the graph parser;
Definition MsWksTable.hxx:99
MsWksTable::operator=
MsWksTable & operator=(MsWksTable const &orig)=delete
MsWksTable::version
int version() const
returns the file version
Definition MsWksTable.cxx:189
MsWksTable::readChart
bool readChart(int chartId, MsWksGraph::Style const &style)
try to read a chart zone
Definition MsWksTable.cxx:496
MsWksTable::m_state
std::shared_ptr< MsWksTableInternal::State > m_state
the state
Definition MsWksTable.hxx:94
MsWksTable::sendTable
bool sendTable(int zoneId)
try to a table zone
Definition MsWksTable.cxx:199
MsWksTable::readTable
bool readTable(int numCol, int numRow, int zoneId, MsWksGraph::Style const &style)
try to read a table zone
Definition MsWksTable.cxx:287
MsWksTable::setChartZoneId
void setChartZoneId(int chartId, int zoneId)
fix the correspondance between a chart and the zone id
Definition MsWksTable.cxx:419
MsWksTable::m_mainParser
MWAWParser * m_mainParser
the main parser;
Definition MsWksTable.hxx:97
MsWksTable::sendChart
bool sendChart(int chartId)
try to a chart zone
Definition MsWksTable.cxx:429
MWAWParserStatePtr
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition libmwaw_internal.hxx:557
MsWksTableInternal
Internal: the structures of a MsWksTable.
Definition MsWksTable.cxx:58
MsWksGraph::Style
Internal: the graphic style of MsWksGraph.
Definition MsWksGraph.hxx:208
MsWksTableInternal::State
Internal: the state of a MsWksTable.
Definition MsWksTable.cxx:154
MsWksTableInternal::Table
Internal: the table of a MsWksTable.
Definition MsWksTable.cxx:92