Coverage Report

Created: 2025-12-31 10:39

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/sc/source/ui/inc/SheetViewOperationsTester.hxx
Line
Count
Source
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
 * This file is part of the LibreOffice 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 <string_view>
11
12
#pragma once
13
14
class ScViewData;
15
16
namespace sc
17
{
18
/** Operations that can be performed on a sheet. */
19
enum class Operation
20
{
21
    Unknown,
22
    DeleteContent,
23
    DeleteCell,
24
    TransliterateText,
25
    SetNormalString,
26
    SetNoteText,
27
    ReplaceNoteText,
28
    InsertColumnsBefore,
29
    InsertColumnsAfter,
30
    InsertRowsBefore,
31
    InsertRowsAfter,
32
    InsertCellsDown,
33
    InsertCellsRight,
34
    DeleteColumns,
35
    DeleteRows,
36
    DeleteCellsLeft,
37
    DeleteCellsUp,
38
    MoveBlock,
39
    ClearItems,
40
    ChangeIndent,
41
    AutoFormat,
42
    EnterMatrix,
43
    TabOperation,
44
    FillSimple,
45
    FillSeries,
46
    FillAuto,
47
    MergeCells,
48
    InsertNameList,
49
    ConvertFormulaToValue,
50
    Sort,
51
    Query,
52
    SubTotals,
53
    PivotTableUpdate,
54
    PivotTableRemove,
55
    PivotTableCreate,
56
    SparklineInsert,
57
    SparklineDelete,
58
    SparklineChange,
59
    SparklineGroup,
60
    SparklineUngroup,
61
    SparklineGroupDelete,
62
    SparklineGroupChange,
63
    EnterData,
64
};
65
66
/** Tester for operations on sheet views and default views
67
 *
68
 * Tests if an operation can be performed in a sheet view or the operation on the default view unsyncs the sheet view(s).
69
 */
70
class SheetViewOperationsTester
71
{
72
    ScViewData* mpViewData;
73
74
public:
75
    SheetViewOperationsTester(ScViewData* pViewData)
76
698
        : mpViewData(pViewData)
77
698
    {
78
698
    }
79
80
    bool check(Operation eOperation) const;
81
};
82
}
83
84
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */