Update ooo320-m1
[ooovba.git] / goodies / source / filter.vcl / icgm / chart.hxx
blobbc6d1f976c4ad3c859b1bfdb9a32624e43843ecd
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: chart.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef CGM_CHART_HXX_
32 #define CGM_CHART_HXX_
34 #include <tools/list.hxx>
36 /* FILE TYPE CONSTANTS: */
37 #define NOCHART 0 /* Undefined chart. */
38 #define XYCHART 1 /* Standard XY chart. */
39 #define PIECHART 21 /* Standard pie chart file. */
40 #define ORGCHART 26 /* Standard org chart file. */
41 #define TTLCHART 31 /* Title chart file. */
42 #define BULCHART 32 /* Bullet chart file. */
43 #define TABCHART 33 /* Table chart file. */
44 #define DRWCHART 41 /* Chart with drawings only.*/
45 #define MLTCHART 42 /* Multiple chart file. */
46 #define LASTCHART 45 /* The largest chart type. */
47 #define SHWFILE 46 /* Slide show file. */
48 #define SYMFILE 47 /* Symbol file. */
49 /* the following were added although SPC doesn't have a #define */
50 /* for them... */
51 #define AUTOTTLCHT 95 /* Autobuild TTL CHT */
52 #define AUTOBULCHT 96 /* Autobuild BUL CHT */
53 #define AUTOTABCHT 97 /* Autobuild TAB CHT */
55 /* FNC 10/11/93: for the chart stream, ALLCHART was added. */
56 /* It is used specifically by PPT in its Template to let */
57 /* us know that the template applies to all charts, not to */
58 /* one specific chart type. */
59 #define ALLCHART 127 /* Applies to all chart types */
60 #define ALLCHART_TPL 255 /* Applies to all chart types */
62 #define IOC_CHTTITLE 1 /* Title for any chart. */
63 #define IOC_CHTFOOTNOTE 2 /* ::com::sun::star::text::Footnote for any chart. */
64 #define IOC_XYAXIS 3 /* Axis title for XY charts. */
65 #define IOC_XYSERIESLEGEND 4 /* Series legend titles for XY charts. */
66 #define IOC_PIETITLE 5 /* Title for pie charts. */
67 #define IOC_TABLEBODY 6 /* Table chart text element. */
68 #define IOC_TITLEBODY 7 /* Title chart text element. */
69 #define IOC_BULLETBODY 8 /* Bullet chart text element. */
70 #define IOC_XYLEGENDTITLE 9 /* Legend title for XY charts. */
71 #define IOC_PIELEGENDTITLE 10 /* Legend title for pie charts. */
72 #define IOC_TABLEGENDTITLE 11 /* Legend title for table charts. */
74 typedef struct TextAttribute
76 sal_uInt16 nTextAttribCount;
77 sal_Int8 nTextColorIndex;
78 sal_Int8 nTextColorRed;
79 sal_Int8 nTextColorGreen;
80 sal_Int8 nTextColorBlue;
81 sal_Int8 nShadowColorIndex;
82 sal_Int8 nShadowColorRed;
83 sal_Int8 nShadowColorGreen;
84 sal_Int8 nShadowColorBlue;
85 float nTextAttribSize;
86 sal_uInt16 nTextAttribBits;
87 sal_Int8 nTextFontType; // font identifiers
88 sal_Int8 nTextCharPage;
89 sal_uInt16 nTextFontFamily;
90 sal_Int8 nTextFontMemberID;
91 sal_Int8 nTextFontVendorID;
92 TextAttribute* pNextAttribute; // zero or pointer to next TextAttribute
93 } TextAttribute;
95 typedef struct TextEntry
97 sal_uInt16 nTypeOfText;
98 sal_uInt16 nRowOrLineNum;
99 sal_uInt16 nColumnNum;
100 sal_uInt16 nZoneSize; // textzone attributes
101 sal_uInt16 nLineType;
102 sal_uInt16 nAttributes;
103 char* pText; // null terminated text
104 TextAttribute* pAttribute;
105 } TextEntry;
107 typedef struct ZoneOption
109 char nOverTitle;
110 char nOverBody;
111 char nOverFoot;
112 char nFStyle_Title;
113 char nFStyle_Body;
114 char nFStyle_Foot;
115 char nFOutc_Title;
116 char nFOutc_Body;
117 char nFOutc_Foot;
118 char nFFillc_Title;
119 char nFFillc_Body;
120 char nFFillc_Foot;
121 } ZoneOption;
123 typedef struct BulletOption
125 char nBType;
126 char nBSize;
127 char nBColor;
128 sal_Int16 nBStart;
129 double nTMargin;
130 double nBSpace;
131 char nCPlace;
132 } BulletOption;
134 typedef struct BulDef
136 char btype;
137 char bsize;
138 char bcolor;
139 char bnumber;
140 } BulDef;
142 typedef struct BulletLines
144 BulDef nBulDef[ 48 ];
145 } BulletLines;
147 typedef struct IntSettings
149 sal_uInt16 nCountry;
150 sal_uInt16 nDateFormat;
151 sal_uInt16 nDateSep;
152 sal_uInt16 nTimeFormat;
153 sal_uInt16 nTimeSep;
154 sal_uInt16 nNumSeps;
155 sal_uInt16 nCurrencyFormat;
156 char nCurrencySymbol[ 5 ];
157 } IntSettings;
159 typedef struct PageOrientDim
161 char nOrientation;
162 char nDimension;
163 float nPageX;
164 float nPageY;
165 } PageOrientDim;
167 typedef struct DataNode
169 sal_Int16 nBoxX1;
170 sal_Int16 nBoxY1;
171 sal_Int16 nBoxX2;
172 sal_Int16 nBoxY2;
173 sal_Int8 nZoneEnum;
174 } DataNode;
176 typedef struct ChartZone
178 sal_Int16 nMinX;
179 sal_Int16 nMinY;
180 sal_Int16 nMaxX;
181 sal_Int16 nMaxY;
182 char nUserDef;
183 char nPad1;
184 } ChartZone;
186 class CGM;
187 class CGMImpressOutAct;
188 class CGMChart
190 friend class CGM;
191 friend class CGMImpressOutAct;
193 protected:
194 CGM* mpCGM;
195 sal_Int8 mnCurrentFileType;
196 List maTextEntryList;
197 DataNode mDataNode[ 7 ];
198 ChartZone mChartZone;
199 PageOrientDim mPageOrientDim;
200 BulletOption mBulletOption;
201 BulletLines mBulletLines;
202 ZoneOption mZoneOption;
203 IntSettings mIntSettings;
205 public:
206 CGMChart( CGM& rCGM );
207 ~CGMChart();
209 void DeleteTextEntry( TextEntry* );
210 void InsertTextEntry( TextEntry* );
212 void ResetAnnotation();
213 sal_Bool IsAnnotation();
216 #endif