Bump version to 4.3-4
[LibreOffice.git] / sc / inc / types.hxx
blobd40b2a5e110ed995fb2255848b8cf473c0f98e01
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 <boost/unordered_map.hpp>
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 // temporarily signed typedefs
27 typedef sal_Int32 SCsROW;
28 typedef sal_Int16 SCsCOL;
29 typedef sal_Int16 SCsTAB;
30 typedef sal_Int32 SCsCOLROW;
32 typedef ::boost::intrusive_ptr<ScMatrix> ScMatrixRef;
33 typedef ::boost::intrusive_ptr<const ScMatrix> ScConstMatrixRef;
35 class ScToken;
36 typedef ::boost::intrusive_ptr<ScToken> ScTokenRef;
38 typedef sal_uInt8 ScMatValType;
39 const ScMatValType SC_MATVAL_VALUE = 0x00;
40 const ScMatValType SC_MATVAL_BOOLEAN = 0x01;
41 const ScMatValType SC_MATVAL_STRING = 0x02;
42 const ScMatValType SC_MATVAL_EMPTY = SC_MATVAL_STRING | 0x04; // STRING plus flag
43 const ScMatValType SC_MATVAL_EMPTYPATH = SC_MATVAL_EMPTY | 0x08; // EMPTY plus flag
44 const ScMatValType SC_MATVAL_NONVALUE = SC_MATVAL_EMPTYPATH; // mask of all non-value bits
46 struct ScFormulaCellGroup;
47 typedef ::boost::intrusive_ptr<ScFormulaCellGroup> ScFormulaCellGroupRef;
49 /**
50 * When vectorization is enabled, we could potentially mass-calculate a
51 * series of formula token arrays in adjacent formula cells in one step,
52 * provided that they all contain identical set of tokens.
54 enum ScFormulaVectorState
56 FormulaVectorDisabled = 0,
57 FormulaVectorEnabled,
58 FormulaVectorCheckReference,
59 FormulaVectorUnknown
62 namespace sc {
64 const sal_uInt16 MatrixEdgeNothing = 0;
65 const sal_uInt16 MatrixEdgeInside = 1;
66 const sal_uInt16 MatrixEdgeBottom = 2;
67 const sal_uInt16 MatrixEdgeLeft = 4;
68 const sal_uInt16 MatrixEdgeTop = 8;
69 const sal_uInt16 MatrixEdgeRight = 16;
70 const sal_uInt16 MatrixEdgeOpen = 32;
72 enum GroupCalcState
74 GroupCalcDisabled = 0,
75 GroupCalcEnabled,
76 GroupCalcRunning,
79 enum OpenCLKernelState
81 OpenCLKernelNone = 0,
82 OpenCLKernelCompilationScheduled,
83 OpenCLKernelBinaryCreated
86 struct RangeMatrix
88 ScMatrixRef mpMat;
89 sal_Int32 mnCol1;
90 sal_Int32 mnRow1;
91 sal_Int32 mnTab1;
92 sal_Int32 mnCol2;
93 sal_Int32 mnRow2;
94 sal_Int32 mnTab2;
96 RangeMatrix();
98 bool isRangeValid() const;
101 typedef boost::unordered_map<SCCOLROW,SCCOLROW> ColRowReorderMapType;
103 enum AreaOverlapType
105 AreaInside,
106 AreaPartialOverlap,
107 OneRowInsideArea,
108 OneColumnInsideArea
113 #endif
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */