differential code coverage report with master
Current view: top level - include/xlnt/worksheet - print_options.hpp (source / functions) Coverage Total Hit UBC CBC
Current: coverage.info Lines: 100.0 % 6 6 6
Current Date: 2025-12-07 02:01:22 Functions: 100.0 % 1 1 1
Baseline: coverage_master.info Branches: 50.0 % 10 5 10 10
Baseline Date: 2025-12-07 02:01:21

             Branch data    TLA  Line data    Source code
       1                 :                : // Copyright (c) 2014-2022 Thomas Fussell
       2                 :                : // Copyright (c) 2024-2025 xlnt-community
       3                 :                : //
       4                 :                : // Permission is hereby granted, free of charge, to any person obtaining a copy
       5                 :                : // of this software and associated documentation files (the "Software"), to deal
       6                 :                : // in the Software without restriction, including without limitation the rights
       7                 :                : // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
       8                 :                : // copies of the Software, and to permit persons to whom the Software is
       9                 :                : // furnished to do so, subject to the following conditions:
      10                 :                : //
      11                 :                : // The above copyright notice and this permission notice shall be included in
      12                 :                : // all copies or substantial portions of the Software.
      13                 :                : //
      14                 :                : // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
      15                 :                : // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
      16                 :                : // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
      17                 :                : // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
      18                 :                : // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
      19                 :                : // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
      20                 :                : // THE SOFTWARE
      21                 :                : //
      22                 :                : // @license: http://www.opensource.org/licenses/mit-license.php
      23                 :                : // @author: see AUTHORS file
      24                 :                : 
      25                 :                : #pragma once
      26                 :                : 
      27                 :                : #include <xlnt/xlnt_config.hpp>
      28                 :                : #include <xlnt/utils/optional.hpp>
      29                 :                : 
      30                 :                : namespace xlnt {
      31                 :                : 
      32                 :                : struct XLNT_API print_options
      33                 :                : {
      34                 :                :     /// <summary>
      35                 :                :     /// if both grid_lines_set and this are true, grid lines are printed
      36                 :                :     /// </summary>
      37                 :                :     optional<bool> print_grid_lines;
      38                 :                : 
      39                 :                :     /// <summary>
      40                 :                :     /// if both print grid lines and this are true, grid lines are printed
      41                 :                :     /// </summary>
      42                 :                :     optional<bool> grid_lines_set;
      43                 :                : 
      44                 :                :     /// <summary>
      45                 :                :     /// print row and column headings
      46                 :                :     /// </summary>
      47                 :                :     optional<bool> print_headings;
      48                 :                : 
      49                 :                :     /// <summary>
      50                 :                :     /// center on page horizontally
      51                 :                :     /// </summary>
      52                 :                :     optional<bool> horizontal_centered;
      53                 :                : 
      54                 :                :     /// <summary>
      55                 :                :     /// center on page vertically
      56                 :                :     /// </summary>
      57                 :                :     optional<bool> vertical_centered;
      58                 :                : };
      59                 :                : 
      60                 :CBC           6 : inline bool operator==(const print_options &lhs, const print_options &rhs)
      61                 :                : {
      62                 :              6 :     return lhs.grid_lines_set == rhs.grid_lines_set
      63         [ +  - ]:              6 :         && lhs.horizontal_centered == rhs.horizontal_centered
      64         [ +  - ]:              6 :         && lhs.print_grid_lines == rhs.print_grid_lines
      65         [ +  - ]:              6 :         && lhs.print_headings == rhs.print_headings
      66   [ +  -  +  - ]:             12 :         && lhs.vertical_centered == rhs.vertical_centered;
      67                 :                : }
      68                 :                : 
      69                 :                : inline bool operator!=(const print_options &lhs, const print_options &rhs)
      70                 :                : {
      71                 :                :     return !(lhs == rhs);
      72                 :                : }
      73                 :                : } // namespace xlnt
        

Generated by: LCOV version 2.3.1-beta