Coverage Report

Created: 2026-07-20 07:04

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libwpd/src/lib/WP5ExtendedCharacterGroup.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
 * Copyright (C) 2002 Ariya Hidayat <ariyahidayat@yahoo.de>
13
 * Copyright (C) 2004 Fridrich Strba (fridrich.strba@bluewin.ch)
14
 *
15
 * For minor contributions see the git repository.
16
 *
17
 * Alternatively, the contents of this file may be used under the terms
18
 * of the GNU Lesser General Public License Version 2.1 or later
19
 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
20
 * applicable instead of those above.
21
 *
22
 * For further information visit http://libwpd.sourceforge.net
23
 */
24
25
/* "This product is not manufactured, approved, or supported by
26
 * Corel Corporation or Corel Corporation Limited."
27
 */
28
29
#include "WP5ExtendedCharacterGroup.h"
30
#include "WP5FileStructure.h"
31
#include "libwpd_internal.h"
32
#include "WP5Listener.h"
33
34
WP5ExtendedCharacterGroup::WP5ExtendedCharacterGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption, unsigned char groupID) :
35
0
  WP5FixedLengthGroup(groupID),
36
0
  m_character(0),
37
0
  m_characterSet(0)
38
0
{
39
0
  _read(input, encryption);
40
0
}
41
42
void WP5ExtendedCharacterGroup::_readContents(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
43
0
{
44
0
  m_character = readU8(input, encryption);
45
0
  m_characterSet = readU8(input, encryption);
46
0
}
47
48
void WP5ExtendedCharacterGroup::parse(WP5Listener *listener)
49
0
{
50
0
  const unsigned *chars;
51
0
  int len = extendedCharacterWP5ToUCS4(m_character,
52
0
                                       m_characterSet, &chars);
53
0
  for (int i = 0; i < len; i++)
54
0
    listener->insertCharacter(chars[i]);
55
0
}
56
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */