Bump version to 4.3-4
[LibreOffice.git] / sc / inc / fillinfo.hxx
blob1db76d9fb2dfb88884e10570fb8abdd59a863260
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/.
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 <svx/framelinkarray.hxx>
24 #include "global.hxx"
25 #include "colorscale.hxx"
26 #include "cellvalue.hxx"
28 #include <boost/noncopyable.hpp>
30 class SfxItemSet;
31 class SvxBrushItem;
32 class SvxBoxItem;
33 class SvxLineItem;
34 class SvxShadowItem;
35 class Color;
37 class ScPatternAttr;
39 const sal_uInt8 SC_ROTDIR_NONE = 0;
40 const sal_uInt8 SC_ROTDIR_STANDARD = 1;
41 const sal_uInt8 SC_ROTDIR_LEFT = 2;
42 const sal_uInt8 SC_ROTDIR_RIGHT = 3;
43 const sal_uInt8 SC_ROTDIR_CENTER = 4;
45 const sal_uInt8 SC_CLIPMARK_NONE = 0;
46 const sal_uInt8 SC_CLIPMARK_LEFT = 1;
47 const sal_uInt8 SC_CLIPMARK_RIGHT = 2;
48 const sal_uInt8 SC_CLIPMARK_SIZE = 64;
50 enum ScShadowPart
52 SC_SHADOW_HSTART,
53 SC_SHADOW_VSTART,
54 SC_SHADOW_HORIZ,
55 SC_SHADOW_VERT,
56 SC_SHADOW_CORNER
59 struct ScDataBarInfo
61 double mnZero; // 0 to 100
62 Color maColor;
63 double mnLength; // -100 to 100
64 bool mbGradient;
65 bool mbShowValue;
66 Color maAxisColor;
68 bool operator==(const ScDataBarInfo& r) const
70 if( mnZero != r.mnZero )
71 return false;
72 if( maColor != r.maColor )
73 return false;
74 if(mnLength != r.mnLength)
75 return false;
76 if (mbGradient != r.mbGradient)
77 return false;
79 return true;
82 bool operator!=(const ScDataBarInfo& r) const
84 return !(*this == r);
88 struct ScIconSetInfo
90 sal_Int32 nIconIndex;
91 ScIconSetType eIconSetType;
92 bool mbShowValue;
95 struct CellInfo : boost::noncopyable
97 ScRefCellValue maCell;
99 const ScPatternAttr* pPatternAttr;
100 const SfxItemSet* pConditionSet;
101 const Color* pColorScale;
102 const ScDataBarInfo* pDataBar;
103 const ScIconSetInfo* pIconSet;
105 const SvxBrushItem* pBackground;
107 const SvxBoxItem* pLinesAttr; /// original item from document.
108 const SvxLineItem* mpTLBRLine; /// original item from document.
109 const SvxLineItem* mpBLTRLine; /// original item from document.
111 const SvxShadowItem* pShadowAttr; // original item (internal)
113 const SvxShadowItem* pHShadowOrigin;
114 const SvxShadowItem* pVShadowOrigin;
116 ScShadowPart eHShadowPart : 4; // shadow effective for drawing
117 ScShadowPart eVShadowPart : 4;
118 sal_uInt8 nClipMark;
119 sal_uInt16 nWidth;
120 sal_uInt8 nRotateDir;
122 bool bMarked : 1;
123 bool bEmptyCellText : 1;
124 bool bMerged : 1;
125 bool bHOverlapped : 1;
126 bool bVOverlapped : 1;
127 bool bAutoFilter : 1;
128 bool bPivotButton:1;
129 bool bPivotPopupButton:1;
130 bool bFilterActive:1;
131 bool bPrinted : 1; // when required (pagebreak mode)
132 bool bHideGrid : 1; // output-internal
133 bool bEditEngine : 1; // output-internal
135 CellInfo():
136 pColorScale(NULL),
137 pDataBar(NULL),
138 pIconSet(NULL) {}
140 ~CellInfo()
142 delete pColorScale;
143 delete pDataBar;
144 delete pIconSet;
148 const SCCOL SC_ROTMAX_NONE = SCCOL_MAX;
150 struct RowInfo : boost::noncopyable
152 CellInfo* pCellInfo;
154 sal_uInt16 nHeight;
155 SCROW nRowNo;
156 SCCOL nRotMaxCol; // SC_ROTMAX_NONE, if nothing
158 bool bEmptyBack:1;
159 bool bEmptyText:1;
160 bool bAutoFilter:1;
161 bool bPivotButton:1;
162 bool bChanged:1; // TRUE, if not tested
164 inline explicit RowInfo() : pCellInfo( 0 ) {}
166 private:
167 RowInfo( const RowInfo& );
168 RowInfo& operator=( const RowInfo& );
171 struct ScTableInfo : boost::noncopyable
173 svx::frame::Array maArray;
174 RowInfo* mpRowInfo;
175 sal_uInt16 mnArrCount;
176 bool mbPageMode;
178 explicit ScTableInfo();
179 ~ScTableInfo();
181 private:
182 ScTableInfo( const ScTableInfo& );
183 ScTableInfo& operator=( const ScTableInfo& );
186 #endif
188 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */