Coverage Report

Created: 2026-04-29 07:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libetonyek/src/lib/contexts/IWORKCalcEngineContext.cpp
Line
Count
Source
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/*
3
 * This file is part of the libetonyek project.
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
10
#include "IWORKCalcEngineContext.h"
11
12
#include <cassert>
13
14
#include <boost/optional.hpp>
15
16
#include "IWORKCollector.h"
17
#include "IWORKDictionary.h"
18
#include "IWORKTabularModelElement.h"
19
#include "IWORKToken.h"
20
#include "IWORKXMLParserState.h"
21
22
namespace libetonyek
23
{
24
25
namespace
26
{
27
class CalcEngineEntities : public IWORKXMLElementContextBase
28
{
29
public:
30
  explicit CalcEngineEntities(IWORKXMLParserState &state);
31
32
protected:
33
  IWORKXMLContextPtr_t element(int name) override;
34
};
35
36
CalcEngineEntities::CalcEngineEntities(IWORKXMLParserState &state)
37
0
  : IWORKXMLElementContextBase(state)
38
0
{
39
0
}
40
41
IWORKXMLContextPtr_t CalcEngineEntities::element(const int name)
42
0
{
43
0
  switch (name)
44
0
  {
45
0
  case IWORKToken::tabular_model | IWORKToken::NS_URI_SF :
46
0
    return std::make_shared<IWORKTabularModelElement>(getState(), true);
47
0
  default:
48
0
    break;
49
0
  }
50
0
  ETONYEK_DEBUG_MSG(("CalcEngineEntities::element: found unexpected element\n"));
51
0
  return IWORKXMLContextPtr_t();
52
0
}
53
54
}
55
56
IWORKCalcEngineContext::IWORKCalcEngineContext(IWORKXMLParserState &state)
57
0
  : IWORKXMLElementContextBase(state)
58
0
{
59
0
}
60
61
IWORKXMLContextPtr_t IWORKCalcEngineContext::element(const int name)
62
0
{
63
0
  switch (name)
64
0
  {
65
0
  case IWORKToken::calc_engine_entities | IWORKToken::NS_URI_SF :
66
0
    return std::make_shared<CalcEngineEntities>(getState());
67
0
  default:
68
0
    break;
69
0
  }
70
0
  ETONYEK_DEBUG_MSG(("IWORKCalcEngineContext::element: found unexpected element\n"));
71
0
  return IWORKXMLContextPtr_t();
72
0
}
73
74
}
75
76
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */