/src/libwpd/src/lib/WP6HighlightGroup.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) 2002 William Lachance (wrlach@gmail.com) |
11 | | * Copyright (C) 2002 Marc Maurer (uwog@uwog.net) |
12 | | * Copyright (C) 2004 Fridrich Strba (fridrich.strba@bluewin.ch) |
13 | | * |
14 | | * For minor contributions see the git repository. |
15 | | * |
16 | | * Alternatively, the contents of this file may be used under the terms |
17 | | * of the GNU Lesser General Public License Version 2.1 or later |
18 | | * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are |
19 | | * applicable instead of those above. |
20 | | * |
21 | | * For further information visit http://libwpd.sourceforge.net |
22 | | */ |
23 | | |
24 | | /* "This product is not manufactured, approved, or supported by |
25 | | * Corel Corporation or Corel Corporation Limited." |
26 | | */ |
27 | | |
28 | | #include "WP6HighlightGroup.h" |
29 | | #include "WP6Listener.h" |
30 | | #include "libwpd_internal.h" |
31 | | |
32 | | WP6HighlightGroup::WP6HighlightGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption, unsigned char groupID) : |
33 | 3.23k | WP6FixedLengthGroup(groupID), |
34 | 3.23k | m_color() |
35 | 3.23k | { |
36 | 3.23k | _read(input, encryption); |
37 | 3.23k | } |
38 | | |
39 | | void WP6HighlightGroup::_readContents(librevenge::RVNGInputStream *input, WPXEncryption *encryption) |
40 | 3.23k | { |
41 | 3.23k | m_color.m_r = readU8(input, encryption); |
42 | 3.23k | m_color.m_g = readU8(input, encryption); |
43 | 3.23k | m_color.m_b = readU8(input, encryption); |
44 | 3.23k | m_color.m_s = readU8(input, encryption); |
45 | 3.23k | } |
46 | | |
47 | | WP6HighlightOnGroup::WP6HighlightOnGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption, unsigned char groupID) : |
48 | 2.23k | WP6HighlightGroup(input, encryption, groupID) |
49 | 2.23k | { |
50 | 2.23k | } |
51 | | |
52 | | void WP6HighlightOnGroup::parse(WP6Listener *listener) |
53 | 2.23k | { |
54 | 2.23k | listener->highlightChange(true, getColor()); |
55 | 2.23k | } |
56 | | |
57 | | WP6HighlightOffGroup::WP6HighlightOffGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption, unsigned char groupID) : |
58 | 998 | WP6HighlightGroup(input, encryption, groupID) |
59 | 998 | { |
60 | 998 | } |
61 | | |
62 | | void WP6HighlightOffGroup::parse(WP6Listener *listener) |
63 | 998 | { |
64 | 998 | listener->highlightChange(false, getColor()); |
65 | 998 | } |
66 | | /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ |