Coverage Report

Created: 2026-03-12 06:42

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libwpd/src/lib/WP6FootnoteEndnoteGroup.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
 *
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 "WP6FootnoteEndnoteGroup.h"
28
#include "WP6FileStructure.h"
29
#include "WP6Listener.h"
30
#include "libwpd_internal.h"
31
32
WP6FootnoteEndnoteGroup::WP6FootnoteEndnoteGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption) :
33
16.5k
  WP6VariableLengthGroup()
34
16.5k
{
35
16.5k
  _read(input, encryption);
36
16.5k
}
37
38
void WP6FootnoteEndnoteGroup::_readContents(librevenge::RVNGInputStream * /* input */, WPXEncryption * /* encryption */)
39
16.4k
{
40
16.4k
}
41
42
void WP6FootnoteEndnoteGroup::parse(WP6Listener *listener)
43
16.4k
{
44
16.4k
  WPD_DEBUG_MSG(("WordPerfect: handling a footnote/endnote group\n"));
45
46
16.4k
  switch (getSubGroup())
47
16.4k
  {
48
6.70k
  case WP6_FOOTNOTE_ENDNOTE_GROUP_FOOTNOTE_ON:
49
8.04k
  case WP6_FOOTNOTE_ENDNOTE_GROUP_ENDNOTE_ON:
50
8.04k
    if (getNumPrefixIDs() < 1)
51
15
      throw ParseException();
52
8.02k
    listener->noteOn(getPrefixIDs()[0]);
53
8.02k
    break;
54
3.49k
  case WP6_FOOTNOTE_ENDNOTE_GROUP_FOOTNOTE_OFF:
55
3.49k
    listener->noteOff(FOOTNOTE);
56
3.49k
    break;
57
4.68k
  case WP6_FOOTNOTE_ENDNOTE_GROUP_ENDNOTE_OFF:
58
4.68k
    listener->noteOff(ENDNOTE);
59
4.68k
    break;
60
255
  default:
61
255
    break;
62
16.4k
  }
63
16.4k
}
64
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */