Coverage Report

Created: 2026-04-29 07:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libwpd/src/lib/WP5IndentGroup.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) 2007 Fridrich Strba (fridrich.strba@bluewin.ch)
11
 * Copyright (C) 2007 Novell, Inc. (http://www.novell.com)
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 "WP5IndentGroup.h"
28
#include "WP5FileStructure.h"
29
#include "libwpd_internal.h"
30
#include "WP5Listener.h"
31
#include "WPXFileStructure.h"
32
33
WP5IndentGroup::WP5IndentGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption, unsigned char groupID) :
34
16.4k
  WP5FixedLengthGroup(groupID),
35
16.4k
  m_indentType(0),
36
16.4k
  m_indentPosition(0.0)
37
16.4k
{
38
16.4k
  _read(input, encryption);
39
16.4k
}
40
41
void WP5IndentGroup::_readContents(librevenge::RVNGInputStream *input, WPXEncryption *encryption)
42
16.4k
{
43
16.4k
  m_indentType = readU8(input, encryption);
44
16.4k
  input->seek(4, librevenge::RVNG_SEEK_CUR);
45
16.4k
  unsigned short tmpIndentWPU = readU16(input, encryption);
46
16.4k
  m_indentPosition = (double)tmpIndentWPU/(double)WPX_NUM_WPUS_PER_INCH;
47
16.4k
}
48
49
void WP5IndentGroup::parse(WP5Listener *listener)
50
16.4k
{
51
16.4k
  listener->insertIndent(m_indentType, m_indentPosition);
52
16.4k
}
53
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */