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/.
12 #include <sal/types.h>
14 #include <boost/intrusive_ptr.hpp>
15 #include <o3tl/typed_flags_set.hxx>
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 typedef ::boost::intrusive_ptr
<ScMatrix
> ScMatrixRef
;
26 typedef ::boost::intrusive_ptr
<const ScMatrix
> ScConstMatrixRef
;
28 namespace formula
{ class FormulaToken
; }
29 typedef ::boost::intrusive_ptr
<formula::FormulaToken
> ScTokenRef
;
31 enum class ScMatValType
: sal_uInt8
{
35 Empty
= String
| 0x04, // STRING plus flag
36 EmptyPath
= Empty
| 0x08, // EMPTY plus flag
37 NonvalueMask
= EmptyPath
// mask of all non-value bits
40 template<> struct typed_flags
<ScMatValType
> : o3tl::is_typed_flags
<ScMatValType
, 0x0f> {};
43 struct ScFormulaCellGroup
;
44 typedef ::boost::intrusive_ptr
<ScFormulaCellGroup
> ScFormulaCellGroupRef
;
47 * When vectorization is enabled, we could potentially mass-calculate a
48 * series of formula token arrays in adjacent formula cells in one step,
49 * provided that they all contain identical set of tokens.
51 enum ScFormulaVectorState
53 FormulaVectorDisabled
,
54 FormulaVectorDisabledNotInSubSet
,
55 FormulaVectorDisabledByOpCode
,
56 FormulaVectorDisabledByStackVariable
,
59 FormulaVectorCheckReference
,
65 enum class MatrixEdge
{
73 }; // typed_flags, template outside of sc namespace
77 GroupCalcDisabled
= 0,
94 bool isRangeValid() const;
97 struct MultiDataCellState
99 enum StateType
: sal_uInt8
{ Invalid
= 0, Empty
, HasOneCell
, HasMultipleCells
};
101 SCROW mnRow1
; //< first non-empty row
102 SCCOL mnCol1
; //< first non-empty column
105 MultiDataCellState();
106 MultiDataCellState( StateType eState
);
109 enum class AreaOverlapType
117 enum class ListenerGroupType
123 enum StartListeningType
125 ConvertToGroupListening
,
133 template<> struct typed_flags
<sc::MatrixEdge
> : o3tl::is_typed_flags
<sc::MatrixEdge
, 63> {};
136 // Type of query done by ScQueryCellIteratorBase.
137 enum class ScQueryCellIteratorType
143 // Type of cell access done by ScQueryCellIteratorBase.
144 enum class ScQueryCellIteratorAccess
146 Direct
, // Accessing directly cells.
147 SortedCache
// Using ScSortedRangeCache.
150 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */