bump product version to 4.1.6.2
[LibreOffice.git] / filter / source / graphicfilter / icgm / chart.hxx
blobb7dd7f8d524c8cf9314ddc0fedbc58223a29a266
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 CGM_CHART_HXX_
21 #define CGM_CHART_HXX_
23 /* FILE TYPE CONSTANTS: */
24 #define NOCHART 0 /* Undefined chart. */
25 #define XYCHART 1 /* Standard XY chart. */
26 #define PIECHART 21 /* Standard pie chart file. */
27 #define ORGCHART 26 /* Standard org chart file. */
28 #define TTLCHART 31 /* Title chart file. */
29 #define BULCHART 32 /* Bullet chart file. */
30 #define TABCHART 33 /* Table chart file. */
31 #define DRWCHART 41 /* Chart with drawings only.*/
32 #define MLTCHART 42 /* Multiple chart file. */
33 #define LASTCHART 45 /* The largest chart type. */
34 #define SHWFILE 46 /* Slide show file. */
35 #define SYMFILE 47 /* Symbol file. */
36 /* the following were added although SPC doesn't have a #define */
37 /* for them... */
38 #define AUTOTTLCHT 95 /* Autobuild TTL CHT */
39 #define AUTOBULCHT 96 /* Autobuild BUL CHT */
40 #define AUTOTABCHT 97 /* Autobuild TAB CHT */
42 /* FNC 10/11/93: for the chart stream, ALLCHART was added. */
43 /* It is used specifically by PPT in its Template to let */
44 /* us know that the template applies to all charts, not to */
45 /* one specific chart type. */
46 #define ALLCHART 127 /* Applies to all chart types */
47 #define ALLCHART_TPL 255 /* Applies to all chart types */
49 #define IOC_CHTTITLE 1 /* Title for any chart. */
50 #define IOC_CHTFOOTNOTE 2 /* ::com::sun::star::text::Footnote for any chart. */
51 #define IOC_XYAXIS 3 /* Axis title for XY charts. */
52 #define IOC_XYSERIESLEGEND 4 /* Series legend titles for XY charts. */
53 #define IOC_PIETITLE 5 /* Title for pie charts. */
54 #define IOC_TABLEBODY 6 /* Table chart text element. */
55 #define IOC_TITLEBODY 7 /* Title chart text element. */
56 #define IOC_BULLETBODY 8 /* Bullet chart text element. */
57 #define IOC_XYLEGENDTITLE 9 /* Legend title for XY charts. */
58 #define IOC_PIELEGENDTITLE 10 /* Legend title for pie charts. */
59 #define IOC_TABLEGENDTITLE 11 /* Legend title for table charts. */
61 typedef struct TextAttribute
63 sal_uInt16 nTextAttribCount;
64 sal_Int8 nTextColorIndex;
65 sal_Int8 nTextColorRed;
66 sal_Int8 nTextColorGreen;
67 sal_Int8 nTextColorBlue;
68 sal_Int8 nShadowColorIndex;
69 sal_Int8 nShadowColorRed;
70 sal_Int8 nShadowColorGreen;
71 sal_Int8 nShadowColorBlue;
72 float nTextAttribSize;
73 sal_uInt16 nTextAttribBits;
74 sal_Int8 nTextFontType; // font identifiers
75 sal_Int8 nTextCharPage;
76 sal_uInt16 nTextFontFamily;
77 sal_Int8 nTextFontMemberID;
78 sal_Int8 nTextFontVendorID;
79 TextAttribute* pNextAttribute; // zero or pointer to next TextAttribute
80 } TextAttribute;
82 typedef struct TextEntry
84 sal_uInt16 nTypeOfText;
85 sal_uInt16 nRowOrLineNum;
86 sal_uInt16 nColumnNum;
87 sal_uInt16 nZoneSize; // textzone attributes
88 sal_uInt16 nLineType;
89 sal_uInt16 nAttributes;
90 char* pText; // null terminated text
91 TextAttribute* pAttribute;
92 } TextEntry;
94 typedef struct ZoneOption
96 char nOverTitle;
97 char nOverBody;
98 char nOverFoot;
99 char nFStyle_Title;
100 char nFStyle_Body;
101 char nFStyle_Foot;
102 char nFOutc_Title;
103 char nFOutc_Body;
104 char nFOutc_Foot;
105 char nFFillc_Title;
106 char nFFillc_Body;
107 char nFFillc_Foot;
108 } ZoneOption;
110 typedef struct BulletOption
112 char nBType;
113 char nBSize;
114 char nBColor;
115 sal_Int16 nBStart;
116 double nTMargin;
117 double nBSpace;
118 char nCPlace;
119 } BulletOption;
121 typedef struct BulDef
123 char btype;
124 char bsize;
125 char bcolor;
126 char bnumber;
127 } BulDef;
129 typedef struct BulletLines
131 BulDef nBulDef[ 48 ];
132 } BulletLines;
134 typedef struct IntSettings
136 sal_uInt16 nCountry;
137 sal_uInt16 nDateFormat;
138 sal_uInt16 nDateSep;
139 sal_uInt16 nTimeFormat;
140 sal_uInt16 nTimeSep;
141 sal_uInt16 nNumSeps;
142 sal_uInt16 nCurrencyFormat;
143 char nCurrencySymbol[ 5 ];
144 } IntSettings;
146 typedef struct PageOrientDim
148 char nOrientation;
149 char nDimension;
150 float nPageX;
151 float nPageY;
152 } PageOrientDim;
154 typedef struct DataNode
156 sal_Int16 nBoxX1;
157 sal_Int16 nBoxY1;
158 sal_Int16 nBoxX2;
159 sal_Int16 nBoxY2;
160 sal_Int8 nZoneEnum;
161 } DataNode;
163 typedef struct ChartZone
165 sal_Int16 nMinX;
166 sal_Int16 nMinY;
167 sal_Int16 nMaxX;
168 sal_Int16 nMaxY;
169 char nUserDef;
170 char nPad1;
171 } ChartZone;
173 class CGM;
174 class CGMImpressOutAct;
175 class CGMChart
177 friend class CGM;
178 friend class CGMImpressOutAct;
180 protected:
181 CGM* mpCGM;
182 sal_Int8 mnCurrentFileType;
183 ::std::vector< TextEntry* > maTextEntryList;
184 DataNode mDataNode[ 7 ];
185 ChartZone mChartZone;
186 PageOrientDim mPageOrientDim;
187 BulletOption mBulletOption;
188 BulletLines mBulletLines;
189 ZoneOption mZoneOption;
190 IntSettings mIntSettings;
192 public:
193 CGMChart( CGM& rCGM );
194 ~CGMChart();
196 void DeleteTextEntry( TextEntry* );
197 void InsertTextEntry( TextEntry* );
199 void ResetAnnotation();
200 sal_Bool IsAnnotation();
203 #endif
205 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */