QXP4Header.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libqxp project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10 #ifndef QXP4HEADER_H_INCLUDED
11 #define QXP4HEADER_H_INCLUDED
12
13 #include <string>
14
15 #include "libqxp_utils.h"
16 #include "QXP3HeaderBase.h"
17 #include "QXPTypes.h"
18
19 namespace libqxp
20 {
21
22 class QXP4Header : public QXP3HeaderBase, public std::enable_shared_from_this<QXP4Header>
23 {
24 public:
25 explicit QXP4Header(const boost::optional<QXPDocument::Type> &fileType = boost::none);
26
27 bool load(const std::shared_ptr<librevenge::RVNGInputStream> &input) override;
28
29 QXPDocument::Type getType() const override;
30
31 std::unique_ptr<QXPParser> createParser(const std::shared_ptr<librevenge::RVNGInputStream> &input, librevenge::RVNGDrawingInterface *painter) override;
32
33 uint16_t pagesCount() const;
34 uint16_t masterPagesCount() const;
35 uint16_t seed() const;
36 uint16_t increment() const;
37 const QXPDocumentProperties &documentProperties() const;
38
39 private:
40 std::string m_type;
41 uint16_t m_pagesCount;
42 uint16_t m_masterPagesCount;
43 uint16_t m_seed;
44 uint16_t m_increment;
45 QXPDocumentProperties m_documentProperties;
46 };
47
48 }
49
50 #endif // QXP4HEADER_H_INCLUDED
51
52 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libqxp::QXP4Header::m_masterPagesCount
uint16_t m_masterPagesCount
Definition: QXP4Header.h:42
QXP4Parser.h
libqxp::QXP4Header::m_pagesCount
uint16_t m_pagesCount
Definition: QXP4Header.h:41
libqxp::QXP4Header::m_type
std::string m_type
Definition: QXP4Header.h:40
libqxp::QXP4Header::pagesCount
uint16_t pagesCount() const
Definition: QXP4Header.cpp:92
libqxp::readU16
uint16_t readU16(librevenge::RVNGInputStream *input, bool bigEndian)
Definition: libqxp_utils.cpp:111
libqxp::QXPDocumentProperties::superscriptHScale
double superscriptHScale
Definition: QXPTypes.h:576
libqxp::QXPDocumentProperties::subscriptHScale
double subscriptHScale
Definition: QXPTypes.h:579
libqxp::QXP4Header::QXP4Header
QXP4Header(const boost::optional< QXPDocument::Type > &fileType=boost::none)
Definition: QXP4Header.cpp:19
libqxp::QXP4Header
Definition: QXP4Header.h:22
libqxp::QXPHeader::isLittleEndian
bool isLittleEndian() const
Definition: QXPHeader.cpp:25
libqxp::QXP4Header::documentProperties
const QXPDocumentProperties & documentProperties() const
Definition: QXP4Header.cpp:112
libqxp::QXPDocumentProperties::subscriptVScale
double subscriptVScale
Definition: QXPTypes.h:580
libqxp::QXP4Deobfuscator
Definition: QXP4Deobfuscator.h:19
libqxp::QXPDocumentProperties::setAutoLeading
void setAutoLeading(const double val)
Definition: QXPTypes.cpp:159
libqxp
Definition: libqxp_utils.cpp:24
QXP3HeaderBase.h
libqxp::QXP3HeaderBase::load
bool load(const std::shared_ptr< librevenge::RVNGInputStream > &input) override
Definition: QXP3HeaderBase.cpp:23
libqxp::QXPDocumentProperties::superiorVScale
double superiorVScale
Definition: QXPTypes.h:582
libqxp::QXP4Header::increment
uint16_t increment() const
Definition: QXP4Header.cpp:107
libqxp::seek
void seek(librevenge::RVNGInputStream *const input, const unsigned long pos)
Definition: libqxp_utils.cpp:241
libqxp::QXP4Header::getType
QXPDocument::Type getType() const override
Definition: QXP4Header.cpp:70
libqxp::QXPHeader::m_fileType
boost::optional< QXPDocument::Type > m_fileType
Definition: QXPHeader.h:61
libqxp::QXPDocumentProperties::superscriptVScale
double superscriptVScale
Definition: QXPTypes.h:577
libqxp::QXP4Header::m_increment
uint16_t m_increment
Definition: QXP4Header.h:44
libqxp_utils.h
libqxp::QXP3HeaderBase
Definition: QXP3HeaderBase.h:20
QXP4Header.h
libqxp::QXPDocumentProperties::superscriptOffset
double superscriptOffset
Definition: QXPTypes.h:575
libqxp::QXP4Header::seed
uint16_t seed() const
Definition: QXP4Header.cpp:102
libqxp::QXPDocumentProperties::subscriptOffset
double subscriptOffset
Definition: QXPTypes.h:578
libqxp::readFraction
double readFraction(librevenge::RVNGInputStream *input, bool bigEndian)
Definition: libqxp_utils.cpp:174
QXP4Deobfuscator.h
libqxp::seekRelative
void seekRelative(librevenge::RVNGInputStream *const input, const long pos)
Definition: libqxp_utils.cpp:250
libqxp::QXPDocumentProperties
Definition: QXPTypes.h:560
libqxp::QXP4Header::load
bool load(const std::shared_ptr< librevenge::RVNGInputStream > &input) override
Definition: QXP4Header.cpp:30
libqxp::QXP4Header::m_seed
uint16_t m_seed
Definition: QXP4Header.h:43
libqxp::QXP4Header::createParser
std::unique_ptr< QXPParser > createParser(const std::shared_ptr< librevenge::RVNGInputStream > &input, librevenge::RVNGDrawingInterface *painter) override
Definition: QXP4Header.cpp:87
libqxp::QXPHeader::isBigEndian
bool isBigEndian() const
Definition: QXPHeader.cpp:30
QXPTypes.h
libqxp::readU8
uint8_t readU8(librevenge::RVNGInputStream *input, bool)
Definition: libqxp_utils.cpp:99
libqxp::QXP4Header::m_documentProperties
QXPDocumentProperties m_documentProperties
Definition: QXP4Header.h:45
libqxp::QXP4Header::masterPagesCount
uint16_t masterPagesCount() const
Definition: QXP4Header.cpp:97
libqxp::QXPDocumentProperties::superiorHScale
double superiorHScale
Definition: QXPTypes.h:581
libqxp::readString
std::string readString(librevenge::RVNGInputStream *input, const unsigned length)
Definition: libqxp_utils.cpp:217
libqxp::skip
void skip(librevenge::RVNGInputStream *input, unsigned long numBytes)
Definition: libqxp_utils.cpp:234
libqxp::QXP4Parser
Definition: QXP4Parser.h:22