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>
16
17class ScMatrix;
18
19// The typedefs
20typedef sal_Int32 SCROW;
21typedef sal_Int16 SCCOL;
22typedef sal_Int16 SCTAB;
23typedef sal_Int32 SCCOLROW;
24
25typedef ::boost::intrusive_ptr<ScMatrix> ScMatrixRef;
26typedef ::boost::intrusive_ptr<const ScMatrix> ScConstMatrixRef;
27
28namespace formula { class FormulaToken; }
29typedef ::boost::intrusive_ptr<formula::FormulaToken> ScTokenRef;
30
31enum 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};
39namespace o3tl{
40 template<> struct typed_flags<ScMatValType> : o3tl::is_typed_flags<ScMatValType, 0x0f> {};
41}
42
44typedef ::boost::intrusive_ptr<ScFormulaCellGroup> ScFormulaCellGroupRef;
45
52{
57
61};
62
63namespace sc {
64
65enum 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
93
94 bool isRangeValid() const;
95};
96
98{
100
101 SCROW mnRow1; //< first non-empty row
102 SCCOL mnCol1; //< first non-empty column
104
107};
108
110{
111 Inside,
115};
116
118{
119 Group,
120 Both
121};
122
124{
129
130}
131
132namespace o3tl{
133 template<> struct typed_flags<sc::MatrixEdge> : o3tl::is_typed_flags<sc::MatrixEdge, 63> {};
134}
135
136// Type of query done by ScQueryCellIteratorBase.
138{
139 Generic,
140 CountIf
141};
142
143// Type of cell access done by ScQueryCellIteratorBase.
145{
146 Direct, // Accessing directly cells.
147 SortedCache // Using ScSortedRangeCache.
148};
149
150/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOGroup Group
Matrix data type that can store values of mixed types.
Definition: scmatrix.hxx:101
Value
CAUTION! The following defines must be in the same namespace as the respective type.
MatrixEdge
Definition: types.hxx:65
AreaOverlapType
Definition: types.hxx:110
ListenerGroupType
Definition: types.hxx:118
StartListeningType
Definition: types.hxx:124
@ ConvertToGroupListening
Definition: types.hxx:125
@ SingleCellListening
Definition: types.hxx:126
@ NoListening
Definition: types.hxx:127
GroupCalcState
Definition: types.hxx:76
@ GroupCalcDisabled
Definition: types.hxx:77
@ GroupCalcEnabled
Definition: types.hxx:78
@ GroupCalcRunning
Definition: types.hxx:79
Empty
bool isRangeValid() const
Definition: types.cxx:18
sal_Int32 mnRow2
Definition: types.hxx:89
sal_Int32 mnCol1
Definition: types.hxx:85
ScMatrixRef mpMat
Definition: types.hxx:84
sal_Int32 mnCol2
Definition: types.hxx:88
sal_Int32 mnTab2
Definition: types.hxx:90
sal_Int32 mnTab1
Definition: types.hxx:87
sal_Int32 mnRow1
Definition: types.hxx:86
@ Left
Definition: tphfedit.hxx:40
@ Right
Definition: tphfedit.hxx:42
unsigned char sal_uInt8
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:23
sal_Int16 SCTAB
Definition: types.hxx:22
::boost::intrusive_ptr< ScFormulaCellGroup > ScFormulaCellGroupRef
Definition: types.hxx:43
::boost::intrusive_ptr< const ScMatrix > ScConstMatrixRef
Definition: types.hxx:26
ScMatValType
Definition: types.hxx:31
sal_Int16 SCCOL
Definition: types.hxx:21
ScQueryCellIteratorAccess
Definition: types.hxx:145
::boost::intrusive_ptr< ScMatrix > ScMatrixRef
Definition: types.hxx:25
ScFormulaVectorState
When vectorization is enabled, we could potentially mass-calculate a series of formula token arrays i...
Definition: types.hxx:52
@ FormulaVectorUnknown
Definition: types.hxx:60
@ FormulaVectorDisabledByOpCode
Definition: types.hxx:55
@ FormulaVectorDisabledByStackVariable
Definition: types.hxx:56
@ FormulaVectorEnabled
Definition: types.hxx:58
@ FormulaVectorDisabledNotInSubSet
Definition: types.hxx:54
@ FormulaVectorDisabled
Definition: types.hxx:53
@ FormulaVectorCheckReference
Definition: types.hxx:59
::boost::intrusive_ptr< formula::FormulaToken > ScTokenRef
Definition: types.hxx:29
ScQueryCellIteratorType
Definition: types.hxx:138
sal_Int32 SCROW
Definition: types.hxx:17