WPSHeader.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) 2002 William Lachance (william.lachance@sympatico.ca)
11  * Copyright (C) 2002-2003 Marc Maurer (uwog@uwog.net)
12  *
13  * For minor contributions see the git repository.
14  *
15  * Alternatively, the contents of this file may be used under the terms
16  * of the GNU Lesser General Public License Version 2.1 or later
17  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
18  * applicable instead of those above.
19  *
20  * For further information visit http://libwps.sourceforge.net
21  */
22 
23 #ifndef WPSHEADER_H
24 #define WPSHEADER_H
25 
26 #include "libwps_internal.h"
27 #include <librevenge-stream/librevenge-stream.h>
28 
29 #include "libwps/libwps.h"
30 
31 class WPSHeader
32 {
33 public:
35  ~WPSHeader();
36 
38 
40  {
41  return m_input;
42  }
43 
45  {
46  return m_fileInput;
47  }
48 
50  {
51  return m_creator;
52  }
53 
55  {
56  m_creator=creator;
57  }
58 
60  {
61  return m_kind;
62  }
63 
65  {
66  m_kind=kind;
67  }
68 
69  bool getIsEncrypted() const
70  {
71  return m_isEncrypted;
72  }
73 
74  void setIsEncrypted(bool isEncrypted)
75  {
76  m_isEncrypted=isEncrypted;
77  }
78 
79  bool getNeedEncoding() const
80  {
81  return m_needEncodingFlag;
82  }
83 
84  void setNeedEncoding(bool needEncoding)
85  {
86  m_needEncodingFlag=needEncoding;
87  }
88 
89  int getMajorVersion() const
90  {
91  return m_majorVersion;
92  }
93 
94  void setMajorVersion(int version)
95  {
96  m_majorVersion=version;
97  }
98 
99 private:
100  WPSHeader(const WPSHeader &) = delete;
101  WPSHeader &operator=(const WPSHeader &) = delete;
111 };
112 
113 #endif /* WPSHEADER_H */
114 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WPSHeader::getInput
RVNGInputStreamPtr & getInput()
Definition: WPSHeader.h:39
libwps::WPS_MULTIPLAN
@ WPS_MULTIPLAN
Definition: WPSDocument.h:58
WPSHeader::m_isEncrypted
bool m_isEncrypted
a flag to know if the file is encrypted
Definition: WPSHeader.h:108
libwps::WPS_DOSWORD
@ WPS_DOSWORD
Definition: WPSDocument.h:57
WPSHeader::setKind
void setKind(libwps::WPSKind kind)
Definition: WPSHeader.h:64
libwps
Definition: libwps_internal.cpp:39
WPSHeader::m_kind
libwps::WPSKind m_kind
Definition: WPSHeader.h:105
WPSHeader::getCreator
libwps::WPSCreator getCreator() const
Definition: WPSHeader.h:49
WPSHeader.h
libwps::WPS_MSWRITE
@ WPS_MSWRITE
Definition: WPSDocument.h:56
WPSHeader::m_input
RVNGInputStreamPtr m_input
Definition: WPSHeader.h:102
WPSHeader::getNeedEncoding
bool getNeedEncoding() const
Definition: WPSHeader.h:79
WPSHeader::setMajorVersion
void setMajorVersion(int version)
Definition: WPSHeader.h:94
WPSHeader::setCreator
void setCreator(libwps::WPSCreator creator)
Definition: WPSHeader.h:54
libwps::WPS_DATABASE
@ WPS_DATABASE
Definition: WPSDocument.h:60
WPSHeader::setNeedEncoding
void setNeedEncoding(bool needEncoding)
Definition: WPSHeader.h:84
libwps::WPSCreator
WPSCreator
Definition: WPSDocument.h:48
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
WPSHeader
Definition: WPSHeader.h:32
WPSHeader::setIsEncrypted
void setIsEncrypted(bool isEncrypted)
Definition: WPSHeader.h:74
WPSHeader::m_needEncodingFlag
bool m_needEncodingFlag
a flag to know if we need to have the character set encoding
Definition: WPSHeader.h:110
libwps::WPSKind
WPSKind
Definition: WPSDocument.h:60
libwps.h
libwps::WPS_SPREADSHEET
@ WPS_SPREADSHEET
Definition: WPSDocument.h:60
WPSHeader::m_creator
libwps::WPSCreator m_creator
Definition: WPSHeader.h:106
libwps::WPS_QUATTRO_PRO
@ WPS_QUATTRO_PRO
Quattro Pro wq1,wq2, wb1,wb2,wb3, qpw spreadsheets and qpw spreadsheet.
Definition: WPSDocument.h:50
WPSHeader::operator=
WPSHeader & operator=(const WPSHeader &)=delete
libwps::readU8
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:40
WPSHeader::getMajorVersion
int getMajorVersion() const
Definition: WPSHeader.h:89
libwps::readU16
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition: libwps_internal.cpp:64
WPSHeader::m_majorVersion
int m_majorVersion
Definition: WPSHeader.h:104
libwps::WPS_LOTUS
@ WPS_LOTUS
Lotus DOS(wk1), Apple(Lotus 123 v1), Windows(wk3,wk4,123) spreadsheets.
Definition: WPSDocument.h:49
RVNGInputStreamPtr
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
WPSHeader::getFileInput
RVNGInputStreamPtr & getFileInput()
Definition: WPSHeader.h:44
WPSHeader::constructHeader
static WPSHeader * constructHeader(RVNGInputStreamPtr &input)
So far, we have identified three categories of Works documents.
Definition: WPSHeader.cpp:55
WPSHeader::m_fileInput
RVNGInputStreamPtr m_fileInput
Definition: WPSHeader.h:103
libwps_internal.h
libwps::WPS_MSWORKS
@ WPS_MSWORKS
Microsoft Works documents (all wps, wks and wdb)
Definition: WPSDocument.h:48
WPSHeader::WPSHeader
WPSHeader(RVNGInputStreamPtr &input, RVNGInputStreamPtr &fileInput, int majorVersion, libwps::WPSKind kind=libwps::WPS_TEXT, libwps::WPSCreator creator=libwps::WPS_MSWORKS)
Definition: WPSHeader.cpp:31
libwps::WPS_TEXT
@ WPS_TEXT
Definition: WPSDocument.h:60
WPSHeader::~WPSHeader
~WPSHeader()
Definition: WPSHeader.cpp:42
WPSHeader::getKind
libwps::WPSKind getKind() const
Definition: WPSHeader.h:59
WPSHeader::getIsEncrypted
bool getIsEncrypted() const
Definition: WPSHeader.h:69
WPSHeader::WPSHeader
WPSHeader(const WPSHeader &)=delete

Generated on Sun Dec 8 2024 14:11:32 for libwps by doxygen 1.8.20