ReadySetGoStyleManager.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.
*/
#ifndef READYSETGO_STYLE_MANAGER
# define READYSETGO_STYLE_MANAGER
#include <string>
#include <vector>
#include <librevenge/librevenge.h>
#include "MWAWDebug.hxx"
#include "MWAWGraphicStyle.hxx"
#include "MWAWInputStream.hxx"
#include "MWAWParser.hxx"
struct MWAWTabStop;
namespace ReadySetGoStyleManagerInternal
{
struct State;
}
class ReadySetGoParser;
class ReadySetGoStyleManager
{
friend class ReadySetGoParser;
public:
explicit ReadySetGoStyleManager(ReadySetGoParser &parser);
virtual ~ReadySetGoStyleManager();
bool getColor(int colorId, MWAWColor &color) const;
bool getPattern(int patternId, MWAWGraphicStyle::Pattern &pattern) const;
bool readStyle(MWAWFont &font, MWAWParagraph &para, int *cPos=nullptr);
bool readTabulationsV1(std::vector<MWAWTabStop> &tabulations, std::string &extra);
bool readTabulations(std::vector<MWAWTabStop> &tabs, long len=-1, int *cPos=nullptr);
protected:
int version() const;
//
// data
//
bool readColors();
bool readColorNames();
bool readFontsBlock();
bool readFontsBlock2();
bool readFontsName();
bool readStyles(int numStyles);
protected:
ReadySetGoParser &m_parser;
MWAWParserStatePtr m_parserState;
std::shared_ptr<ReadySetGoStyleManagerInternal::State> m_state;
};
#endif
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWDebug.hxx
MWAWGraphicStyle.hxx
MWAWInputStream.hxx
MWAWParser.hxx
MWAWFont
Class to store font.
Definition MWAWFont.hxx:44
MWAWParagraph
class to store the paragraph properties
Definition MWAWParagraph.hxx:85
ReadySetGoParser
the main class to read a ReadySetGo 1.0,2.1,3.0,4.0,4.5,6.0 file
Definition ReadySetGoParser.hxx:61
ReadySetGoStyleManager::readStyles
bool readStyles(int numStyles)
try to read the list of style block: v4
Definition ReadySetGoStyleManager.cxx:666
ReadySetGoStyleManager::ReadySetGoStyleManager
ReadySetGoStyleManager(ReadySetGoParser &parser)
constructor
Definition ReadySetGoStyleManager.cxx:302
ReadySetGoStyleManager::readTabulations
bool readTabulations(std::vector< MWAWTabStop > &tabs, long len=-1, int *cPos=nullptr)
try to read a list of tabulations: v3
Definition ReadySetGoStyleManager.cxx:1013
ReadySetGoStyleManager::readStyle
bool readStyle(MWAWFont &font, MWAWParagraph &para, int *cPos=nullptr)
try to read a style: v3
Definition ReadySetGoStyleManager.cxx:765
ReadySetGoStyleManager::m_state
std::shared_ptr< ReadySetGoStyleManagerInternal::State > m_state
the state
Definition ReadySetGoStyleManager.hxx:108
ReadySetGoStyleManager::readColorNames
bool readColorNames()
try to read the list of colors: v4.5
Definition ReadySetGoStyleManager.cxx:393
ReadySetGoStyleManager::readTabulationsV1
bool readTabulationsV1(std::vector< MWAWTabStop > &tabulations, std::string &extra)
try to read a list of tabulations: v1-2
Definition ReadySetGoStyleManager.cxx:939
ReadySetGoStyleManager::m_parserState
MWAWParserStatePtr m_parserState
the parser state
Definition ReadySetGoStyleManager.hxx:106
ReadySetGoStyleManager::ReadySetGoParser
friend class ReadySetGoParser
Definition ReadySetGoStyleManager.hxx:62
ReadySetGoStyleManager::version
int version() const
returns the file version
Definition ReadySetGoStyleManager.cxx:313
ReadySetGoStyleManager::m_parser
ReadySetGoParser & m_parser
the main parser
Definition ReadySetGoStyleManager.hxx:104
ReadySetGoStyleManager::readFontsBlock2
bool readFontsBlock2()
try to read the optional list of font block: name + data?, v6
Definition ReadySetGoStyleManager.cxx:543
ReadySetGoStyleManager::~ReadySetGoStyleManager
virtual ~ReadySetGoStyleManager()
destructor
Definition ReadySetGoStyleManager.cxx:309
ReadySetGoStyleManager::readFontsName
bool readFontsName()
try to read the list of font name: v6
Definition ReadySetGoStyleManager.cxx:603
ReadySetGoStyleManager::readColors
bool readColors()
try to read the list of colors: v4.5
Definition ReadySetGoStyleManager.cxx:354
ReadySetGoStyleManager::getPattern
bool getPattern(int patternId, MWAWGraphicStyle::Pattern &pattern) const
try to retrieve a pattern
Definition ReadySetGoStyleManager.cxx:336
ReadySetGoStyleManager::readFontsBlock
bool readFontsBlock()
try to read the list of font block: unsure, name + data?, v4.5
Definition ReadySetGoStyleManager.cxx:450
ReadySetGoStyleManager::getColor
bool getColor(int colorId, MWAWColor &color) const
try to retrieve the i^th color
Definition ReadySetGoStyleManager.cxx:326
MWAWParserStatePtr
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition libmwaw_internal.hxx:557
ReadySetGoStyleManagerInternal
Internal: the structures of a ReadySetGoStyleManager.
Definition ReadySetGoStyleManager.cxx:61
MWAWColor
the class to store a color
Definition libmwaw_internal.hxx:192
MWAWGraphicStyle::Pattern
a basic pattern used in a MWAWGraphicStyle:
Definition MWAWGraphicStyle.hxx:351
MWAWTabStop
class to store a tab use by MWAWParagraph
Definition MWAWParagraph.hxx:46
ReadySetGoStyleManagerInternal::State
Internal: the state of a ReadySetGoStyleManager.
Definition ReadySetGoStyleManager.cxx:65