Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef SC_FILLINFO_HXX
30 : : #define SC_FILLINFO_HXX
31 : :
32 : : #include <svx/framelinkarray.hxx>
33 : : #include "global.hxx"
34 : :
35 : : class SfxItemSet;
36 : : class SvxBrushItem;
37 : : class SvxBoxItem;
38 : : class SvxLineItem;
39 : : class SvxShadowItem;
40 : : class Color;
41 : :
42 : : class ScBaseCell;
43 : : class ScPatternAttr;
44 : :
45 : : const sal_uInt8 SC_ROTDIR_NONE = 0;
46 : : const sal_uInt8 SC_ROTDIR_STANDARD = 1;
47 : : const sal_uInt8 SC_ROTDIR_LEFT = 2;
48 : : const sal_uInt8 SC_ROTDIR_RIGHT = 3;
49 : : const sal_uInt8 SC_ROTDIR_CENTER = 4;
50 : :
51 : : const sal_uInt8 SC_CLIPMARK_NONE = 0;
52 : : const sal_uInt8 SC_CLIPMARK_LEFT = 1;
53 : : const sal_uInt8 SC_CLIPMARK_RIGHT = 2;
54 : : const sal_uInt8 SC_CLIPMARK_SIZE = 64;
55 : :
56 : : enum ScShadowPart
57 : : {
58 : : SC_SHADOW_HSTART,
59 : : SC_SHADOW_VSTART,
60 : : SC_SHADOW_HORIZ,
61 : : SC_SHADOW_VERT,
62 : : SC_SHADOW_CORNER
63 : : };
64 : :
65 : 0 : struct ScDataBarInfo
66 : : {
67 : : double mnZero; // 0 to 100
68 : : Color maColor;
69 : : double mnLength; // -100 to 100
70 : : bool mbGradient;
71 : : bool mbShowValue;
72 : : Color maAxisColor;
73 : :
74 : 0 : bool operator==(const ScDataBarInfo& r) const
75 : : {
76 [ # # ]: 0 : if( mnZero != r.mnZero )
77 : 0 : return false;
78 [ # # ]: 0 : if( maColor != r.maColor )
79 : 0 : return false;
80 [ # # ]: 0 : if(mnLength != r.mnLength)
81 : 0 : return false;
82 [ # # ]: 0 : if (mbGradient != r.mbGradient)
83 : 0 : return false;
84 : :
85 : 0 : return true;
86 : : }
87 : :
88 : 0 : bool operator!=(const ScDataBarInfo& r) const
89 : : {
90 : 0 : return !(*this == r);
91 : : }
92 : : };
93 : :
94 : : struct CellInfo
95 : : {
96 : : ScBaseCell* pCell;
97 : :
98 : : const ScPatternAttr* pPatternAttr;
99 : : const SfxItemSet* pConditionSet;
100 : : const Color* pColorScale;
101 : : const ScDataBarInfo* pDataBar;
102 : :
103 : : const SvxBrushItem* pBackground;
104 : :
105 : : const SvxBoxItem* pLinesAttr; /// original item from document.
106 : : const SvxLineItem* mpTLBRLine; /// original item from document.
107 : : const SvxLineItem* mpBLTRLine; /// original item from document.
108 : :
109 : : const SvxShadowItem* pShadowAttr; // original item (internal)
110 : :
111 : : const SvxShadowItem* pHShadowOrigin;
112 : : const SvxShadowItem* pVShadowOrigin;
113 : :
114 : : ScShadowPart eHShadowPart : 4; // shadow effective for drawing
115 : : ScShadowPart eVShadowPart : 4;
116 : : sal_uInt8 nClipMark;
117 : : sal_uInt16 nWidth;
118 : : sal_uInt8 nRotateDir;
119 : :
120 : : sal_Bool bMarked : 1;
121 : : sal_Bool bEmptyCellText : 1;
122 : :
123 : : sal_Bool bMerged : 1;
124 : : sal_Bool bHOverlapped : 1;
125 : : sal_Bool bVOverlapped : 1;
126 : : sal_Bool bAutoFilter : 1;
127 : : sal_Bool bPushButton : 1;
128 : : bool bPopupButton: 1;
129 : : bool bFilterActive:1;
130 : :
131 : : sal_Bool bPrinted : 1; // when required (pagebreak mode)
132 : :
133 : : sal_Bool bHideGrid : 1; // output-internal
134 : : sal_Bool bEditEngine : 1; // output-internal
135 : :
136 : 1448875 : CellInfo():
137 : : pColorScale(NULL),
138 : 1448875 : pDataBar(NULL) {}
139 : :
140 : 1448875 : ~CellInfo()
141 : : {
142 : 1448875 : delete pColorScale;
143 : 1448875 : delete pDataBar;
144 : 1448875 : }
145 : : };
146 : :
147 : : const SCCOL SC_ROTMAX_NONE = SCCOL_MAX;
148 : :
149 : : struct RowInfo
150 : : {
151 : : CellInfo* pCellInfo;
152 : :
153 : : sal_uInt16 nHeight;
154 : : SCROW nRowNo;
155 : : SCCOL nRotMaxCol; // SC_ROTMAX_NONE, if nothing
156 : :
157 : : sal_Bool bEmptyBack;
158 : : sal_Bool bEmptyText;
159 : : sal_Bool bAutoFilter;
160 : : sal_Bool bPushButton;
161 : : sal_Bool bChanged; // TRUE, if not tested
162 : :
163 : 5294080 : inline explicit RowInfo() : pCellInfo( 0 ) {}
164 : :
165 : : private:
166 : : RowInfo( const RowInfo& );
167 : : RowInfo& operator=( const RowInfo& );
168 : : };
169 : :
170 : : struct ScTableInfo
171 : : {
172 : : svx::frame::Array maArray;
173 : : RowInfo* mpRowInfo;
174 : : sal_uInt16 mnArrCount;
175 : : bool mbPageMode;
176 : :
177 : : explicit ScTableInfo();
178 : : ~ScTableInfo();
179 : :
180 : : private:
181 : : ScTableInfo( const ScTableInfo& );
182 : : ScTableInfo& operator=( const ScTableInfo& );
183 : : };
184 : :
185 : : #endif
186 : :
187 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|