DosWord.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2/* libwps
3 * Version: MPL 2.0 / LGPLv2.1+
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 * Major Contributor(s):
10 * Copyright (C) 2015 Sean Young <sean@mess.org>
11 *
12 * For minor contributions see the git repository.
13 *
14 * Alternatively, the contents of this file may be used under the terms
15 * of the GNU Lesser General Public License Version 2.1 or later
16 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
17 * applicable instead of those above.
18 *
19 * For further information visit http://libwps.sourceforge.net
20 */
21
22#ifndef DOSWORD_H
23#define DOSWORD_H
24
25#include <librevenge-stream/librevenge-stream.h>
26#include "libwps_internal.h"
27#include "libwps_tools_win.h"
28
29#include "MSWrite.h"
30#include "WPSParser.h"
31#include "WPSEntry.h"
32#include "WPSPageSpan.h"
33
38 class DosWordParser final : public MSWriteParser
39{
40 public:
41 DosWordParser(RVNGInputStreamPtr &input, WPSHeaderPtr &header,
42 libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN);
43
44 ~DosWordParser() final;
45
47 bool checkHeader(WPSHeader *header, bool strict=false);
48
49 private:
50 DosWordParser(const DosWordParser &) = delete;
51 DosWordParser &operator=(const DosWordParser &) = delete;
52 libwps_tools_win::Font::Type getFileEncoding(libwps_tools_win::Font::Type hint) final;
53
54 static WPSColor color(int clr);
55
56 void readSECT(uint32_t fcSep, uint32_t fcLim);
57 void readSED() final;
58 void readFFNTB() final;
59 void readCHP(uint32_t fcFirst, uint32_t fcLim, unsigned cch) final;
60 void readPAP(uint32_t fcFirst, uint32_t fcLim, unsigned cch) final;
61 void readSUMD() final;
62 void readFNTB() final;
63
64 void insertSpecial(uint8_t val, uint32_t fc, MSWriteParserInternal::Paragraph::Location location) final;
65 void insertControl(uint8_t val, uint32_t fc) final;
66};
67
68#endif /* DOSWORD_H */
69/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
MSWrite.h
WPSEntry.h
WPSPageSpan.h
WPSParser.h
DosWordParser::color
static WPSColor color(int clr)
Definition DosWord.cpp:216
DosWordParser::readSED
void readSED() final
Definition DosWord.cpp:819
DosWordParser::readFFNTB
void readFFNTB() final
Definition DosWord.cpp:137
DosWordParser::readSECT
void readSECT(uint32_t fcSep, uint32_t fcLim)
Definition DosWord.cpp:877
DosWordParser::DosWordParser
DosWordParser(RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN)
Definition DosWord.cpp:126
DosWordParser::getFileEncoding
libwps_tools_win::Font::Type getFileEncoding(libwps_tools_win::Font::Type hint) final
Definition DosWord.cpp:199
DosWordParser::operator=
DosWordParser & operator=(const DosWordParser &)=delete
DosWordParser::insertControl
void insertControl(uint8_t val, uint32_t fc) final
Definition DosWord.cpp:581
DosWordParser::readPAP
void readPAP(uint32_t fcFirst, uint32_t fcLim, unsigned cch) final
Definition DosWord.cpp:337
DosWordParser::readCHP
void readCHP(uint32_t fcFirst, uint32_t fcLim, unsigned cch) final
Definition DosWord.cpp:240
DosWordParser::readSUMD
void readSUMD() final
Definition DosWord.cpp:636
DosWordParser::insertSpecial
void insertSpecial(uint8_t val, uint32_t fc, MSWriteParserInternal::Paragraph::Location location) final
Definition DosWord.cpp:543
DosWordParser::DosWordParser
DosWordParser(const DosWordParser &)=delete
DosWordParser::~DosWordParser
~DosWordParser() final
Definition DosWord.cpp:133
DosWordParser::readFNTB
void readFNTB() final
Definition DosWord.cpp:770
DosWordParser::checkHeader
bool checkHeader(WPSHeader *header, bool strict=false)
checks if the document header is correct (or not)
Definition DosWord.cpp:144
MSWriteParser::MSWriteParser
MSWriteParser(RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::WIN3_WEUROPE)
Definition MSWrite.cpp:290
MSWriteParser::Paragraph
friend struct MSWriteParserInternal::Paragraph
Definition MSWrite.h:134
WPSHeader
Definition WPSHeader.h:32
libwps_tools_win::Font::Type
Type
enum Type
Definition libwps_tools_win.h:46
libwps_tools_win::Font::UNKNOWN
@ UNKNOWN
Definition libwps_tools_win.h:63
libwps_internal.h
WPSHeaderPtr
std::shared_ptr< WPSHeader > WPSHeaderPtr
shared pointer to WPSHeader
Definition libwps_internal.h:109
RVNGInputStreamPtr
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition libwps_internal.h:87
libwps_tools_win.h
MSWriteParserInternal
Definition MSWrite.cpp:39
WPSColor
the class to store a color
Definition libwps_internal.h:281