ACText.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 Acta document
*
*/
#ifndef AC_TEXT
# define AC_TEXT
#include "libmwaw_internal.hxx"
#include "MWAWDebug.hxx"
namespace ACTextInternal
{
struct Topic;
struct State;
}
class ACParser;
class ACText
{
friend class ACParser;
public:
ACText(ACParser &parser);
virtual ~ACText();
int version() const;
int numPages() const;
protected:
bool createZones();
bool sendMainText();
//
// intermediate level
//
bool getColor(int id, MWAWColor &col) const;
bool readTopic();
bool sendTopic(ACTextInternal::Topic const &topic);
bool sendText(ACTextInternal::Topic const &topic);
bool sendGraphic(ACTextInternal::Topic const &topic);
bool readFont(MWAWFont &font, bool inPLC);
private:
ACText(ACText const &orig);
ACText &operator=(ACText const &orig);
protected:
//
// data
//
MWAWParserStatePtr m_parserState;
shared_ptr<ACTextInternal::State> m_state;
ACParser *m_mainParser;
};
#endif
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
ACTextInternal::Topic
Internal: a topic of a ACText.
Definition: ACText.cxx:62
ACText::createZones
bool createZones()
try to create the text zones
Definition: ACText.cxx:204
libmwaw_internal.hxx
ACText
the main class to read the text part of Acta Text file
Definition: ACText.hxx:57
ACText::sendText
bool sendText(ACTextInternal::Topic const &topic)
try to read a text entry
Definition: ACText.cxx:385
ACText::sendMainText
bool sendMainText()
send a main zone
Definition: ACText.cxx:228
ACText::getColor
bool getColor(int id, MWAWColor &col) const
return the color which corresponds to an id (if possible)
Definition: ACText.cxx:184
ACText::sendGraphic
bool sendGraphic(ACTextInternal::Topic const &topic)
try to read a graphic
Definition: ACText.cxx:483
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:161
ACText::ACText
ACText(ACParser &parser)
constructor
Definition: ACText.cxx:155
ACText::operator=
ACText & operator=(ACText const &orig)
ACText::sendTopic
bool sendTopic(ACTextInternal::Topic const &topic)
try to send a topic
Definition: ACText.cxx:330
ACText::m_mainParser
ACParser * m_mainParser
the main parser;
Definition: ACText.hxx:115
MWAWDebug.hxx
ACText::readTopic
bool readTopic()
try to read the topic definitions (line or graphic)
Definition: ACText.cxx:245
ACText::~ACText
virtual ~ACText()
destructor
Definition: ACText.cxx:160
MWAWParserStatePtr
shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:342
ACText::m_parserState
MWAWParserStatePtr m_parserState
the parser state
Definition: ACText.hxx:109
ACText::numPages
int numPages() const
returns the number of pages
Definition: ACText.cxx:170
ACParser
the main class to read a Acta file
Definition: ACParser.hxx:57
ACText::version
int version() const
returns the file version
Definition: ACText.cxx:163
ACText::readFont
bool readFont(MWAWFont &font, bool inPLC)
try to read a font
Definition: ACText.cxx:536
ACText::m_state
shared_ptr< ACTextInternal::State > m_state
the state
Definition: ACText.hxx:112