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>
40 enum class ScRotateDir
: sal_uInt8
{
41 NONE
, Standard
, Left
, Right
, Center
44 enum class ScClipMark
: sal_uInt8
{
45 NONE
= 0x00, Left
= 0x01, Right
= 0x02
48 template<> struct typed_flags
<ScClipMark
> : is_typed_flags
<ScClipMark
, 0x03> {};
51 const sal_uInt8 SC_CLIPMARK_SIZE
= 64;
64 double mnZero
; // 0 to 100
66 double mnLength
; // -100 to 100
71 bool operator==(const ScDataBarInfo
& r
) const
73 if( mnZero
!= r
.mnZero
)
75 if( maColor
!= r
.maColor
)
77 if(mnLength
!= r
.mnLength
)
79 if (mbGradient
!= r
.mbGradient
)
85 bool operator!=(const ScDataBarInfo
& r
) const
94 ScIconSetType eIconSetType
;
101 : pPatternAttr(nullptr)
102 , pConditionSet(nullptr)
103 , pBackground(nullptr) // TODO: omit?
104 , pLinesAttr(nullptr)
105 , mpTLBRLine(nullptr)
106 , mpBLTRLine(nullptr)
107 , pShadowAttr(nullptr)
108 , pHShadowOrigin(nullptr)
109 , pVShadowOrigin(nullptr)
110 , eHShadowPart(SC_SHADOW_HSTART
)
111 , eVShadowPart(SC_SHADOW_HSTART
)
112 , nClipMark(ScClipMark::NONE
)
114 , nRotateDir(ScRotateDir::NONE
)
115 , bEmptyCellText(false)
117 , bHOverlapped(false)
118 , bVOverlapped(false)
120 , bPivotButton(false)
121 , bPivotPopupButton(false)
122 , bFilterActive(false)
123 , bPrinted(false) // view-internal
124 , bHideGrid(false) // view-internal
125 , bEditEngine(false) // view-internal
129 CellInfo(const CellInfo
&) = delete;
130 const CellInfo
& operator=(const CellInfo
&) = delete;
132 ScRefCellValue maCell
;
134 const ScPatternAttr
* pPatternAttr
;
135 const SfxItemSet
* pConditionSet
;
136 std::unique_ptr
<const Color
> pColorScale
;
137 std::unique_ptr
<const ScDataBarInfo
> pDataBar
;
138 std::unique_ptr
<const ScIconSetInfo
> pIconSet
;
140 const SvxBrushItem
* pBackground
;
142 const SvxBoxItem
* pLinesAttr
; /// original item from document.
143 const SvxLineItem
* mpTLBRLine
; /// original item from document.
144 const SvxLineItem
* mpBLTRLine
; /// original item from document.
146 const SvxShadowItem
* pShadowAttr
; // original item (internal)
148 const SvxShadowItem
* pHShadowOrigin
;
149 const SvxShadowItem
* pVShadowOrigin
;
151 ScShadowPart eHShadowPart
: 4; // shadow effective for drawing
152 ScShadowPart eVShadowPart
: 4;
153 ScClipMark nClipMark
;
155 ScRotateDir nRotateDir
;
157 bool bEmptyCellText
: 1;
159 bool bHOverlapped
: 1;
160 bool bVOverlapped
: 1;
161 bool bAutoFilter
: 1;
163 bool bPivotPopupButton
:1;
164 bool bFilterActive
:1;
165 bool bPrinted
: 1; // when required (pagebreak mode)
166 bool bHideGrid
: 1; // output-internal
167 bool bEditEngine
: 1; // output-internal
170 const SCCOL SC_ROTMAX_NONE
= SCCOL_MAX
;
175 RowInfo(const RowInfo
&) = delete;
176 const RowInfo
& operator=(const RowInfo
&) = delete;
182 SCCOL nRotMaxCol
; // SC_ROTMAX_NONE, if nothing
187 bool bChanged
:1; // TRUE, if not tested
192 svx::frame::Array maArray
;
193 std::unique_ptr
<RowInfo
[]>
196 SCSIZE mnArrCapacity
;
199 explicit ScTableInfo(const SCSIZE capacity
= 1024);
201 ScTableInfo(const ScTableInfo
&) = delete;
202 const ScTableInfo
& operator=(const ScTableInfo
&) = delete;
207 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */