Coverage Report

Created: 2026-07-20 07:04

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libwps/src/lib/WPSSubDocument.cpp
Line
Count
Source
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2
/* libwps
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, 2007 Andrew Ziem
11
 * Copyright (C) 2005 Fridrich Strba (fridrich.strba@bluewin.ch)
12
 * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca)
13
 * Copyright (C) 2003 Marc Maurer (uwog@uwog.net)
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://libwps.sourceforge.net
23
 */
24
25
#include "WPSSubDocument.h"
26
27
WPSSubDocument::WPSSubDocument(RVNGInputStreamPtr const &input, int i)
28
336k
  : m_input(input)
29
336k
  , m_id(i)
30
336k
{
31
336k
}
32
33
WPSSubDocument::~WPSSubDocument()
34
336k
{
35
336k
}
36
37
bool WPSSubDocument::operator==(std::shared_ptr<WPSSubDocument> const &doc) const
38
4.88M
{
39
4.88M
  if (!doc) return false;
40
4.88M
  if (doc.get() == this) return true;
41
4.88M
  if (m_input.get() != doc.get()->m_input.get()) return false;
42
4.88M
  if (m_id != doc.get()->m_id) return false;
43
4.88M
  return true;
44
4.88M
}
45
46
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
47