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 #pragma once
11 
12 #include <sal/types.h>
13 
14 #include <boost/intrusive_ptr.hpp>
15 #include <o3tl/typed_flags_set.hxx>
16 
17 class ScMatrix;
18 
19 // The typedefs
20 typedef sal_Int32 SCROW;
21 typedef sal_Int16 SCCOL;
22 typedef sal_Int16 SCTAB;
23 typedef sal_Int32 SCCOLROW;
24 
25 typedef ::boost::intrusive_ptr<ScMatrix> ScMatrixRef;
26 typedef ::boost::intrusive_ptr<const ScMatrix> ScConstMatrixRef;
27 
28 namespace formula { class FormulaToken; }
29 typedef ::boost::intrusive_ptr<formula::FormulaToken> ScTokenRef;
30 
31 enum class ScMatValType : sal_uInt8 {
32  Value = 0x00,
33  Boolean = 0x01,
34  String = 0x02,
35  Empty = String | 0x04, // STRING plus flag
36  EmptyPath = Empty | 0x08, // EMPTY plus flag
37  NonvalueMask = EmptyPath // mask of all non-value bits
38 };
39 namespace o3tl{
40  template<> struct typed_flags<ScMatValType> : o3tl::is_typed_flags<ScMatValType, 0x0f> {};
41 }
42 
44 typedef ::boost::intrusive_ptr<ScFormulaCellGroup> ScFormulaCellGroupRef;
45 
52 {
57 
61 };
62 
63 namespace sc {
64 
65 enum class MatrixEdge{
66  Nothing = 0,
67  Inside = 1,
68  Bottom = 2,
69  Left = 4,
70  Top = 8,
71  Right = 16,
72  Open = 32
73 }; // typed_flags, template outside of sc namespace
74 
76 {
80 };
81 
83 {
85  sal_Int32 mnCol1;
86  sal_Int32 mnRow1;
87  sal_Int32 mnTab1;
88  sal_Int32 mnCol2;
89  sal_Int32 mnRow2;
90  sal_Int32 mnTab2;
91 
92  RangeMatrix();
93 
94  bool isRangeValid() const;
95 };
96 
98 {
100 
101  SCROW mnRow1; //< first non-empty row
102  SCCOL mnCol1; //< first non-empty column
104 
106  MultiDataCellState( StateType eState );
107 };
108 
109 enum class AreaOverlapType
110 {
111  Inside,
113  OneRowInside,
115 };
116 
118 {
119  Group,
120  Both
121 };
122 
124 {
128 };
129 
130 }
131 
132 namespace o3tl{
133  template<> struct typed_flags<sc::MatrixEdge> : o3tl::is_typed_flags<sc::MatrixEdge, 63> {};
134 }
135 
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Matrix data type that can store values of mixed types.
Definition: scmatrix.hxx:112
sal_Int32 mnRow2
Definition: types.hxx:89
::boost::intrusive_ptr< ScFormulaCellGroup > ScFormulaCellGroupRef
Definition: types.hxx:43
sal_Int32 mnTab1
Definition: types.hxx:87
bool isRangeValid() const
Definition: types.cxx:18
sal_Int32 mnRow1
Definition: types.hxx:86
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:23
::boost::intrusive_ptr< ScMatrix > ScMatrixRef
Definition: types.hxx:25
sal_Int16 SCCOL
Definition: types.hxx:21
StartListeningType
Definition: types.hxx:123
ScMatrixRef mpMat
Definition: types.hxx:84
sal_Int32 mnCol1
Definition: types.hxx:85
GroupCalcState
Definition: types.hxx:75
sal_Int32 mnCol2
Definition: types.hxx:88
AreaOverlapType
Definition: types.hxx:109
sal_Int32 SCROW
Definition: types.hxx:17
unsigned char sal_uInt8
::boost::intrusive_ptr< const ScMatrix > ScConstMatrixRef
Definition: types.hxx:26
::boost::intrusive_ptr< formula::FormulaToken > ScTokenRef
Definition: types.hxx:29
ScMatValType
Definition: types.hxx:31
sal_Int32 mnTab2
Definition: types.hxx:90
ScFormulaVectorState
When vectorization is enabled, we could potentially mass-calculate a series of formula token arrays i...
Definition: types.hxx:51
MatrixEdge
Definition: types.hxx:65
sal_Int16 SCTAB
Definition: types.hxx:22
ListenerGroupType
Definition: types.hxx:117