update credits
[LibreOffice.git] / sc / inc / types.hxx
blob77934f07482a3210955cf9f667d1138a69a0a87d
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>
17 class ScMatrix;
19 // The typedefs
20 typedef sal_Int32 SCROW;
21 typedef sal_Int16 SCCOL;
22 typedef sal_Int16 SCTAB;
23 typedef sal_Int32 SCCOLROW; ///< a type capable of holding either SCCOL or SCROW
25 // temporarily signed typedefs
26 typedef sal_Int32 SCsROW;
27 typedef sal_Int16 SCsCOL;
28 typedef sal_Int16 SCsTAB;
29 typedef sal_Int32 SCsCOLROW;
31 typedef ::boost::intrusive_ptr<ScMatrix> ScMatrixRef;
32 typedef ::boost::intrusive_ptr<const ScMatrix> ScConstMatrixRef;
34 namespace formula { class FormulaToken; }
35 typedef ::boost::intrusive_ptr<formula::FormulaToken> ScTokenRef;
37 typedef sal_uInt8 ScMatValType;
38 const ScMatValType SC_MATVAL_VALUE = 0x00;
39 const ScMatValType SC_MATVAL_BOOLEAN = 0x01;
40 const ScMatValType SC_MATVAL_STRING = 0x02;
41 const ScMatValType SC_MATVAL_EMPTY = SC_MATVAL_STRING | 0x04; // STRING plus flag
42 const ScMatValType SC_MATVAL_EMPTYPATH = SC_MATVAL_EMPTY | 0x08; // EMPTY plus flag
43 const ScMatValType SC_MATVAL_NONVALUE = SC_MATVAL_EMPTYPATH; // mask of all non-value bits
45 struct ScFormulaCellGroup;
46 typedef ::boost::intrusive_ptr<ScFormulaCellGroup> ScFormulaCellGroupRef;
48 /**
49 * When vectorization is enabled, we could potentially mass-calculate a
50 * series of formula token arrays in adjacent formula cells in one step,
51 * provided that they all contain identical set of tokens.
53 enum ScFormulaVectorState
55 FormulaVectorDisabled = 0,
56 FormulaVectorEnabled,
57 FormulaVectorCheckReference,
58 FormulaVectorUnknown
61 namespace sc {
63 const sal_uInt16 MatrixEdgeNothing = 0;
64 const sal_uInt16 MatrixEdgeInside = 1;
65 const sal_uInt16 MatrixEdgeBottom = 2;
66 const sal_uInt16 MatrixEdgeLeft = 4;
67 const sal_uInt16 MatrixEdgeTop = 8;
68 const sal_uInt16 MatrixEdgeRight = 16;
69 const sal_uInt16 MatrixEdgeOpen = 32;
71 enum GroupCalcState
73 GroupCalcDisabled = 0,
74 GroupCalcEnabled,
75 GroupCalcRunning,
78 enum OpenCLKernelState
80 OpenCLKernelNone = 0,
81 OpenCLKernelCompilationScheduled,
82 OpenCLKernelBinaryCreated
85 struct RangeMatrix
87 ScMatrixRef mpMat;
88 sal_Int32 mnCol1;
89 sal_Int32 mnRow1;
90 sal_Int32 mnTab1;
91 sal_Int32 mnCol2;
92 sal_Int32 mnRow2;
93 sal_Int32 mnTab2;
95 RangeMatrix();
97 bool isRangeValid() const;
100 enum AreaOverlapType
102 AreaInside,
103 AreaPartialOverlap,
104 AreaInsideOrOverlap,
105 OneRowInsideArea,
106 OneColumnInsideArea
109 enum ListenerGroupType
111 ListenerSingle,
112 ListenerGroup,
113 ListenerBoth
116 enum StartListeningType
118 ConvertToGroupListening,
119 SingleCellListening,
120 NoListening
125 #endif
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */