bump product version to 4.1.6.2
[LibreOffice.git] / sc / inc / fillinfo.hxx
bloba55d638508195fdd60328db45257bc27b4e01670
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 SC_FILLINFO_HXX
21 #define SC_FILLINFO_HXX
23 #include <svx/framelinkarray.hxx>
24 #include "global.hxx"
25 #include "colorscale.hxx"
26 #include "cellvalue.hxx"
28 class SfxItemSet;
29 class SvxBrushItem;
30 class SvxBoxItem;
31 class SvxLineItem;
32 class SvxShadowItem;
33 class Color;
35 class ScPatternAttr;
37 const sal_uInt8 SC_ROTDIR_NONE = 0;
38 const sal_uInt8 SC_ROTDIR_STANDARD = 1;
39 const sal_uInt8 SC_ROTDIR_LEFT = 2;
40 const sal_uInt8 SC_ROTDIR_RIGHT = 3;
41 const sal_uInt8 SC_ROTDIR_CENTER = 4;
43 const sal_uInt8 SC_CLIPMARK_NONE = 0;
44 const sal_uInt8 SC_CLIPMARK_LEFT = 1;
45 const sal_uInt8 SC_CLIPMARK_RIGHT = 2;
46 const sal_uInt8 SC_CLIPMARK_SIZE = 64;
48 enum ScShadowPart
50 SC_SHADOW_HSTART,
51 SC_SHADOW_VSTART,
52 SC_SHADOW_HORIZ,
53 SC_SHADOW_VERT,
54 SC_SHADOW_CORNER
57 struct ScDataBarInfo
59 double mnZero; // 0 to 100
60 Color maColor;
61 double mnLength; // -100 to 100
62 bool mbGradient;
63 bool mbShowValue;
64 Color maAxisColor;
66 bool operator==(const ScDataBarInfo& r) const
68 if( mnZero != r.mnZero )
69 return false;
70 if( maColor != r.maColor )
71 return false;
72 if(mnLength != r.mnLength)
73 return false;
74 if (mbGradient != r.mbGradient)
75 return false;
77 return true;
80 bool operator!=(const ScDataBarInfo& r) const
82 return !(*this == r);
86 struct ScIconSetInfo
88 sal_Int32 nIconIndex;
89 ScIconSetType eIconSetType;
90 bool mbShowValue;
93 struct CellInfo
95 ScRefCellValue maCell;
97 const ScPatternAttr* pPatternAttr;
98 const SfxItemSet* pConditionSet;
99 const Color* pColorScale;
100 const ScDataBarInfo* pDataBar;
101 const ScIconSetInfo* pIconSet;
103 const SvxBrushItem* pBackground;
105 const SvxBoxItem* pLinesAttr; /// original item from document.
106 const SvxLineItem* mpTLBRLine; /// original item from document.
107 const SvxLineItem* mpBLTRLine; /// original item from document.
109 const SvxShadowItem* pShadowAttr; // original item (internal)
111 const SvxShadowItem* pHShadowOrigin;
112 const SvxShadowItem* pVShadowOrigin;
114 ScShadowPart eHShadowPart : 4; // shadow effective for drawing
115 ScShadowPart eVShadowPart : 4;
116 sal_uInt8 nClipMark;
117 sal_uInt16 nWidth;
118 sal_uInt8 nRotateDir;
120 bool bMarked : 1;
121 bool bEmptyCellText : 1;
122 bool bMerged : 1;
123 bool bHOverlapped : 1;
124 bool bVOverlapped : 1;
125 bool bAutoFilter : 1;
126 bool bPivotButton:1;
127 bool bPivotPopupButton:1;
128 bool bFilterActive:1;
129 bool bPrinted : 1; // when required (pagebreak mode)
130 bool bHideGrid : 1; // output-internal
131 bool bEditEngine : 1; // output-internal
133 CellInfo():
134 pColorScale(NULL),
135 pDataBar(NULL),
136 pIconSet(NULL) {}
138 ~CellInfo()
140 delete pColorScale;
141 delete pDataBar;
142 delete pIconSet;
146 const SCCOL SC_ROTMAX_NONE = SCCOL_MAX;
148 struct RowInfo
150 CellInfo* pCellInfo;
152 sal_uInt16 nHeight;
153 SCROW nRowNo;
154 SCCOL nRotMaxCol; // SC_ROTMAX_NONE, if nothing
156 bool bEmptyBack:1;
157 bool bEmptyText:1;
158 bool bAutoFilter:1;
159 bool bPivotButton:1;
160 bool bChanged:1; // TRUE, if not tested
162 inline explicit RowInfo() : pCellInfo( 0 ) {}
164 private:
165 RowInfo( const RowInfo& );
166 RowInfo& operator=( const RowInfo& );
169 struct ScTableInfo
171 svx::frame::Array maArray;
172 RowInfo* mpRowInfo;
173 sal_uInt16 mnArrCount;
174 bool mbPageMode;
176 explicit ScTableInfo();
177 ~ScTableInfo();
179 private:
180 ScTableInfo( const ScTableInfo& );
181 ScTableInfo& operator=( const ScTableInfo& );
184 #endif
186 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */