LibreOffice Module sc (master)  1
types.hxx
Go to the documentation of this file.
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 #ifndef INCLUDED_SC_INC_TYPES_HXX
11 #define INCLUDED_SC_INC_TYPES_HXX
12 
13 #include <sal/types.h>
14 
15 #include <boost/intrusive_ptr.hpp>
16 #include <o3tl/typed_flags_set.hxx>
17 
18 class ScMatrix;
19 
20 // The typedefs
21 typedef sal_Int32 SCROW;
22 typedef sal_Int16 SCCOL;
23 typedef sal_Int16 SCTAB;
24 typedef sal_Int32 SCCOLROW;
25 
26 typedef ::boost::intrusive_ptr<ScMatrix> ScMatrixRef;
27 typedef ::boost::intrusive_ptr<const ScMatrix> ScConstMatrixRef;
28 
29 namespace formula { class FormulaToken; }
30 typedef ::boost::intrusive_ptr<formula::FormulaToken> ScTokenRef;
31 
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
39 };
40 namespace o3tl{
41  template<> struct typed_flags<ScMatValType> : o3tl::is_typed_flags<ScMatValType, 0x0f> {};
42 }
43 
45 typedef ::boost::intrusive_ptr<ScFormulaCellGroup> ScFormulaCellGroupRef;
46 
53 {
58 
62 };
63 
64 namespace sc {
65 
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
75 
77 {
81 };
82 
84 {
86  sal_Int32 mnCol1;
87  sal_Int32 mnRow1;
88  sal_Int32 mnTab1;
89  sal_Int32 mnCol2;
90  sal_Int32 mnRow2;
91  sal_Int32 mnTab2;
92 
93  RangeMatrix();
94 
95  bool isRangeValid() const;
96 };
97 
99 {
101 
102  SCROW mnRow1; //< first non-empty row
103  SCCOL mnCol1; //< first non-empty column
105 
107  MultiDataCellState( StateType eState );
108 };
109 
110 enum class AreaOverlapType
111 {
112  Inside,
114  OneRowInside,
116 };
117 
119 {
120  Group,
121  Both
122 };
123 
125 {
129 };
130 
131 }
132 
133 namespace o3tl{
134  template<> struct typed_flags<sc::MatrixEdge> : o3tl::is_typed_flags<sc::MatrixEdge, 63> {};
135 }
136 
137 #endif
138 
139 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Matrix data type that can store values of mixed types.
Definition: scmatrix.hxx:113
sal_Int32 mnRow2
Definition: types.hxx:90
::boost::intrusive_ptr< ScFormulaCellGroup > ScFormulaCellGroupRef
Definition: types.hxx:44
sal_Int32 mnTab1
Definition: types.hxx:88
bool isRangeValid() const
Definition: types.cxx:18
sal_Int32 mnRow1
Definition: types.hxx:87
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:24
::boost::intrusive_ptr< ScMatrix > ScMatrixRef
Definition: types.hxx:26
sal_Int16 SCCOL
Definition: types.hxx:22
StartListeningType
Definition: types.hxx:124
ScMatrixRef mpMat
Definition: types.hxx:85
sal_Int32 mnCol1
Definition: types.hxx:86
GroupCalcState
Definition: types.hxx:76
sal_Int32 mnCol2
Definition: types.hxx:89
AreaOverlapType
Definition: types.hxx:110
sal_Int32 SCROW
Definition: types.hxx:18
unsigned char sal_uInt8
::boost::intrusive_ptr< const ScMatrix > ScConstMatrixRef
Definition: types.hxx:27
::boost::intrusive_ptr< formula::FormulaToken > ScTokenRef
Definition: types.hxx:30
ScMatValType
Definition: types.hxx:32
sal_Int32 mnTab2
Definition: types.hxx:91
ScFormulaVectorState
When vectorization is enabled, we could potentially mass-calculate a series of formula token arrays i...
Definition: types.hxx:52
MatrixEdge
Definition: types.hxx:66
sal_Int16 SCTAB
Definition: types.hxx:23
ListenerGroupType
Definition: types.hxx:118