Branch data TLA Line data Source code
1 : : #pragma once
2 : :
3 : : #include <cstddef>
4 : :
5 : : #include <xlnt/styles/conditional_format.hpp>
6 : : #include <xlnt/utils/optional.hpp>
7 : : #include <xlnt/worksheet/range_reference.hpp>
8 : :
9 : : namespace xlnt {
10 : :
11 : : class border;
12 : : class fill;
13 : : class font;
14 : :
15 : : namespace detail {
16 : :
17 : : struct stylesheet;
18 : : struct worksheet_impl;
19 : :
20 : : struct conditional_format_impl
21 : : {
22 : : stylesheet *parent = nullptr;
23 : : worksheet_impl *target_sheet = nullptr;
24 : :
25 :UBC 0 : bool operator==(const conditional_format_impl& rhs) const
26 : : {
27 : : // not comparing parent or target sheet
28 : 0 : return target_range == rhs.target_range
29 [ # # ]: 0 : && priority == rhs.priority
30 [ # # ]: 0 : && differential_format_id == rhs.differential_format_id
31 [ # # ]: 0 : && when == rhs.when
32 [ # # ]: 0 : && border_id == rhs.border_id
33 [ # # ]: 0 : && fill_id == rhs.fill_id
34 [ # # # # ]: 0 : && font_id == rhs.font_id;
35 : : }
36 : :
37 : : bool operator!=(const conditional_format_impl& rhs) const
38 : : {
39 : : return !(*this == rhs);
40 : : }
41 : :
42 : : range_reference target_range;
43 : :
44 : : std::size_t priority = 0;
45 : : std::size_t differential_format_id = 0;
46 : :
47 : : condition when;
48 : :
49 : : optional<std::size_t> border_id;
50 : : optional<std::size_t> fill_id;
51 : : optional<std::size_t> font_id;
52 : : };
53 : :
54 : : } // namespace detail
55 : : } // namespace xlnt
|