Debian Codegraph @

src/lib/WPSHeader.h

raw symbols SCIP
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 ([email protected])
11 * Copyright (C) 2002-2003 Marc Maurer ([email protected])
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:
34 WPSHeader(RVNGInputStreamPtr &input, RVNGInputStreamPtr &fileInput, int majorVersion, libwps::WPSKind kind=libwps::WPS_TEXT, libwps::WPSCreator creator=libwps::WPS_MSWORKS);
35 ~WPSHeader();
36
37 static WPSHeader *constructHeader(RVNGInputStreamPtr &input);
38
39 RVNGInputStreamPtr &getInput()
40 {
41 return m_input;
42 }
43
44 RVNGInputStreamPtr &getFileInput()
45 {
46 return m_fileInput;
47 }
48
49 libwps::WPSCreator getCreator() const
50 {
51 return m_creator;
52 }
53
54 void setCreator(libwps::WPSCreator creator)
55 {
56 m_creator=creator;
57 }
58
59 libwps::WPSKind getKind() const
60 {
61 return m_kind;
62 }
63
64 void setKind(libwps::WPSKind kind)
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;
102 RVNGInputStreamPtr m_input;
103 RVNGInputStreamPtr m_fileInput;
104 int m_majorVersion;
105 libwps::WPSKind m_kind;
106 libwps::WPSCreator m_creator;
107 //! a flag to know if the file is encrypted
108 bool m_isEncrypted;
109 //! a flag to know if we need to have the character set encoding
110 bool m_needEncodingFlag;
111 };
112
113 #endif /* WPSHEADER_H */
114 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */