Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef INCLUDED_SC_INC_FILLINFO_HXX
21 : #define INCLUDED_SC_INC_FILLINFO_HXX
22 :
23 : #include <sal/config.h>
24 :
25 : #include <memory>
26 :
27 : #include <svx/framelinkarray.hxx>
28 : #include "global.hxx"
29 : #include "colorscale.hxx"
30 : #include "cellvalue.hxx"
31 :
32 : #include <boost/noncopyable.hpp>
33 :
34 : class SfxItemSet;
35 : class SvxBrushItem;
36 : class SvxBoxItem;
37 : class SvxLineItem;
38 : class SvxShadowItem;
39 : class Color;
40 :
41 : class ScPatternAttr;
42 :
43 : const sal_uInt8 SC_ROTDIR_NONE = 0;
44 : const sal_uInt8 SC_ROTDIR_STANDARD = 1;
45 : const sal_uInt8 SC_ROTDIR_LEFT = 2;
46 : const sal_uInt8 SC_ROTDIR_RIGHT = 3;
47 : const sal_uInt8 SC_ROTDIR_CENTER = 4;
48 :
49 : const sal_uInt8 SC_CLIPMARK_NONE = 0;
50 : const sal_uInt8 SC_CLIPMARK_LEFT = 1;
51 : const sal_uInt8 SC_CLIPMARK_RIGHT = 2;
52 : const sal_uInt8 SC_CLIPMARK_SIZE = 64;
53 :
54 : enum ScShadowPart
55 : {
56 : SC_SHADOW_HSTART,
57 : SC_SHADOW_VSTART,
58 : SC_SHADOW_HORIZ,
59 : SC_SHADOW_VERT,
60 : SC_SHADOW_CORNER
61 : };
62 :
63 57 : struct ScDataBarInfo
64 : {
65 : double mnZero; // 0 to 100
66 : Color maColor;
67 : double mnLength; // -100 to 100
68 : bool mbGradient;
69 : bool mbShowValue;
70 : Color maAxisColor;
71 :
72 0 : bool operator==(const ScDataBarInfo& r) const
73 : {
74 0 : if( mnZero != r.mnZero )
75 0 : return false;
76 0 : if( maColor != r.maColor )
77 0 : return false;
78 0 : if(mnLength != r.mnLength)
79 0 : return false;
80 0 : if (mbGradient != r.mbGradient)
81 0 : return false;
82 :
83 0 : return true;
84 : }
85 :
86 0 : bool operator!=(const ScDataBarInfo& r) const
87 : {
88 0 : return !(*this == r);
89 : }
90 : };
91 :
92 : struct ScIconSetInfo
93 : {
94 : sal_Int32 nIconIndex;
95 : ScIconSetType eIconSetType;
96 : bool mbShowValue;
97 : };
98 :
99 5924724 : struct CellInfo : boost::noncopyable
100 : {
101 : ScRefCellValue maCell;
102 :
103 : const ScPatternAttr* pPatternAttr;
104 : const SfxItemSet* pConditionSet;
105 : std::unique_ptr<const Color> pColorScale;
106 : std::unique_ptr<const ScDataBarInfo> pDataBar;
107 : std::unique_ptr<const ScIconSetInfo> pIconSet;
108 :
109 : const SvxBrushItem* pBackground;
110 :
111 : const SvxBoxItem* pLinesAttr; /// original item from document.
112 : const SvxLineItem* mpTLBRLine; /// original item from document.
113 : const SvxLineItem* mpBLTRLine; /// original item from document.
114 :
115 : const SvxShadowItem* pShadowAttr; // original item (internal)
116 :
117 : const SvxShadowItem* pHShadowOrigin;
118 : const SvxShadowItem* pVShadowOrigin;
119 :
120 : ScShadowPart eHShadowPart : 4; // shadow effective for drawing
121 : ScShadowPart eVShadowPart : 4;
122 : sal_uInt8 nClipMark;
123 : sal_uInt16 nWidth;
124 : sal_uInt8 nRotateDir;
125 :
126 : bool bMarked : 1;
127 : bool bEmptyCellText : 1;
128 : bool bMerged : 1;
129 : bool bHOverlapped : 1;
130 : bool bVOverlapped : 1;
131 : bool bAutoFilter : 1;
132 : bool bPivotButton:1;
133 : bool bPivotPopupButton:1;
134 : bool bFilterActive:1;
135 : bool bPrinted : 1; // when required (pagebreak mode)
136 : bool bHideGrid : 1; // output-internal
137 : bool bEditEngine : 1; // output-internal
138 : };
139 :
140 : const SCCOL SC_ROTMAX_NONE = SCCOL_MAX;
141 :
142 10734592 : struct RowInfo : boost::noncopyable
143 : {
144 : CellInfo* pCellInfo;
145 :
146 : sal_uInt16 nHeight;
147 : SCROW nRowNo;
148 : SCCOL nRotMaxCol; // SC_ROTMAX_NONE, if nothing
149 :
150 : bool bEmptyBack:1;
151 : bool bEmptyText:1;
152 : bool bAutoFilter:1;
153 : bool bPivotButton:1;
154 : bool bChanged:1; // TRUE, if not tested
155 : };
156 :
157 : struct ScTableInfo : boost::noncopyable
158 : {
159 : svx::frame::Array maArray;
160 : RowInfo* mpRowInfo;
161 : sal_uInt16 mnArrCount;
162 : bool mbPageMode;
163 :
164 : explicit ScTableInfo();
165 : ~ScTableInfo();
166 : };
167 :
168 : #endif
169 :
170 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|