DosWordParser Class Referencefinal

This class parses Microsoft Word for DOS. More...

#include <DosWord.h>

Inheritance diagram for DosWordParser:
MSWriteParser WPSParser

Public Member Functions

 DosWordParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::UNKNOWN)
 
 ~DosWordParser () final
 
bool checkHeader (WPSHeader *header, bool strict=false)
 checks if the document header is correct (or not)
 
- Public Member Functions inherited from MSWriteParser
 MSWriteParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::WIN3_WEUROPE)
 
 ~MSWriteParser () override
 
void parse (librevenge::RVNGTextInterface *documentInterface) override
 
- Public Member Functions inherited from WPSParser
 WPSParser (RVNGInputStreamPtr &input, WPSHeaderPtr &header)
 
virtual ~WPSParser ()
 

Private Member Functions

 DosWordParser (const DosWordParser &)=delete
 
DosWordParseroperator= (const DosWordParser &)=delete
 
libwps_tools_win::Font::Type getFileEncoding (libwps_tools_win::Font::Type hint) final
 
void readSECT (uint32_t fcSep, uint32_t fcLim)
 
void readSED () final
 
void readFFNTB () final
 
void readCHP (uint32_t fcFirst, uint32_t fcLim, unsigned cch) final
 
void readPAP (uint32_t fcFirst, uint32_t fcLim, unsigned cch) final
 
void readSUMD () final
 
void readFNTB () final
 
void insertSpecial (uint8_t val, uint32_t fc, MSWriteParserInternal::Paragraph::Location location) final
 
void insertControl (uint8_t val, uint32_t fc) final
 

Static Private Member Functions

static WPSColor color (int clr)
 

Additional Inherited Members

- Public Types inherited from WPSParser
typedef std::multimap< std::string, WPSEntryNameMultiMap
 a map to retrieve a file entry by name
 
- Protected Member Functions inherited from MSWriteParser
void readStructures ()
 
void readFIB ()
 
void readFOD (unsigned page, void(MSWriteParser::*parseFOD)(uint32_t fcFirst, uint32_t fcLim, unsigned size))
 
void readText (WPSEntry const &e, MSWriteParserInternal::Paragraph::Location location)
 
int numPages ()
 
void processObject (WPSPosition &pos, unsigned long lastPos)
 
bool processDDB (librevenge::RVNGBinaryData &bmpdata, WPSPosition &pos, unsigned width, unsigned height, unsigned byte_width, unsigned planes, unsigned bits_pixel, unsigned size)
 
bool processDIB (librevenge::RVNGBinaryData &bmpdata, unsigned size)
 
bool processWMF (librevenge::RVNGBinaryData &wmfdata, unsigned size)
 
void processEmbeddedOLE (WPSPosition &pos, unsigned long lastPos)
 
bool processStaticOLE (librevenge::RVNGBinaryData &, std::string &mimetype, WPSPosition &pos, unsigned long lastPos)
 
bool readString (std::string &res, unsigned long lastPos)
 
void insertNote (bool annotation, uint32_t fcPos, librevenge::RVNGString const &label)
 
unsigned insertString (const unsigned char *str, unsigned size, libwps_tools_win::Font::Type type)
 
void getHeaderFooters (uint32_t first, MSWriteParserInternal::Section &sep, WPSPageSpan &pageSpan)
 
void startSection (MSWriteParserInternal::Section const &section)
 
bool checkFilePosition (uint32_t pos) const
 check if the file position is correct or not
 
- Protected Member Functions inherited from WPSParser
RVNGInputStreamPtrgetInput ()
 
RVNGInputStreamPtr getFileInput ()
 
WPSHeaderPtrgetHeader ()
 
int version () const
 
void setVersion (int vers)
 
libwps::DebugFileascii ()
 a DebugFile used to write what we recognize when we parse the document
 
NameMultiMapgetNameEntryMap ()
 
NameMultiMap constgetNameEntryMap () const
 
- Static Protected Member Functions inherited from MSWriteParser
static void getPageStyle (MSWriteParserInternal::Section &sep, WPSPageSpan &pageSpan)
 
- Protected Attributes inherited from MSWriteParser
uint32_t m_fileLength
 the last file position
 
uint32_t m_fcMac
 
std::vector< MSWriteParserInternal::Paragraphm_paragraphList
 
std::vector< MSWriteParserInternal::Fontm_fontList
 
std::vector< MSWriteParserInternal::Footnotem_footnotes
 
std::vector< MSWriteParserInternal::Sectionm_sections
 
std::vector< librevenge::RVNGString > m_fonts
 
libwps_tools_win::Font::Type m_fontType
 
std::shared_ptr< WPSContentListenerm_listener
 
librevenge::RVNGPropertyList m_metaData
 

Detailed Description

This class parses Microsoft Word for DOS.

Constructor & Destructor Documentation

◆ DosWordParser() [1/2]

DosWordParser::DosWordParser ( RVNGInputStreamPtr input,
WPSHeaderPtr header,
libwps_tools_win::Font::Type  encoding = libwps_tools_win::Font::UNKNOWN 
)

◆ ~DosWordParser()

DosWordParser::~DosWordParser ( )
final

◆ DosWordParser() [2/2]

DosWordParser::DosWordParser ( const DosWordParser )
privatedelete

Member Function Documentation

◆ checkHeader()

bool DosWordParser::checkHeader ( WPSHeader header,
bool  strict = false 
)

checks if the document header is correct (or not)

Referenced by libwps::WPSDocument::isFileFormatSupported().

◆ color()

WPSColor DosWordParser::color ( int  clr)
staticprivate

Referenced by readCHP(), and readPAP().

◆ getFileEncoding()

libwps_tools_win::Font::Type DosWordParser::getFileEncoding ( libwps_tools_win::Font::Type  hint)
finalprivatevirtual

Reimplemented from MSWriteParser.

Referenced by DosWordParser().

◆ insertControl()

void DosWordParser::insertControl ( uint8_t  val,
uint32_t  fc 
)
finalprivatevirtual

Reimplemented from MSWriteParser.

◆ insertSpecial()

void DosWordParser::insertSpecial ( uint8_t  val,
uint32_t  fc,
MSWriteParserInternal::Paragraph::Location  location 
)
finalprivatevirtual

Reimplemented from MSWriteParser.

◆ operator=()

DosWordParser & DosWordParser::operator= ( const DosWordParser )
privatedelete

◆ readCHP()

void DosWordParser::readCHP ( uint32_t  fcFirst,
uint32_t  fcLim,
unsigned  cch 
)
finalprivatevirtual

Reimplemented from MSWriteParser.

◆ readFFNTB()

void DosWordParser::readFFNTB ( )
finalprivatevirtual

Reimplemented from MSWriteParser.

◆ readFNTB()

void DosWordParser::readFNTB ( )
finalprivatevirtual

Reimplemented from MSWriteParser.

◆ readPAP()

void DosWordParser::readPAP ( uint32_t  fcFirst,
uint32_t  fcLim,
unsigned  cch 
)
finalprivatevirtual

Reimplemented from MSWriteParser.

◆ readSECT()

void DosWordParser::readSECT ( uint32_t  fcSep,
uint32_t  fcLim 
)
private

Referenced by readSED().

◆ readSED()

void DosWordParser::readSED ( )
finalprivatevirtual

Reimplemented from MSWriteParser.

◆ readSUMD()

void DosWordParser::readSUMD ( )
finalprivatevirtual

Reimplemented from MSWriteParser.


The documentation for this class was generated from the following files:

Generated on Sat May 6 2023 13:09:45 for libwps by doxygen 1.9.8