1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 */
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
82 typedef struct TextEntry
84 sal_uInt16 nTypeOfText
;
85 sal_uInt16 nRowOrLineNum
;
86 sal_uInt16 nColumnNum
;
87 sal_uInt16 nZoneSize
; // textzone attributes
89 sal_uInt16 nAttributes
;
90 char* pText
; // null terminated text
91 TextAttribute
* pAttribute
;
94 typedef struct ZoneOption
110 typedef struct BulletOption
121 typedef struct BulDef
129 typedef struct BulletLines
131 BulDef nBulDef
[ 48 ];
134 typedef struct IntSettings
137 sal_uInt16 nDateFormat
;
139 sal_uInt16 nTimeFormat
;
142 sal_uInt16 nCurrencyFormat
;
143 char nCurrencySymbol
[ 5 ];
146 typedef struct PageOrientDim
154 typedef struct DataNode
163 typedef struct ChartZone
174 class CGMImpressOutAct
;
178 friend class CGMImpressOutAct
;
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
;
193 CGMChart( CGM
& rCGM
);
196 void DeleteTextEntry( TextEntry
* );
197 void InsertTextEntry( TextEntry
* );
199 void ResetAnnotation();
200 sal_Bool
IsAnnotation();
205 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */