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_FILTER_SOURCE_GRAPHICFILTER_ICGM_CHART_HXX
21 : #define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_CHART_HXX
22 :
23 : /* FILE TYPE CONSTANTS: */
24 : #define BULCHART 32 /* Bullet chart file. */
25 : /* the following were added although SPC doesn't have a #define */
26 : /* for them... */
27 : #define AUTOTTLCHT 95 /* Autobuild TTL CHT */
28 : #define AUTOBULCHT 96 /* Autobuild BUL CHT */
29 : #define AUTOTABCHT 97 /* Autobuild TAB CHT */
30 :
31 : /* FNC 10/11/93: for the chart stream, ALLCHART was added. */
32 : /* It is used specifically by PPT in its Template to let */
33 : /* us know that the template applies to all charts, not to */
34 : /* one specific chart type. */
35 : #define ALLCHART 127 /* Applies to all chart types */
36 : #define ALLCHART_TPL 255 /* Applies to all chart types */
37 :
38 : typedef struct TextAttribute
39 : {
40 : sal_uInt16 nTextAttribCount;
41 : sal_Int8 nTextColorIndex;
42 : sal_Int8 nTextColorRed;
43 : sal_Int8 nTextColorGreen;
44 : sal_Int8 nTextColorBlue;
45 : sal_Int8 nShadowColorIndex;
46 : sal_Int8 nShadowColorRed;
47 : sal_Int8 nShadowColorGreen;
48 : sal_Int8 nShadowColorBlue;
49 : float nTextAttribSize;
50 : sal_uInt16 nTextAttribBits;
51 : sal_Int8 nTextFontType; // font identifiers
52 : sal_Int8 nTextCharPage;
53 : sal_uInt16 nTextFontFamily;
54 : sal_Int8 nTextFontMemberID;
55 : sal_Int8 nTextFontVendorID;
56 : TextAttribute* pNextAttribute; // zero or pointer to next TextAttribute
57 : } TextAttribute;
58 :
59 : typedef struct TextEntry
60 : {
61 : sal_uInt16 nTypeOfText;
62 : sal_uInt16 nRowOrLineNum;
63 : sal_uInt16 nColumnNum;
64 : sal_uInt16 nZoneSize; // textzone attributes
65 : sal_uInt16 nLineType;
66 : sal_uInt16 nAttributes;
67 : char* pText; // null terminated text
68 : TextAttribute* pAttribute;
69 : } TextEntry;
70 :
71 : struct ZoneOption
72 : {
73 : char nOverTitle;
74 : char nOverBody;
75 : char nOverFoot;
76 : char nFStyle_Title;
77 : char nFStyle_Body;
78 : char nFStyle_Foot;
79 : char nFOutc_Title;
80 : char nFOutc_Body;
81 : char nFOutc_Foot;
82 : char nFFillc_Title;
83 : char nFFillc_Body;
84 : char nFFillc_Foot;
85 0 : ZoneOption()
86 : : nOverTitle(0)
87 : , nOverBody(0)
88 : , nOverFoot(0)
89 : , nFStyle_Title(0)
90 : , nFStyle_Body(0)
91 : , nFStyle_Foot(0)
92 : , nFOutc_Title(0)
93 : , nFOutc_Body(0)
94 : , nFOutc_Foot(0)
95 : , nFFillc_Title(0)
96 : , nFFillc_Body(0)
97 0 : , nFFillc_Foot(0)
98 : {
99 0 : }
100 : };
101 :
102 : struct BulletOption
103 : {
104 : char nBType;
105 : char nBSize;
106 : char nBColor;
107 : sal_Int16 nBStart;
108 : double nTMargin;
109 : double nBSpace;
110 : char nCPlace;
111 0 : BulletOption()
112 : : nBType(0)
113 : , nBSize(0)
114 : , nBColor(0)
115 : , nBStart(0)
116 : , nTMargin(0)
117 : , nBSpace(0)
118 0 : , nCPlace(0)
119 : {
120 0 : }
121 : };
122 :
123 : struct BulDef
124 : {
125 : char btype;
126 : char bsize;
127 : char bcolor;
128 : char bnumber;
129 0 : BulDef()
130 : : btype(0)
131 : , bsize(0)
132 : , bcolor(0)
133 0 : , bnumber(0)
134 : {
135 0 : }
136 : };
137 :
138 0 : typedef struct BulletLines
139 : {
140 : BulDef nBulDef[ 48 ];
141 : } BulletLines;
142 :
143 : struct IntSettings
144 : {
145 : sal_uInt16 nCountry;
146 : sal_uInt16 nDateFormat;
147 : sal_uInt16 nDateSep;
148 : sal_uInt16 nTimeFormat;
149 : sal_uInt16 nTimeSep;
150 : sal_uInt16 nNumSeps;
151 : sal_uInt16 nCurrencyFormat;
152 : char nCurrencySymbol[ 5 ];
153 0 : IntSettings()
154 : : nCountry(0)
155 : , nDateFormat(0)
156 : , nDateSep(0)
157 : , nTimeFormat(0)
158 : , nTimeSep(0)
159 : , nNumSeps(0)
160 0 : , nCurrencyFormat(0)
161 : {
162 0 : memset (nCurrencySymbol, 0, sizeof(nCurrencySymbol));
163 0 : }
164 : };
165 :
166 : struct PageOrientDim
167 : {
168 : char nOrientation;
169 : char nDimension;
170 : float nPageX;
171 : float nPageY;
172 0 : PageOrientDim()
173 : : nOrientation(0)
174 : , nDimension(0)
175 : , nPageX(0.0)
176 0 : , nPageY(0.0)
177 : {
178 0 : }
179 : };
180 :
181 : struct DataNode
182 : {
183 : sal_Int16 nBoxX1;
184 : sal_Int16 nBoxY1;
185 : sal_Int16 nBoxX2;
186 : sal_Int16 nBoxY2;
187 : sal_Int8 nZoneEnum;
188 0 : DataNode()
189 : : nBoxX1(0)
190 : , nBoxY1(0)
191 : , nBoxX2(0)
192 : , nBoxY2(0)
193 0 : , nZoneEnum(0)
194 : {
195 0 : }
196 : };
197 :
198 : struct ChartZone
199 : {
200 : sal_Int16 nMinX;
201 : sal_Int16 nMinY;
202 : sal_Int16 nMaxX;
203 : sal_Int16 nMaxY;
204 : char nUserDef;
205 : char nPad1;
206 0 : ChartZone()
207 : : nMinX(0)
208 : , nMinY(0)
209 : , nMaxX(0)
210 : , nMaxY(0)
211 : , nUserDef(0)
212 0 : , nPad1(0)
213 : {
214 0 : }
215 : };
216 :
217 : class CGM;
218 : class CGMImpressOutAct;
219 : class CGMChart
220 : {
221 : friend class CGM;
222 : friend class CGMImpressOutAct;
223 :
224 : protected:
225 : CGM* mpCGM;
226 : sal_Int8 mnCurrentFileType;
227 : ::std::vector< TextEntry* > maTextEntryList;
228 : DataNode mDataNode[ 7 ];
229 : ChartZone mChartZone;
230 : PageOrientDim mPageOrientDim;
231 : BulletOption mBulletOption;
232 : BulletLines mBulletLines;
233 : ZoneOption mZoneOption;
234 : IntSettings mIntSettings;
235 :
236 : public:
237 : CGMChart( CGM& rCGM );
238 : ~CGMChart();
239 :
240 : void DeleteTextEntry( TextEntry* );
241 : void InsertTextEntry( TextEntry* );
242 :
243 : void ResetAnnotation();
244 : bool IsAnnotation();
245 : };
246 :
247 : #endif
248 :
249 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|