Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / inc / types.hxx
blobfc0e0e85c07b9fb03d03b9a086f0889915daa323
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 SC_TYPES_HXX
11 #define SC_TYPES_HXX
13 #include "sal/types.h"
15 #include <boost/intrusive_ptr.hpp>
17 class ScMatrix;
19 typedef ::boost::intrusive_ptr<ScMatrix> ScMatrixRef;
20 typedef ::boost::intrusive_ptr<const ScMatrix> ScConstMatrixRef;
22 class ScToken;
23 typedef ::boost::intrusive_ptr<ScToken> ScTokenRef;
25 typedef sal_uInt8 ScMatValType;
26 const ScMatValType SC_MATVAL_VALUE = 0x00;
27 const ScMatValType SC_MATVAL_BOOLEAN = 0x01;
28 const ScMatValType SC_MATVAL_STRING = 0x02;
29 const ScMatValType SC_MATVAL_EMPTY = SC_MATVAL_STRING | 0x04; // STRING plus flag
30 const ScMatValType SC_MATVAL_EMPTYPATH = SC_MATVAL_EMPTY | 0x08; // EMPTY plus flag
31 const ScMatValType SC_MATVAL_NONVALUE = SC_MATVAL_EMPTYPATH; // mask of all non-value bits
33 struct ScFormulaCellGroup;
34 typedef ::boost::intrusive_ptr<ScFormulaCellGroup> ScFormulaCellGroupRef;
36 /**
37 * When vectorization is enabled, we could potentially mass-calculate a
38 * series of formula token arrays in adjacent formula cells in one step,
39 * provided that they all contain identical set of tokens.
41 enum ScFormulaVectorState
43 FormulaVectorDisabled = 0,
44 FormulaVectorEnabled,
45 FormulaVectorCheckReference,
46 FormulaVectorUnknown
49 namespace sc {
51 const sal_uInt16 MatrixEdgeNothing = 0;
52 const sal_uInt16 MatrixEdgeInside = 1;
53 const sal_uInt16 MatrixEdgeBottom = 2;
54 const sal_uInt16 MatrixEdgeLeft = 4;
55 const sal_uInt16 MatrixEdgeTop = 8;
56 const sal_uInt16 MatrixEdgeRight = 16;
57 const sal_uInt16 MatrixEdgeOpen = 32;
59 enum GroupCalcState
61 GroupCalcEnabled,
62 GroupCalcOpenCLKernelCompilationScheduled,
63 GroupCalcOpenCLKernelBinaryCreated,
64 GroupCalcRunning,
65 GroupCalcDisabled
68 struct RangeMatrix
70 ScMatrixRef mpMat;
71 sal_Int32 mnCol1;
72 sal_Int32 mnRow1;
73 sal_Int32 mnTab1;
74 sal_Int32 mnCol2;
75 sal_Int32 mnRow2;
76 sal_Int32 mnTab2;
78 RangeMatrix();
80 bool isRangeValid() const;
85 #endif
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */