/src/libwpd/src/lib/WP5AttributeGroup.cpp
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ |
2 | | /* libwpd |
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) 2003 William Lachance (wrlach@gmail.com) |
11 | | * Copyright (C) 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://libwpd.sourceforge.net |
21 | | */ |
22 | | |
23 | | /* "This product is not manufactured, approved, or supported by |
24 | | * Corel Corporation or Corel Corporation Limited." |
25 | | */ |
26 | | |
27 | | #include "WP5AttributeGroup.h" |
28 | | #include "libwpd_internal.h" |
29 | | |
30 | | WP5AttributeGroup::WP5AttributeGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption, unsigned char groupID) : |
31 | 19.2k | WP5FixedLengthGroup(groupID), |
32 | 19.2k | m_attribute(0) |
33 | 19.2k | { |
34 | 19.2k | _read(input, encryption); |
35 | 19.2k | } |
36 | | |
37 | | void WP5AttributeGroup::_readContents(librevenge::RVNGInputStream *input, WPXEncryption *encryption) |
38 | 19.2k | { |
39 | 19.2k | m_attribute = readU8(input, encryption); |
40 | 19.2k | } |
41 | | |
42 | | WP5AttributeOnGroup::WP5AttributeOnGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption, unsigned char groupID) |
43 | 14.3k | : WP5AttributeGroup(input, encryption, groupID) |
44 | 14.3k | { |
45 | 14.3k | } |
46 | | |
47 | | void WP5AttributeOnGroup::parse(WP5Listener *listener) |
48 | 14.3k | { |
49 | 14.3k | listener->attributeChange(true, getAttribute()); |
50 | 14.3k | } |
51 | | |
52 | | WP5AttributeOffGroup::WP5AttributeOffGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption, unsigned char groupID) |
53 | 4.87k | : WP5AttributeGroup(input, encryption, groupID) |
54 | 4.87k | { |
55 | 4.87k | } |
56 | | |
57 | | void WP5AttributeOffGroup::parse(WP5Listener *listener) |
58 | 4.87k | { |
59 | 4.87k | listener->attributeChange(false, getAttribute()); |
60 | 4.87k | } |
61 | | /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ |