Coverage Report

Created: 2026-07-20 07:04

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libwpg/src/lib/WPGXParser.h
Line
Count
Source
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2
/* libwpg
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) 2006 Ariya Hidayat (ariya@kde.org)
11
 * Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl)
12
 * Copyright (C) 2005 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://libwpg.sourceforge.net
22
 */
23
24
/* "This product is not manufactured, approved, or supported by
25
 * Corel Corporation or Corel Corporation Limited."
26
 */
27
28
#ifndef __WPGXPARSER_H__
29
#define __WPGXPARSER_H__
30
31
#include <map>
32
33
#include <librevenge/librevenge.h>
34
35
#include <librevenge-stream/librevenge-stream.h>
36
37
#include "WPGColor.h"
38
39
class WPGXParser
40
{
41
public:
42
  WPGXParser(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter);
43
  WPGXParser(const WPGXParser &parser);
44
0
  virtual ~WPGXParser() {}
45
  virtual bool parse() = 0;
46
47
  unsigned char readU8();
48
  unsigned short readU16();
49
  unsigned int readU32();
50
  short readS16();
51
  int readS32();
52
  unsigned int readVariableLengthInteger();
53
  WPGXParser &operator=(const WPGXParser &parser);
54
55
protected:
56
  librevenge::RVNGInputStream *m_input;
57
  librevenge::RVNGDrawingInterface *m_painter;
58
  std::map<int,libwpg::WPGColor> m_colorPalette;
59
};
60
61
#endif // __WPGXPARSER_H__
62
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */