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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SC_INC_FILLINFO_HXX
21 #define INCLUDED_SC_INC_FILLINFO_HXX
23 #include <sal/config.h>
27 #include <svx/framelinkarray.hxx>
28 #include "colorscale.hxx"
29 #include "cellvalue.hxx"
30 #include <o3tl/typed_flags_set.hxx>
31 #include <boost/optional.hpp>
41 enum class ScRotateDir
: sal_uInt8
{
42 NONE
, Standard
, Left
, Right
, Center
45 enum class ScClipMark
: sal_uInt8
{
46 NONE
= 0x00, Left
= 0x01, Right
= 0x02
49 template<> struct typed_flags
<ScClipMark
> : is_typed_flags
<ScClipMark
, 0x03> {};
52 const sal_uInt8 SC_CLIPMARK_SIZE
= 64;
65 double mnZero
; // 0 to 100
67 double mnLength
; // -100 to 100
72 bool operator==(const ScDataBarInfo
& r
) const
74 if( mnZero
!= r
.mnZero
)
76 if( maColor
!= r
.maColor
)
78 if(mnLength
!= r
.mnLength
)
80 if (mbGradient
!= r
.mbGradient
)
86 bool operator!=(const ScDataBarInfo
& r
) const
95 ScIconSetType eIconSetType
;
102 : pPatternAttr(nullptr)
103 , pConditionSet(nullptr)
104 , pBackground(nullptr) // TODO: omit?
105 , pLinesAttr(nullptr)
106 , mpTLBRLine(nullptr)
107 , mpBLTRLine(nullptr)
108 , pShadowAttr(nullptr)
109 , pHShadowOrigin(nullptr)
110 , pVShadowOrigin(nullptr)
111 , eHShadowPart(SC_SHADOW_HSTART
)
112 , eVShadowPart(SC_SHADOW_HSTART
)
113 , nClipMark(ScClipMark::NONE
)
115 , nRotateDir(ScRotateDir::NONE
)
116 , bEmptyCellText(false)
118 , bHOverlapped(false)
119 , bVOverlapped(false)
121 , bPivotButton(false)
122 , bPivotPopupButton(false)
123 , bFilterActive(false)
124 , bPrinted(false) // view-internal
125 , bHideGrid(false) // view-internal
126 , bEditEngine(false) // view-internal
130 CellInfo(const CellInfo
&) = delete;
131 const CellInfo
& operator=(const CellInfo
&) = delete;
133 ScRefCellValue maCell
;
135 const ScPatternAttr
* pPatternAttr
;
136 const SfxItemSet
* pConditionSet
;
137 boost::optional
<Color
> mxColorScale
;
138 std::unique_ptr
<const ScDataBarInfo
> pDataBar
;
139 std::unique_ptr
<const ScIconSetInfo
> pIconSet
;
141 const SvxBrushItem
* pBackground
;
143 const SvxBoxItem
* pLinesAttr
; /// original item from document.
144 const SvxLineItem
* mpTLBRLine
; /// original item from document.
145 const SvxLineItem
* mpBLTRLine
; /// original item from document.
147 const SvxShadowItem
* pShadowAttr
; // original item (internal)
149 const SvxShadowItem
* pHShadowOrigin
;
150 const SvxShadowItem
* pVShadowOrigin
;
152 ScShadowPart eHShadowPart
: 4; // shadow effective for drawing
153 ScShadowPart eVShadowPart
: 4;
154 ScClipMark nClipMark
;
156 ScRotateDir nRotateDir
;
158 bool bEmptyCellText
: 1;
160 bool bHOverlapped
: 1;
161 bool bVOverlapped
: 1;
162 bool bAutoFilter
: 1;
164 bool bPivotPopupButton
:1;
165 bool bFilterActive
:1;
166 bool bPrinted
: 1; // when required (pagebreak mode)
167 bool bHideGrid
: 1; // output-internal
168 bool bEditEngine
: 1; // output-internal
171 const SCCOL SC_ROTMAX_NONE
= SCCOL_MAX
;
176 RowInfo(const RowInfo
&) = delete;
177 const RowInfo
& operator=(const RowInfo
&) = delete;
183 SCCOL nRotMaxCol
; // SC_ROTMAX_NONE, if nothing
188 bool bChanged
:1; // TRUE, if not tested
193 svx::frame::Array maArray
;
194 std::unique_ptr
<RowInfo
[]>
197 SCSIZE
const mnArrCapacity
;
200 explicit ScTableInfo(const SCSIZE capacity
= 1024);
202 ScTableInfo(const ScTableInfo
&) = delete;
203 const ScTableInfo
& operator=(const ScTableInfo
&) = delete;
208 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */