| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 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 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 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 |
|
| 46 |
|
| 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 |
| 69 |
|