MSWrite.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 MS_WRITE_H
23 #define MS_WRITE_H
24 
25 #include <vector>
26 
27 #include <librevenge-stream/librevenge-stream.h>
28 #include "libwps_internal.h"
29 #include "libwps_tools_win.h"
30 
31 #include "WPSParser.h"
32 #include "WPSEntry.h"
33 #include "WPSFont.h"
34 #include "WPSPageSpan.h"
35 #include "WPSParagraph.h"
36 
37 namespace MSWriteParserInternal
38 {
39 class SubDocument;
40 
41 struct Paragraph final : public WPSParagraph
42 {
45  : WPSParagraph()
46  , m_fcFirst(0)
47  , m_fcLim(0)
48  , m_Location(MAIN)
49  , m_graphics(false)
50  , m_firstpage(false)
51  , m_skiptab(false)
52  , m_headerUseMargin(false)
53  , m_interLine(0.0)
55  Paragraph(Paragraph const &)=default;
56  ~Paragraph() final;
57  uint32_t m_fcFirst, m_fcLim;
60  double m_interLine;
61  WPSPageSpan::HeaderFooterOccurrence m_HeaderFooterOccurrence;
62 };
63 
64 struct Font final : public WPSFont
65 {
66  Font()
67  : WPSFont()
68  , m_fcFirst(0)
69  , m_fcLim(0)
70  , m_special(false)
71  , m_footnote(false)
72  , m_annotation(false)
73  , m_encoding(libwps_tools_win::Font::UNKNOWN) { }
74  Font(Font const &)=default;
75  ~Font() final;
76  uint32_t m_fcFirst, m_fcLim;
77  bool m_special, m_footnote, m_annotation;
78  libwps_tools_win::Font::Type m_encoding;
79 };
80 
81 struct Footnote
82 {
84  : m_fcFtn(0)
85  , m_fcRef(0) { }
86  uint32_t m_fcFtn, m_fcRef;
87 };
88 
89 struct Section
90 {
93  : m_fcLim(0)
94  , m_bkc(1)
95  , m_yaMac(11)
96  , m_xaMac(8.5)
97  , m_yaTop(1)
98  , m_dyaText(9)
99  , m_xaLeft(1.25)
100  , m_dxaText(6)
101  , m_startPageNumber(0xffff)
102  , m_yaHeader(0.75)
103  , m_yaFooter(10.25) /* 11-0.75inch*/
104  , m_endFtns(false)
105  , m_columns(1)
106  , m_dxaColumns(0.5)
107  , m_dxaGutter(0.0)
108  , m_Main() { }
109  uint32_t m_fcLim;
110  unsigned m_bkc;
111  double m_yaMac, m_xaMac;
112  double m_yaTop;
113  double m_dyaText;
114  double m_xaLeft;
115  double m_dxaText;
117  double m_yaHeader;
118  double m_yaFooter;
119  bool m_endFtns;
120  unsigned m_columns;
121  double m_dxaColumns, m_dxaGutter;
123 };
124 
125 }
126 
131 class MSWriteParser : public WPSParser
132 {
136 
137 public:
140 
141 
142  ~MSWriteParser() override;
143  void parse(librevenge::RVNGTextInterface *documentInterface) override;
144 
145 private:
146  MSWriteParser(const MSWriteParser &) = delete;
148 
149  std::shared_ptr<WPSContentListener> createListener(librevenge::RVNGTextInterface *interface);
150 protected:
151  void readStructures();
152  virtual libwps_tools_win::Font::Type getFileEncoding(libwps_tools_win::Font::Type hint);
153  void readFIB();
154  virtual void readFFNTB();
155  void readFOD(unsigned page, void (MSWriteParser::*parseFOD)(uint32_t fcFirst, uint32_t fcLim, unsigned size));
156  virtual void readPAP(uint32_t fcFirst, uint32_t fcLim, unsigned cch);
157  virtual void readCHP(uint32_t fcFirst, uint32_t fcLim, unsigned cch);
158  virtual void readSUMD();
159  virtual void readFNTB();
160  virtual void readSED();
161  void readText(WPSEntry const &e, MSWriteParserInternal::Paragraph::Location location);
162  int numPages();
163  void processObject(WPSPosition &pos, unsigned long lastPos);
164  bool processDDB(librevenge::RVNGBinaryData &bmpdata, WPSPosition &pos, unsigned width, unsigned height, unsigned byte_width, unsigned planes, unsigned bits_pixel, unsigned size);
165  bool processDIB(librevenge::RVNGBinaryData &bmpdata, unsigned size);
166  bool processWMF(librevenge::RVNGBinaryData &wmfdata, unsigned size);
167  void processEmbeddedOLE(WPSPosition &pos, unsigned long lastPos);
168  bool processStaticOLE(librevenge::RVNGBinaryData &, std::string &mimetype, WPSPosition &pos, unsigned long lastPos);
169  bool readString(std::string &res, unsigned long lastPos);
170  virtual void insertSpecial(uint8_t val, uint32_t fc, MSWriteParserInternal::Paragraph::Location location);
171  virtual void insertControl(uint8_t val, uint32_t fc);
172  void insertNote(bool annotation, uint32_t fcPos, librevenge::RVNGString &label);
173  unsigned insertString(const unsigned char *str, unsigned size, libwps_tools_win::Font::Type type);
174  static void getPageStyle(MSWriteParserInternal::Section &sep, WPSPageSpan &pageSpan);
175  void getHeaderFooters(uint32_t first, MSWriteParserInternal::Section &sep, WPSPageSpan &pageSpan);
176  void startSection(MSWriteParserInternal::Section &section);
177 
179  bool checkFilePosition(uint32_t pos) const
180  {
181  return pos<=m_fileLength;
182  }
183  // State
185  uint32_t m_fileLength;
186  uint32_t m_fcMac;
187 
188  std::vector<MSWriteParserInternal::Paragraph> m_paragraphList;
189  std::vector<MSWriteParserInternal::Font> m_fontList;
190  std::vector<MSWriteParserInternal::Footnote> m_footnotes;
191  std::vector<MSWriteParserInternal::Section> m_sections;
192  std::vector<librevenge::RVNGString> m_fonts;
194 
195  std::shared_ptr<WPSContentListener> m_listener; /* the listener (if set)*/
196 
197  librevenge::RVNGPropertyList m_metaData;
198 };
199 
200 #endif /* MS_WRITE_H */
201 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
MSWriteParserInternal::HEADER_W_PNPARA
@ HEADER_W_PNPARA
Definition: MSWrite.cpp:193
MSWriteParserInternal::HEADER_W_PNFFNTB
@ HEADER_W_PNFFNTB
Definition: MSWrite.cpp:198
WPSTextSubDocument.h
WPSPosition::XLeft
@ XLeft
Definition: WPSPosition.h:47
MSWriteParserInternal::Section::m_yaTop
double m_yaTop
Definition: MSWrite.h:112
MSWriteParserInternal
Definition: MSWrite.cpp:39
MSWriteParserInternal::BM_INFO_V2_SIZE
@ BM_INFO_V2_SIZE
Definition: MSWrite.cpp:261
WPSParagraph.h
MSWriteParserInternal::BitmapPalette::m_g
uint8_t m_g
Definition: MSWrite.cpp:271
WPS_LE_PUT_GUINT16
#define WPS_LE_PUT_GUINT16(p, v)
Definition: libwps_internal.h:232
MSWriteParserInternal::Section::m_bkc
unsigned m_bkc
Definition: MSWrite.h:110
MSWriteParserInternal::Paragraph::Paragraph
Paragraph(Paragraph const &)=default
WPSField
a field
Definition: libwps_internal.h:463
WPSParagraph::m_justify
libwps::Justification m_justify
the justification
Definition: WPSParagraph.h:116
MSWriteParserInternal::PAP::m_reserved3
uint8_t m_reserved3[5]
Definition: MSWrite.cpp:152
MSWriteParserInternal::SubDocument
Internal: the subdocument of a MSWriteParser.
Definition: MSWrite.cpp:49
MSWriteParser::processEmbeddedOLE
void processEmbeddedOLE(WPSPosition &pos, unsigned long lastPos)
Definition: MSWrite.cpp:1580
MSWriteParserInternal::PAP::m_dyaAfter
uint16_t m_dyaAfter
Definition: MSWrite.cpp:150
MSWriteParser::m_fileLength
uint32_t m_fileLength
the last file position
Definition: MSWrite.h:185
MSWriteParser::processObject
void processObject(WPSPosition &pos, unsigned long lastPos)
Definition: MSWrite.cpp:1186
MSWriteParserInternal::Section::m_startPageNumber
uint16_t m_startPageNumber
Definition: MSWrite.h:116
MSWriteParserInternal::Section::m_xaLeft
double m_xaLeft
Definition: MSWrite.h:114
WPSField::PageNumber
@ PageNumber
Definition: libwps_internal.h:465
MSWriteParserInternal::HEADER_W_PNSEP
@ HEADER_W_PNSEP
Definition: MSWrite.cpp:195
MSWriteParserInternal::PIC_W_MX
@ PIC_W_MX
Definition: MSWrite.cpp:217
WPS_BOLD_BIT
#define WPS_BOLD_BIT
Definition: libwps_internal.h:506
MSWriteParser::processWMF
bool processWMF(librevenge::RVNGBinaryData &wmfdata, unsigned size)
Definition: MSWrite.cpp:1660
MSWriteParserInternal::SubDocument::parse
void parse(std::shared_ptr< WPSContentListener > &listener, libwps::SubDocumentType subDocumentType) final
the parser function
Definition: MSWrite.cpp:76
WPSPageSpan::setPageSpan
void setPageSpan(const int pageSpan)
Definition: WPSPageSpan.h:166
MSWriteParser::readString
bool readString(std::string &res, unsigned long lastPos)
Definition: MSWrite.cpp:1145
MSWriteParserInternal::Font
Definition: MSWrite.h:65
WPSPosition::XCenter
@ XCenter
Definition: WPSPosition.h:47
WPSEntry::end
long end() const
returns the end offset
Definition: WPSEntry.h:78
MSWriteParserInternal::PIC_W_BMWIDTHBYTES
@ PIC_W_BMWIDTHBYTES
Definition: MSWrite.cpp:213
MSWriteParserInternal::Paragraph::m_interLine
double m_interLine
Definition: MSWrite.h:60
MSWriteParserInternal::PIC_W_MY
@ PIC_W_MY
Definition: MSWrite.cpp:218
MSWriteParserInternal::PIC_W_YEXT
@ PIC_W_YEXT
Definition: MSWrite.cpp:207
MSWriteParserInternal::HeaderOffset
HeaderOffset
Definition: MSWrite.cpp:188
MSWriteParserInternal::Paragraph::m_graphics
bool m_graphics
Definition: MSWrite.h:59
WPSParagraph::m_margins
double m_margins[3]
the margins
Definition: WPSParagraph.h:101
libwps_tools_win::Font::Type
Type
enum Type
Definition: libwps_tools_win.h:46
MSWriteParserInternal::Section::m_fcLim
uint32_t m_fcLim
Definition: MSWrite.h:109
MSWriteParser::readCHP
virtual void readCHP(uint32_t fcFirst, uint32_t fcLim, unsigned cch)
Definition: MSWrite.cpp:711
WPS_LE_GET_GUINT16
#define WPS_LE_GET_GUINT16(p)
Definition: libwps_internal.h:223
MSWriteParserInternal::Font::m_special
bool m_special
Definition: MSWrite.h:77
MSWriteParserInternal::HEADER_W_WTOOL
@ HEADER_W_WTOOL
Definition: MSWrite.cpp:191
WPS_SUBSCRIPT_BIT
#define WPS_SUBSCRIPT_BIT
Definition: libwps_internal.h:500
MSWriteParserInternal::Paragraph::m_fcFirst
uint32_t m_fcFirst
Definition: MSWrite.h:57
MSWriteParserInternal::BM_INFO_V2_HEIGHT
@ BM_INFO_V2_HEIGHT
Definition: MSWrite.cpp:263
MSWriteParserInternal::HEADER_W_PNFNTB
@ HEADER_W_PNFNTB
Definition: MSWrite.cpp:194
MSWriteParser::processStaticOLE
bool processStaticOLE(librevenge::RVNGBinaryData &, std::string &mimetype, WPSPosition &pos, unsigned long lastPos)
Definition: MSWrite.cpp:1523
MSWriteParserInternal::CHP::CHP
CHP()
Definition: MSWrite.cpp:169
MSWriteParserInternal::Section::m_endFtns
bool m_endFtns
Definition: MSWrite.h:119
WPS_UNDERLINE_BIT
#define WPS_UNDERLINE_BIT
Definition: libwps_internal.h:508
MSWriteParser::MSWriteParser
MSWriteParser(RVNGInputStreamPtr &input, WPSHeaderPtr &header, libwps_tools_win::Font::Type encoding=libwps_tools_win::Font::WIN3_WEUROPE)
Definition: MSWrite.cpp:290
MSWriteParserInternal::BM_INFO_V3_HORZ_RES
@ BM_INFO_V3_HORZ_RES
Definition: MSWrite.cpp:243
MSWriteParserInternal::appendU16
static void appendU16(librevenge::RVNGBinaryData &b, uint16_t val)
Definition: MSWrite.cpp:274
MSWriteParser::readPAP
virtual void readPAP(uint32_t fcFirst, uint32_t fcLim, unsigned cch)
Definition: MSWrite.cpp:612
MSWriteParser::m_fontList
std::vector< MSWriteParserInternal::Font > m_fontList
Definition: MSWrite.h:189
WPSContentListenerPtr
std::shared_ptr< WPSContentListener > WPSContentListenerPtr
shared pointer to WPSContentListener
Definition: libwps_internal.h:107
MSWriteParserInternal::Section::m_dxaGutter
double m_dxaGutter
Definition: MSWrite.h:121
MSWriteParserInternal::BM_FILE_SIZE
@ BM_FILE_SIZE
Definition: MSWrite.cpp:253
MSWriteParserInternal::Section::m_yaFooter
double m_yaFooter
Definition: MSWrite.h:118
MSWriteParserInternal::Section::m_Main
WPSEntry m_Main
Definition: MSWrite.h:122
MSWriteParserInternal::Paragraph::~Paragraph
~Paragraph() final
Definition: MSWrite.cpp:44
MSWriteParserInternal::BM_INFO_V3_COLORS_USED
@ BM_INFO_V3_COLORS_USED
Definition: MSWrite.cpp:245
WPSPageSpan::NEVER
@ NEVER
Definition: WPSPageSpan.h:44
WPSParagraph::AtLeast
@ AtLeast
Definition: WPSParagraph.h:61
WPS_SUPERSCRIPT_BIT
#define WPS_SUPERSCRIPT_BIT
Definition: libwps_internal.h:499
WPSTextSubDocument::m_parser
WPSParser * m_parser
Definition: WPSTextSubDocument.h:62
MSWriteParserInternal::SubDocument::SubDocument
SubDocument(RVNGInputStreamPtr const &input, MSWriteParser &pars, WPSEntry const &entry, Paragraph::Location location)
constructor for a text entry
Definition: MSWrite.cpp:52
WPSPageSpan::getMarginLeft
double getMarginLeft() const
Definition: WPSPageSpan.h:71
MSWriteParserInternal::BM_FILE_MAGIC
@ BM_FILE_MAGIC
Definition: MSWrite.cpp:252
MSWriteParserInternal::PIC_W_DXASIZE
@ PIC_W_DXASIZE
Definition: MSWrite.cpp:209
MSWriteParserInternal::SubDocument::operator==
bool operator==(std::shared_ptr< WPSSubDocument > const &doc) const final
operator==
Definition: MSWrite.cpp:60
MSWriteParserInternal::PAP::m_dyaBefore
uint16_t m_dyaBefore
Definition: MSWrite.cpp:150
MSWriteParser::m_listener
std::shared_ptr< WPSContentListener > m_listener
Definition: MSWrite.h:195
MSWriteParser::checkFilePosition
bool checkFilePosition(uint32_t pos) const
check if the file position is correct or not
Definition: MSWrite.h:179
WPSPageSpan::setMarginRight
void setMarginRight(const double marginRight)
Definition: WPSPageSpan.h:134
MSWriteParserInternal::Paragraph::m_fcLim
uint32_t m_fcLim
Definition: MSWrite.h:57
libwps_tools_win::Font::unicodeString
static librevenge::RVNGString unicodeString(const unsigned char *p, unsigned long size, Type type, bool skipUnknown=true)
converts a list of character in unicode
Definition: libwps_tools_win.cpp:7283
WPSPageSpan::ALL
@ ALL
Definition: WPSPageSpan.h:44
libwps::JustificationFullAllLines
@ JustificationFullAllLines
Definition: libwps_internal.h:250
MSWriteParserInternal::PIC_W_XEXT
@ PIC_W_XEXT
Definition: MSWrite.cpp:206
MSWriteParser::readText
void readText(WPSEntry const &e, MSWriteParserInternal::Paragraph::Location location)
Definition: MSWrite.cpp:931
MSWriteParserInternal::OLE_W_OBJECTTYPE
@ OLE_W_OBJECTTYPE
Definition: MSWrite.cpp:225
MSWriteParser::m_metaData
librevenge::RVNGPropertyList m_metaData
Definition: MSWrite.h:197
WPSContentListener
Definition: WPSContentListener.h:45
WPSFont
define the font properties
Definition: WPSFont.h:37
MSWriteParser::startSection
void startSection(MSWriteParserInternal::Section &section)
Definition: MSWrite.cpp:1754
WPSEntry::valid
bool valid(bool checkId=false) const
returns true if the zone length is positive
Definition: WPSEntry.h:89
WPS_ITALICS_BIT
#define WPS_ITALICS_BIT
Definition: libwps_internal.h:502
WPSTabStop
Definition: WPSParagraph.h:38
MSWriteParserInternal::SubDocument::m_Location
Paragraph::Location m_Location
Definition: MSWrite.cpp:73
MSWriteParserInternal::Paragraph::m_skiptab
bool m_skiptab
Definition: MSWrite.h:59
MSWriteParserInternal::PAP
Definition: MSWrite.cpp:130
WPSPageSpan::HEADER
@ HEADER
Definition: WPSPageSpan.h:43
MSWriteParserInternal::BM_INFO_V3_COLORS_IMPORTANT
@ BM_INFO_V3_COLORS_IMPORTANT
Definition: MSWrite.cpp:246
MSWriteParserInternal::PAP::m_reserved2
uint8_t m_reserved2[2]
Definition: MSWrite.cpp:148
WPSPageSpan::FOOTER
@ FOOTER
Definition: WPSPageSpan.h:43
WPSEntry
basic class to store an entry in a file This contained :
Definition: WPSEntry.h:39
MSWriteParserInternal::OLE_W_MY
@ OLE_W_MY
Definition: MSWrite.cpp:231
WPSParser
Definition: WPSParser.h:36
MSWriteParserInternal::Section::m_yaHeader
double m_yaHeader
Definition: MSWrite.h:117
MSWriteParserInternal::BitmapPalette
Definition: MSWrite.cpp:270
MSWriteParserInternal::Paragraph::m_HeaderFooterOccurrence
WPSPageSpan::HeaderFooterOccurrence m_HeaderFooterOccurrence
Definition: MSWrite.h:61
WPS_PAGE_BREAK
#define WPS_PAGE_BREAK
Definition: libwps_internal.h:519
MSWriteParserInternal::CHP::m_ftcXtra
uint8_t m_ftcXtra
Definition: MSWrite.cpp:182
MSWriteParserInternal::BitmapPalette::m_r
uint8_t m_r
Definition: MSWrite.cpp:271
MSWriteParserInternal::SubDocument::~SubDocument
~SubDocument() final
destructor
Definition: MSWrite.cpp:57
WPSParagraph::setInterline
void setInterline(double value, librevenge::RVNGUnit unit, LineSpacingType type=Fixed)
set the interline
Definition: WPSParagraph.h:87
WPSPageSpan.h
MSWriteParserInternal::Section::m_yaMac
double m_yaMac
Definition: MSWrite.h:111
MSWriteParser
This class parses Microsoft Write 3.0 and 3.1.
Definition: MSWrite.h:132
MSWriteParser::processDDB
bool processDDB(librevenge::RVNGBinaryData &bmpdata, WPSPosition &pos, unsigned width, unsigned height, unsigned byte_width, unsigned planes, unsigned bits_pixel, unsigned size)
Definition: MSWrite.cpp:1295
MSWriteParser::processDIB
bool processDIB(librevenge::RVNGBinaryData &bmpdata, unsigned size)
Definition: MSWrite.cpp:1480
MSWriteParserInternal::BM_INFO_V3_SIZE
@ BM_INFO_V3_SIZE
Definition: MSWrite.cpp:236
MSWriteParser::m_fonts
std::vector< librevenge::RVNGString > m_fonts
Definition: MSWrite.h:192
MSWriteParserInternal::Section::m_columns
unsigned m_columns
Definition: MSWrite.h:120
MSWriteParserInternal::PIC_B_BMBITSPIXEL
@ PIC_B_BMBITSPIXEL
Definition: MSWrite.cpp:215
Vec2f
Vec2< float > Vec2f
Vec2 of float.
Definition: libwps_internal.h:704
MSWriteParserInternal::Footnote::Footnote
Footnote()
Definition: MSWrite.h:83
WPSPosition::setUnit
void setUnit(librevenge::RVNGUnit unt)
sets the dimension unit
Definition: WPSPosition.h:202
MSWriteParserInternal::PIC_W_BMHEIGHT
@ PIC_W_BMHEIGHT
Definition: MSWrite.cpp:212
WPSPosition::setRelativePosition
void setRelativePosition(AnchorTo anchor, XPos X=XLeft, YPos Y=YTop)
sets the relative position
Definition: WPSPosition.h:214
MSWriteParserInternal::HEADER_W_DTY
@ HEADER_W_DTY
Definition: MSWrite.cpp:190
MSWriteParserInternal::Section::m_dxaColumns
double m_dxaColumns
Definition: MSWrite.h:121
MSWriteParserInternal::BM_INFO_V3_COMPRESSION
@ BM_INFO_V3_COMPRESSION
Definition: MSWrite.cpp:241
WPSTabStop::LEFT
@ LEFT
Definition: WPSParagraph.h:39
MSWriteParserInternal::Section::Section
Section()
constructor
Definition: MSWrite.h:92
MSWriteParserInternal::PAP::m_dyaLine
uint16_t m_dyaLine
Definition: MSWrite.cpp:149
MSWriteParserInternal::BitmapFileHeaderOffset
BitmapFileHeaderOffset
Definition: MSWrite.cpp:251
libwps::ParseException
Definition: libwps_internal.h:152
Vec2< float >
MSWriteParser::readFFNTB
virtual void readFFNTB()
Definition: MSWrite.cpp:354
MSWriteParserInternal::Font::Font
Font()
Definition: MSWrite.h:66
MSWriteParserInternal::Font::m_fcFirst
uint32_t m_fcFirst
Definition: MSWrite.h:76
WPSPosition::size
Vec2f const & size() const
returns the frame size
Definition: WPSPosition.h:123
MSWriteParserInternal::PicOffset
PicOffset
Definition: MSWrite.cpp:204
MSWriteParserInternal::Font::m_fcLim
uint32_t m_fcLim
Definition: MSWrite.h:76
WPS_DEBUG_MSG
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
libwps::readU32
uint32_t readU32(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:76
MSWriteParserInternal::BM_FILE_STRUCT_SIZE
@ BM_FILE_STRUCT_SIZE
Definition: MSWrite.cpp:256
WPSPosition::XPos
XPos
an enum used to define the relative X position
Definition: WPSPosition.h:47
WPSParagraph
class to store the paragraph properties
Definition: WPSParagraph.h:58
WPSEntry::setBegin
void setBegin(long off)
sets the begin offset
Definition: WPSEntry.h:57
MSWriteParserInternal::CHP::m_fBold
uint8_t m_fBold
Definition: MSWrite.cpp:179
WPSContentListener.h
MSWriteParserInternal::CHP
Definition: MSWrite.cpp:168
MSWriteParserInternal::PIC_D_CBSIZE
@ PIC_D_CBSIZE
Definition: MSWrite.cpp:216
MSWriteParserInternal::Paragraph
Definition: MSWrite.h:42
MSWriteParserInternal::BitmapInfoHeaderV2Offset
BitmapInfoHeaderV2Offset
Definition: MSWrite.cpp:260
MSWriteParserInternal::appendU32
static void appendU32(librevenge::RVNGBinaryData &b, uint32_t val)
Definition: MSWrite.cpp:280
MSWriteParserInternal::Section::m_dyaText
double m_dyaText
Definition: MSWrite.h:113
MSWriteParserInternal::PAP::TBD::m_chAlign
uint8_t m_chAlign
Definition: MSWrite.cpp:163
MSWriteParserInternal::PIC_W_DXAOFFSET
@ PIC_W_DXAOFFSET
Definition: MSWrite.cpp:208
MSWriteParserInternal::BM_INFO_V3_BITMAP_SIZE
@ BM_INFO_V3_BITMAP_SIZE
Definition: MSWrite.cpp:242
WPSTabStop::DECIMAL
@ DECIMAL
Definition: WPSParagraph.h:39
libwps_tools_win::Font::UNKNOWN
@ UNKNOWN
Definition: libwps_tools_win.h:63
WPSPageSpan::setFormWidth
void setFormWidth(const double formWidth)
Definition: WPSPageSpan.h:122
libwps::SubDocumentType
SubDocumentType
Definition: libwps_internal.h:248
WPSEntry::setType
void setType(std::string const &tp)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: WPSEntry.h:126
WPSFont.h
MSWriteParserInternal::CHP::m_reserved1
uint8_t m_reserved1
Definition: MSWrite.cpp:178
MSWriteParserInternal::PAP::m_dxaLeft1
uint16_t m_dxaLeft1
Definition: MSWrite.cpp:149
MSWriteParserInternal::BM_INFO_V2_PLANES
@ BM_INFO_V2_PLANES
Definition: MSWrite.cpp:264
WPSEntry.h
WPSFont::m_attributes
uint32_t m_attributes
the font attributes defined as a set of bits
Definition: WPSFont.h:87
MSWriteParserInternal::PAP::PAP
PAP()
constructor
Definition: MSWrite.cpp:132
MSWriteParserInternal::CHP::m_fUline
uint8_t m_fUline
Definition: MSWrite.cpp:181
MSWriteParserInternal::Paragraph::HEADER
@ HEADER
Definition: MSWrite.h:43
MSWriteParser::m_fcMac
uint32_t m_fcMac
Definition: MSWrite.h:186
WPSParser::getInput
RVNGInputStreamPtr & getInput()
Definition: WPSParser.h:47
MSWriteParser::parse
void parse(librevenge::RVNGTextInterface *documentInterface) override
Definition: MSWrite.cpp:1764
libwps::DOC_HEADER_FOOTER
@ DOC_HEADER_FOOTER
Definition: libwps_internal.h:248
MSWriteParser::readStructures
void readStructures()
Definition: MSWrite.cpp:1689
MSWriteParserInternal::BitmapInfoHeaderV3Offset
BitmapInfoHeaderV3Offset
Definition: MSWrite.cpp:235
WPSEntry::begin
long begin() const
returns the begin offset
Definition: WPSEntry.h:73
MSWriteParser::m_paragraphList
std::vector< MSWriteParserInternal::Paragraph > m_paragraphList
Definition: MSWrite.h:188
MSWriteParserInternal::PAP::TBD::m_dxa
uint16_t m_dxa
Definition: MSWrite.cpp:161
MSWriteParser::m_footnotes
std::vector< MSWriteParserInternal::Footnote > m_footnotes
Definition: MSWrite.h:190
WPSEntry::type
std::string const & type() const
returns the type of the entry
Definition: WPSEntry.h:131
WPSFont::m_size
double m_size
font size
Definition: WPSFont.h:85
MSWriteParserInternal::Section::m_xaMac
double m_xaMac
Definition: MSWrite.h:111
MSWriteParserInternal::OLE_W_MM
@ OLE_W_MM
Definition: MSWrite.cpp:224
WPSEmbeddedObject::add
void add(librevenge::RVNGBinaryData const &binaryData, std::string const &type="image/pict")
add a picture
Definition: libwps_internal.h:1105
MSWriteParserInternal::PAP::m_dxaLeft
uint16_t m_dxaLeft
Definition: MSWrite.cpp:149
WPSSubDocumentPtr
std::shared_ptr< WPSSubDocument > WPSSubDocumentPtr
shared pointer to WPSSubDocument
Definition: libwps_internal.h:111
WPSEmbeddedObject
small class use to define a embedded object
Definition: libwps_internal.h:1077
MSWriteParserInternal::OleOffset
OleOffset
Definition: MSWrite.cpp:223
MSWriteParser::insertString
unsigned insertString(const unsigned char *str, unsigned size, libwps_tools_win::Font::Type type)
Definition: MSWrite.cpp:1134
MSWriteParserInternal::BM_FILE_RESERVED
@ BM_FILE_RESERVED
Definition: MSWrite.cpp:254
MSWriteParserInternal::Paragraph::m_firstpage
bool m_firstpage
Definition: MSWrite.h:59
WPSPageSpan::setMarginTop
void setMarginTop(const double marginTop)
Definition: WPSPageSpan.h:138
MSWriteParserInternal::PIC_W_DYASIZE
@ PIC_W_DYASIZE
Definition: MSWrite.cpp:210
WPSHeaderPtr
std::shared_ptr< WPSHeader > WPSHeaderPtr
shared pointer to WPSHeader
Definition: libwps_internal.h:109
WPSPosition::ParagraphContent
@ ParagraphContent
Definition: WPSPosition.h:43
MSWriteParserInternal::HEADER_W_WIDENT
@ HEADER_W_WIDENT
Definition: MSWrite.cpp:189
MSWriteParser::getPageStyle
static void getPageStyle(MSWriteParserInternal::Section &sep, WPSPageSpan &pageSpan)
Definition: MSWrite.cpp:510
MSWriteParser::readFOD
void readFOD(unsigned page, void(MSWriteParser::*parseFOD)(uint32_t fcFirst, uint32_t fcLim, unsigned size))
Definition: MSWrite.cpp:557
MSWriteParserInternal::BM_INFO_V3_VERT_RES
@ BM_INFO_V3_VERT_RES
Definition: MSWrite.cpp:244
WPSEntry::isParsed
bool isParsed() const
a flag to know if the entry was parsed or not
Definition: WPSEntry.h:115
MSWriteParserInternal::OLE_W_DXASIZE
@ OLE_W_DXASIZE
Definition: MSWrite.cpp:227
MSWriteParserInternal::Font::~Font
~Font() final
Definition: MSWrite.cpp:40
libwps::readU8
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
MSWriteParserInternal::Paragraph::MAIN
@ MAIN
Definition: MSWrite.h:43
MSWriteParser::insertControl
virtual void insertControl(uint8_t val, uint32_t fc)
Definition: MSWrite.cpp:1107
MSWriteParser::m_sections
std::vector< MSWriteParserInternal::Section > m_sections
Definition: MSWrite.h:191
MSWriteParser::getFileEncoding
virtual libwps_tools_win::Font::Type getFileEncoding(libwps_tools_win::Font::Type hint)
Definition: MSWrite.cpp:320
MSWriteParser::~MSWriteParser
~MSWriteParser() override
Definition: MSWrite.cpp:316
WPSPosition::XRight
@ XRight
Definition: WPSPosition.h:47
WPSPageSpan::setMarginBottom
void setMarginBottom(const double marginBottom)
Definition: WPSPageSpan.h:142
WPSPageSpan::setPageNumber
void setPageNumber(const int pageNumber)
Definition: WPSPageSpan.h:150
MSWriteParserInternal::Footnote
Definition: MSWrite.h:82
MSWriteParserInternal::Font::m_encoding
libwps_tools_win::Font::Type m_encoding
Definition: MSWrite.h:78
MSWriteParserInternal::PIC_W_MM
@ PIC_W_MM
Definition: MSWrite.cpp:205
WPSPageSpan::getPageSpan
int getPageSpan() const
Definition: WPSPageSpan.h:107
MSWriteParserInternal::BM_INFO_V3_STRUCT_SIZE
@ BM_INFO_V3_STRUCT_SIZE
Definition: MSWrite.cpp:247
libwps_tools_win.h
WPSParser.h
MSWriteParser::readFNTB
virtual void readFNTB()
Definition: MSWrite.cpp:1684
MSWriteParser::MSWriteParser
MSWriteParser(const MSWriteParser &)=delete
MSWriteParserInternal::BitmapPalette::m_b
uint8_t m_b
Definition: MSWrite.cpp:271
WPSPageSpan
Definition: WPSPageSpan.h:39
WPSPageSpan::setHeaderFooter
void setHeaderFooter(const HeaderFooterType type, const HeaderFooterOccurrence occurrence, WPSSubDocumentPtr &subDocument)
Definition: WPSPageSpan.cpp:111
MSWriteParserInternal::Paragraph::m_Location
Location m_Location
Definition: MSWrite.h:58
WPSEntry::setEnd
void setEnd(long e)
sets the end offset
Definition: WPSEntry.h:67
MSWriteParserInternal::Paragraph::Paragraph
Paragraph()
Definition: MSWrite.h:44
libwps::readU16
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
MSWriteParserInternal::HEADER_W_PNMAC
@ HEADER_W_PNMAC
Definition: MSWrite.cpp:199
MSWriteParserInternal::PAP::m_justification
uint8_t m_justification
Definition: MSWrite.cpp:147
MSWriteParserInternal::Paragraph::FOOTNOTE
@ FOOTNOTE
Definition: MSWrite.h:43
MSWriteParserInternal::PAP::m_TBD
struct MSWriteParserInternal::PAP::TBD m_TBD[14]
MSWriteParserInternal::HEADER_W_PNSETB
@ HEADER_W_PNSETB
Definition: MSWrite.cpp:196
MSWriteParserInternal::HEADER_D_FCMAC
@ HEADER_D_FCMAC
Definition: MSWrite.cpp:192
MSWriteParser::createListener
std::shared_ptr< WPSContentListener > createListener(librevenge::RVNGTextInterface *interface)
Definition: MSWrite.cpp:906
WPSPosition.h
MSWriteParserInternal::CHP::m_hps
uint8_t m_hps
Definition: MSWrite.cpp:180
MSWriteParser::readSUMD
virtual void readSUMD()
Definition: MSWrite.cpp:1679
RVNGInputStreamPtr
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
WPSPageSpan::getMarginRight
double getMarginRight() const
Definition: WPSPageSpan.h:75
MSWriteParser::readFIB
void readFIB()
Definition: MSWrite.cpp:328
WPSTextSubDocument
Basic class used to store a sub document.
Definition: WPSTextSubDocument.h:36
MSWriteParserInternal::BM_INFO_V3_WIDTH
@ BM_INFO_V3_WIDTH
Definition: MSWrite.cpp:237
WPSPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: WPSPosition.h:40
WPSSubDocument::m_input
RVNGInputStreamPtr m_input
Definition: WPSSubDocument.h:65
MSWriteParserInternal::Paragraph::m_headerUseMargin
bool m_headerUseMargin
Definition: MSWrite.h:59
MSWriteParserInternal::BM_INFO_V2_WIDTH
@ BM_INFO_V2_WIDTH
Definition: MSWrite.cpp:262
MSWriteParser::getHeaderFooters
void getHeaderFooters(uint32_t first, MSWriteParserInternal::Section &sep, WPSPageSpan &pageSpan)
Definition: MSWrite.cpp:767
MSWriteParser::insertNote
void insertNote(bool annotation, uint32_t fcPos, librevenge::RVNGString &label)
Definition: MSWrite.cpp:1717
MSWriteParserInternal::BM_INFO_V3_PLANES
@ BM_INFO_V3_PLANES
Definition: MSWrite.cpp:239
MSWriteParserInternal::Section::m_dxaText
double m_dxaText
Definition: MSWrite.h:115
WPSPageSpan::HeaderFooterOccurrence
HeaderFooterOccurrence
Definition: WPSPageSpan.h:44
libwps_tools_win::Font::WIN3_WEUROPE
@ WIN3_WEUROPE
Definition: libwps_tools_win.h:52
MSWriteParserInternal::PIC_W_BMWIDTH
@ PIC_W_BMWIDTH
Definition: MSWrite.cpp:211
WPS_LE_GET_GUINT32
#define WPS_LE_GET_GUINT32(p)
Definition: libwps_internal.h:226
MSWriteParserInternal::Footnote::m_fcRef
uint32_t m_fcRef
Definition: MSWrite.h:86
MSWriteParserInternal::PAP::m_reserved1
uint8_t m_reserved1
Definition: MSWrite.cpp:146
libwps::JustificationFull
@ JustificationFull
Definition: libwps_internal.h:249
libwps_internal.h
libwps::JustificationLeft
@ JustificationLeft
Definition: libwps_internal.h:249
MSWriteParser::insertSpecial
virtual void insertSpecial(uint8_t val, uint32_t fc, MSWriteParserInternal::Paragraph::Location location)
Definition: MSWrite.cpp:1101
MSWriteParser::numPages
int numPages()
MSWriteParserInternal::BM_FILE_OFFSET
@ BM_FILE_OFFSET
Definition: MSWrite.cpp:255
libwps_tools_win::Font::getFontType
static Type getFontType(librevenge::RVNGString &name)
returns the type of the font using the fontName
Definition: libwps_tools_win.cpp:39
WPSEntry::setParsed
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: WPSEntry.h:120
MSWriteParser::operator=
MSWriteParser & operator=(const MSWriteParser &)=delete
MSWriteParserInternal::PAP::m_dxaRight
uint16_t m_dxaRight
Definition: MSWrite.cpp:149
MSWriteParserInternal::OLE_D_DWDATASIZE
@ OLE_D_DWDATASIZE
Definition: MSWrite.cpp:229
MSWriteParserInternal::Font::Font
Font(Font const &)=default
libwps_tools_win
some Windows© classes and tools
Definition: libwps_tools_win.cpp:32
libwps::JustificationCenter
@ JustificationCenter
Definition: libwps_internal.h:249
MSWriteParserInternal::BM_INFO_V3_BITS_PIXEL
@ BM_INFO_V3_BITS_PIXEL
Definition: MSWrite.cpp:240
WPSPageSpan::setMarginLeft
void setMarginLeft(const double marginLeft)
Definition: WPSPageSpan.h:130
WPSPosition::setSize
void setSize(Vec2f const &sz)
sets the frame size
Definition: WPSPosition.h:192
MSWriteParserInternal::HEADER_W_PNBFTB
@ HEADER_W_PNBFTB
Definition: MSWrite.cpp:197
MSWriteParserInternal::PAP::TBD::m_jcTab
uint8_t m_jcTab
Definition: MSWrite.cpp:162
MSWriteParserInternal::Paragraph::FOOTER
@ FOOTER
Definition: MSWrite.h:43
libwps::JustificationRight
@ JustificationRight
Definition: libwps_internal.h:250
MSWriteParserInternal::OLE_W_DYASIZE
@ OLE_W_DYASIZE
Definition: MSWrite.cpp:228
MSWriteParserInternal::OLE_W_MX
@ OLE_W_MX
Definition: MSWrite.cpp:230
MSWrite.h
MSWriteParserInternal::BM_INFO_V3_HEIGHT
@ BM_INFO_V3_HEIGHT
Definition: MSWrite.cpp:238
MSWriteParserInternal::BM_INFO_V2_STRUCT_SIZE
@ BM_INFO_V2_STRUCT_SIZE
Definition: MSWrite.cpp:266
MSWriteParserInternal::PAP::TBD::TBD
TBD()
Definition: MSWrite.cpp:155
WPSPageSpan::setFormLength
void setFormLength(const double formLength)
Definition: WPSPageSpan.h:118
WPSPageSpan::FIRST
@ FIRST
Definition: WPSPageSpan.h:44
MSWriteParserInternal::Section
Definition: MSWrite.h:90
MSWriteParserInternal::OLE_W_DXAOFFSET
@ OLE_W_DXAOFFSET
Definition: MSWrite.cpp:226
MSWriteParser::m_fontType
libwps_tools_win::Font::Type m_fontType
Definition: MSWrite.h:193
WPSParagraph::m_tabs
std::vector< WPSTabStop > m_tabs
the tabulations
Definition: WPSParagraph.h:113
MSWriteParserInternal::PIC_B_BMPLANES
@ PIC_B_BMPLANES
Definition: MSWrite.cpp:214
WPSFont::m_name
librevenge::RVNGString m_name
font name
Definition: WPSFont.h:83
WPSContentListener::FOOTNOTE
@ FOOTNOTE
Definition: WPSContentListener.h:99
WPSPosition::setOrigin
void setOrigin(Vec2f const &orig)
sets the frame origin
Definition: WPSPosition.h:187
MSWriteParserInternal::BM_INFO_V2_BITS_PIXEL
@ BM_INFO_V2_BITS_PIXEL
Definition: MSWrite.cpp:265
MSWriteParserInternal::PAP::TBD
Definition: MSWrite.cpp:154
MSWriteParserInternal::Paragraph::Location
Location
Definition: MSWrite.h:43
MSWriteParser::readSED
virtual void readSED()
Definition: MSWrite.cpp:452
MSWriteParserInternal::SubDocument::m_entry
WPSEntry m_entry
the entry
Definition: MSWrite.cpp:72
MSWriteParserInternal::CHP::m_hpsPos
uint8_t m_hpsPos
Definition: MSWrite.cpp:183
MSWriteParserInternal::PAP::m_rhcPage
uint8_t m_rhcPage
Definition: MSWrite.cpp:151

Generated on Tue Jul 28 2020 00:00:00 for libwps by doxygen 1.8.18