1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
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 <o3tl/typed_flags_set.hxx>
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 typedef ::boost::intrusive_ptr
<ScMatrix
> ScMatrixRef
;
27 typedef ::boost::intrusive_ptr
<const ScMatrix
> ScConstMatrixRef
;
29 namespace formula
{ class FormulaToken
; }
30 typedef ::boost::intrusive_ptr
<formula::FormulaToken
> ScTokenRef
;
32 enum class ScMatValType
: sal_uInt8
{
36 Empty
= String
| 0x04, // STRING plus flag
37 EmptyPath
= Empty
| 0x08, // EMPTY plus flag
38 NonvalueMask
= EmptyPath
// mask of all non-value bits
41 template<> struct typed_flags
<ScMatValType
> : o3tl::is_typed_flags
<ScMatValType
, 0x0f> {};
44 struct ScFormulaCellGroup
;
45 typedef ::boost::intrusive_ptr
<ScFormulaCellGroup
> ScFormulaCellGroupRef
;
48 * When vectorization is enabled, we could potentially mass-calculate a
49 * series of formula token arrays in adjacent formula cells in one step,
50 * provided that they all contain identical set of tokens.
52 enum ScFormulaVectorState
54 FormulaVectorDisabled
,
55 FormulaVectorDisabledNotInSubSet
,
56 FormulaVectorDisabledByOpCode
,
57 FormulaVectorDisabledByStackVariable
,
60 FormulaVectorCheckReference
,
66 enum class MatrixEdge
{
74 }; // typed_flags, template outside of sc namespace
78 GroupCalcDisabled
= 0,
95 bool isRangeValid() const;
98 struct MultiDataCellState
100 enum StateType
: sal_uInt8
{ Invalid
= 0, Empty
, HasOneCell
, HasMultipleCells
};
102 SCROW mnRow1
; //< first non-empty row
103 SCCOL mnCol1
; //< first non-empty column
106 MultiDataCellState();
107 MultiDataCellState( StateType eState
);
110 enum class AreaOverlapType
118 enum class ListenerGroupType
124 enum StartListeningType
126 ConvertToGroupListening
,
134 template<> struct typed_flags
<sc::MatrixEdge
> : o3tl::is_typed_flags
<sc::MatrixEdge
, 63> {};
139 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */