Bump version to 6.4-15
[LibreOffice.git] / sc / inc / types.hxx
blob5c68c606d0fea45bdfa7236db569776a4e6f08b9
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #ifndef INCLUDED_SC_INC_TYPES_HXX
11 #define INCLUDED_SC_INC_TYPES_HXX
13 #include <sal/types.h>
15 #include <boost/intrusive_ptr.hpp>
16 #include <o3tl/typed_flags_set.hxx>
18 class ScMatrix;
20 // The typedefs
21 typedef sal_Int32 SCROW;
22 typedef sal_Int16 SCCOL;
23 typedef sal_Int16 SCTAB;
24 typedef sal_Int32 SCCOLROW; ///< a type capable of holding either SCCOL or SCROW
26 typedef ::boost::intrusive_ptr<ScMatrix> ScMatrixRef;
27 typedef ::boost::intrusive_ptr<const ScMatrix> ScConstMatrixRef;
29 namespace formula { class FormulaToken; }
30 typedef ::boost::intrusive_ptr<formula::FormulaToken> ScTokenRef;
32 enum class ScMatValType : sal_uInt8 {
33 Value = 0x00,
34 Boolean = 0x01,
35 String = 0x02,
36 Empty = String | 0x04, // STRING plus flag
37 EmptyPath = Empty | 0x08, // EMPTY plus flag
38 NonvalueMask = EmptyPath // mask of all non-value bits
40 namespace o3tl{
41 template<> struct typed_flags<ScMatValType> : o3tl::is_typed_flags<ScMatValType, 0x0f> {};
44 struct ScFormulaCellGroup;
45 typedef ::boost::intrusive_ptr<ScFormulaCellGroup> ScFormulaCellGroupRef;
47 /**
48 * When vectorization is enabled, we could potentially mass-calculate a
49 * series of formula token arrays in adjacent formula cells in one step,
50 * provided that they all contain identical set of tokens.
52 enum ScFormulaVectorState
54 FormulaVectorDisabled,
55 FormulaVectorDisabledNotInSubSet,
56 FormulaVectorDisabledByOpCode,
57 FormulaVectorDisabledByStackVariable,
59 FormulaVectorEnabled,
60 FormulaVectorCheckReference,
61 FormulaVectorUnknown
64 namespace sc {
66 enum class MatrixEdge{
67 Nothing = 0,
68 Inside = 1,
69 Bottom = 2,
70 Left = 4,
71 Top = 8,
72 Right = 16,
73 Open = 32
74 }; // typed_flags, template outside of sc namespace
76 enum GroupCalcState
78 GroupCalcDisabled = 0,
79 GroupCalcEnabled,
80 GroupCalcRunning,
83 struct RangeMatrix
85 ScMatrixRef mpMat;
86 sal_Int32 mnCol1;
87 sal_Int32 mnRow1;
88 sal_Int32 mnTab1;
89 sal_Int32 mnCol2;
90 sal_Int32 mnRow2;
91 sal_Int32 mnTab2;
93 RangeMatrix();
95 bool isRangeValid() const;
98 struct MultiDataCellState
100 enum StateType : sal_uInt8 { Invalid = 0, Empty, HasOneCell, HasMultipleCells };
102 SCROW mnRow1; //< first non-empty row
103 SCCOL mnCol1; //< first non-empty column
104 StateType meState;
106 MultiDataCellState();
107 MultiDataCellState( StateType eState );
110 enum class AreaOverlapType
112 Inside,
113 InsideOrOverlap,
114 OneRowInside,
115 OneColumnInside
118 enum class ListenerGroupType
120 Group,
121 Both
124 enum StartListeningType
126 ConvertToGroupListening,
127 SingleCellListening,
128 NoListening
133 namespace o3tl{
134 template<> struct typed_flags<sc::MatrixEdge> : o3tl::is_typed_flags<sc::MatrixEdge, 63> {};
137 #endif
139 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */