1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: chart.hxx,v $
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 */
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
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
;
107 typedef struct ZoneOption
123 typedef struct BulletOption
134 typedef struct BulDef
142 typedef struct BulletLines
144 BulDef nBulDef
[ 48 ];
147 typedef struct IntSettings
150 sal_uInt16 nDateFormat
;
152 sal_uInt16 nTimeFormat
;
155 sal_uInt16 nCurrencyFormat
;
156 char nCurrencySymbol
[ 5 ];
159 typedef struct PageOrientDim
167 typedef struct DataNode
176 typedef struct ChartZone
187 class CGMImpressOutAct
;
191 friend class CGMImpressOutAct
;
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
;
206 CGMChart( CGM
& rCGM
);
209 void DeleteTextEntry( TextEntry
* );
210 void InsertTextEntry( TextEntry
* );
212 void ResetAnnotation();
213 sal_Bool
IsAnnotation();