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 INCLUDED_SC_SOURCE_FILTER_INC_XLCHART_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_XLCHART_HXX
23 #include <tools/gen.hxx>
24 #include "fapihelper.hxx"
28 namespace com
{ namespace sun
{ namespace star
{
29 namespace container
{ class XNameContainer
; }
30 namespace lang
{ class XMultiServiceFactory
; }
31 namespace chart
{ class XChartDocument
; }
32 namespace chart2
{ class XChartDocument
; }
33 namespace drawing
{ class XShape
; }
38 // Property names =============================================================
41 #define SERVICE_DRAWING_BITMAPTABLE "com.sun.star.drawing.BitmapTable"
42 #define SERVICE_DRAWING_DASHTABLE "com.sun.star.drawing.DashTable"
43 #define SERVICE_DRAWING_GRADIENTTABLE "com.sun.star.drawing.GradientTable"
44 #define SERVICE_DRAWING_HATCHTABLE "com.sun.star.drawing.HatchTable"
46 #define SERVICE_CHART2_AXIS "com.sun.star.chart2.Axis"
47 #define SERVICE_CHART2_DATAPROVIDER "com.sun.star.chart2.data.DataProvider"
48 #define SERVICE_CHART2_DATASERIES "com.sun.star.chart2.DataSeries"
49 #define SERVICE_CHART2_DIAGRAM "com.sun.star.chart2.Diagram"
50 #define SERVICE_CHART2_ERRORBAR "com.sun.star.chart2.ErrorBar"
51 #define SERVICE_CHART2_LEGEND "com.sun.star.chart2.Legend"
52 #define SERVICE_CHART2_TITLE "com.sun.star.chart2.Title"
55 #define EXC_CHPROP_ADDITIONALSHAPES "AdditionalShapes"
56 #define EXC_CHPROP_ANCHORPOSITION "AnchorPosition"
57 #define EXC_CHPROP_ARRANGEORDER "ArrangeOrder"
58 #define EXC_CHPROP_ATTAXISINDEX "AttachedAxisIndex"
59 #define EXC_CHPROP_ATTRIBDATAPOINTS "AttributedDataPoints"
60 #define EXC_CHPROP_BLACKDAY "BlackDay"
61 #define EXC_CHPROP_COLOR "Color"
62 #define EXC_CHPROP_CONNECTBARS "ConnectBars"
63 #define EXC_CHPROP_CROSSOVERPOSITION "CrossoverPosition"
64 #define EXC_CHPROP_CROSSOVERVALUE "CrossoverValue"
65 #define EXC_CHPROP_CURVESTYLE "CurveStyle"
66 #define EXC_CHPROP_CURVENAME "CurveName"
67 #define EXC_CHPROP_D3DSCENEAMBIENTCOLOR "D3DSceneAmbientColor"
68 #define EXC_CHPROP_D3DSCENELIGHTON1 "D3DSceneLightOn1"
69 #define EXC_CHPROP_D3DSCENELIGHTCOLOR2 "D3DSceneLightColor2"
70 #define EXC_CHPROP_D3DSCENELIGHTDIR2 "D3DSceneLightDirection2"
71 #define EXC_CHPROP_D3DSCENELIGHTON2 "D3DSceneLightOn2"
72 #define EXC_CHPROP_D3DSCENEPERSPECTIVE "D3DScenePerspective"
73 #define EXC_CHPROP_D3DSCENESHADEMODE "D3DSceneShadeMode"
74 #define EXC_CHPROP_DISPLAYLABELS "DisplayLabels"
75 #define EXC_CHPROP_ERRORBARSTYLE "ErrorBarStyle"
76 #define EXC_CHPROP_ERRORBARX "ErrorBarX"
77 #define EXC_CHPROP_ERRORBARY "ErrorBarY"
78 #define EXC_CHPROP_EXPANSION "Expansion"
79 #define EXC_CHPROP_EXPTIMEINCREMENT "ExplicitTimeIncrement"
80 #define EXC_CHPROP_EXTRAPOLATE_FORWARD "ExtrapolateForward"
81 #define EXC_CHPROP_EXTRAPOLATE_BACKWARD "ExtrapolateBackward"
82 #define EXC_CHPROP_FORCE_INTERCEPT "ForceIntercept"
83 #define EXC_CHPROP_GAPWIDTHSEQ "GapwidthSequence"
84 #define EXC_CHPROP_GEOMETRY3D "Geometry3D"
85 #define EXC_CHPROP_INCLUDEHIDDENCELLS "IncludeHiddenCells"
86 #define EXC_CHPROP_INTERCEPT_VALUE "InterceptValue"
87 #define EXC_CHPROP_JAPANESE "Japanese"
88 #define EXC_CHPROP_LABEL "Label"
89 #define EXC_CHPROP_LABELPLACEMENT "LabelPlacement"
90 #define EXC_CHPROP_LABELPOSITION "LabelPosition"
91 #define EXC_CHPROP_LABELSEPARATOR "LabelSeparator"
92 #define EXC_CHPROP_MAJORTICKS "MajorTickmarks"
93 #define EXC_CHPROP_MARKPOSITION "MarkPosition"
94 #define EXC_CHPROP_MINORTICKS "MinorTickmarks"
95 #define EXC_CHPROP_MISSINGVALUETREATMENT "MissingValueTreatment"
96 #define EXC_CHPROP_MOVING_AVERAGE_PERIOD "MovingAveragePeriod"
97 #define EXC_CHPROP_NEGATIVEERROR "NegativeError"
98 #define EXC_CHPROP_NUMBERFORMAT "NumberFormat"
99 #define EXC_CHPROP_OFFSET "Offset"
100 #define EXC_CHPROP_OVERLAPSEQ "OverlapSequence"
101 #define EXC_CHPROP_PERCENTAGENUMFMT "PercentageNumberFormat"
102 #define EXC_CHPROP_PERCENTDIAGONAL "PercentDiagonal"
103 #define EXC_CHPROP_PERSPECTIVE "Perspective"
104 #define EXC_CHPROP_POSITIVEERROR "PositiveError"
105 #define EXC_CHPROP_POLYNOMIAL_DEGREE "PolynomialDegree"
106 #define EXC_CHPROP_RELATIVEPOSITION "RelativePosition"
107 #define EXC_CHPROP_RELATIVESIZE "RelativeSize"
108 #define EXC_CHPROP_RIGHTANGLEDAXES "RightAngledAxes"
109 #define EXC_CHPROP_ROLE "Role"
110 #define EXC_CHPROP_ROTATIONHORIZONTAL "RotationHorizontal"
111 #define EXC_CHPROP_ROTATIONVERTICAL "RotationVertical"
112 #define EXC_CHPROP_3DRELATIVEHEIGHT "3DRelativeHeight"
113 #define EXC_CHPROP_SHOW "Show"
114 #define EXC_CHPROP_SHOWCORRELATION "ShowCorrelationCoefficient"
115 #define EXC_CHPROP_SHOWEQUATION "ShowEquation"
116 #define EXC_CHPROP_SHOWFIRST "ShowFirst"
117 #define EXC_CHPROP_SHOWHIGHLOW "ShowHighLow"
118 #define EXC_CHPROP_SHOWNEGATIVEERROR "ShowNegativeError"
119 #define EXC_CHPROP_SHOWPOSITIVEERROR "ShowPositiveError"
120 #define EXC_CHPROP_STACKCHARACTERS "StackCharacters"
121 #define EXC_CHPROP_STACKINGDIR "StackingDirection"
122 #define EXC_CHPROP_STARTINGANGLE "StartingAngle"
123 #define EXC_CHPROP_SWAPXANDYAXIS "SwapXAndYAxis"
124 #define EXC_CHPROP_SYMBOL "Symbol"
125 #define EXC_CHPROP_TEXTBREAK "TextBreak"
126 #define EXC_CHPROP_TEXTOVERLAP "TextOverlap"
127 #define EXC_CHPROP_TEXTROTATION "TextRotation"
128 #define EXC_CHPROP_USERINGS "UseRings"
129 #define EXC_CHPROP_VARYCOLORSBY "VaryColorsByPoint"
130 #define EXC_CHPROP_WEIGHT "Weight"
131 #define EXC_CHPROP_WHITEDAY "WhiteDay"
134 #define EXC_CHPROP_ROLE_CATEG "categories"
135 #define EXC_CHPROP_ROLE_ERRORBARS_NEGX "error-bars-x-negative"
136 #define EXC_CHPROP_ROLE_ERRORBARS_NEGY "error-bars-y-negative"
137 #define EXC_CHPROP_ROLE_ERRORBARS_POSX "error-bars-x-positive"
138 #define EXC_CHPROP_ROLE_ERRORBARS_POSY "error-bars-y-positive"
139 #define EXC_CHPROP_ROLE_LABEL "label"
140 #define EXC_CHPROP_ROLE_XVALUES "values-x"
141 #define EXC_CHPROP_ROLE_YVALUES "values-y"
142 #define EXC_CHPROP_ROLE_OPENVALUES "values-first"
143 #define EXC_CHPROP_ROLE_CLOSEVALUES "values-last"
144 #define EXC_CHPROP_ROLE_LOWVALUES "values-min"
145 #define EXC_CHPROP_ROLE_HIGHVALUES "values-max"
146 #define EXC_CHPROP_ROLE_SIZEVALUES "values-size"
148 // Constants and Enumerations =================================================
150 const sal_Size EXC_CHART_PROGRESS_SIZE
= 10;
151 const sal_uInt16 EXC_CHART_AUTOROTATION
= 0xFFFF; /// Automatic rotation, e.g. axis labels (internal use only).
153 const sal_Int32 EXC_CHART_AXIS_NONE
= -1; /// For internal use only.
154 const sal_Int32 EXC_CHART_AXIS_X
= 0; /// API X axis index.
155 const sal_Int32 EXC_CHART_AXIS_Y
= 1; /// API Y axis index.
156 const sal_Int32 EXC_CHART_AXIS_Z
= 2; /// API Z axis index.
157 const sal_Int32 EXC_CHART_AXESSET_NONE
= -1; /// For internal use only.
158 const sal_Int32 EXC_CHART_AXESSET_PRIMARY
= 0; /// API primary axes set index.
159 const sal_Int32 EXC_CHART_AXESSET_SECONDARY
= 1; /// API secondary axes set index.
161 const sal_Int32 EXC_CHART_TOTALUNITS
= 4000; /// Most chart objects are positioned in 1/4000 of chart area.
162 const sal_Int32 EXC_CHART_PLOTAREAUNITS
= 1000; /// For objects that are positioned in 1/1000 of plot area.
164 // (0x0850) CHFRINFO ----------------------------------------------------------
166 const sal_uInt16 EXC_ID_CHFRINFO
= 0x0850;
168 const sal_uInt8 EXC_CHFRINFO_EXCEL2000
= 9;
169 const sal_uInt8 EXC_CHFRINFO_EXCELXP2003
= 10;
170 const sal_uInt8 EXC_CHFRINFO_EXCEL2007
= 11;
172 // (0x0852, 0x0853) CHFRBLOCKBEGIN, CHFRBLOCKEND ------------------------------
174 const sal_uInt16 EXC_ID_CHFRBLOCKBEGIN
= 0x0852;
175 const sal_uInt16 EXC_ID_CHFRBLOCKEND
= 0x0853;
177 const sal_uInt16 EXC_CHFRBLOCK_TYPE_AXESSET
= 0;
178 const sal_uInt16 EXC_CHFRBLOCK_TYPE_TEXT
= 2;
179 const sal_uInt16 EXC_CHFRBLOCK_TYPE_AXIS
= 4;
180 const sal_uInt16 EXC_CHFRBLOCK_TYPE_TYPEGROUP
= 5;
181 const sal_uInt16 EXC_CHFRBLOCK_TYPE_DATATABLE
= 6;
182 const sal_uInt16 EXC_CHFRBLOCK_TYPE_FRAME
= 7;
183 const sal_uInt16 EXC_CHFRBLOCK_TYPE_LEGEND
= 9;
184 const sal_uInt16 EXC_CHFRBLOCK_TYPE_LEGENDEX
= 10;
185 const sal_uInt16 EXC_CHFRBLOCK_TYPE_SERIES
= 12;
186 const sal_uInt16 EXC_CHFRBLOCK_TYPE_CHART
= 13;
187 const sal_uInt16 EXC_CHFRBLOCK_TYPE_DATAFORMAT
= 14;
188 const sal_uInt16 EXC_CHFRBLOCK_TYPE_DROPBAR
= 15;
189 const sal_uInt16 EXC_CHFRBLOCK_TYPE_UNKNOWN
= 0xFFFF; /// For internal use only.
191 const sal_uInt16 EXC_CHFRBLOCK_TEXT_TITLE
= 0;
192 const sal_uInt16 EXC_CHFRBLOCK_TEXT_DEFTEXT
= 2;
193 const sal_uInt16 EXC_CHFRBLOCK_TEXT_AXISTITLE
= 4;
194 const sal_uInt16 EXC_CHFRBLOCK_TEXT_DATALABEL
= 5;
196 const sal_uInt16 EXC_CHFRBLOCK_FRAME_STANDARD
= 0;
197 const sal_uInt16 EXC_CHFRBLOCK_FRAME_PLOTFRAME
= 1;
198 const sal_uInt16 EXC_CHFRBLOCK_FRAME_BACKGROUND
= 2;
200 // (0x086B) CHFRLABELPROPS ----------------------------------------------------
202 const sal_uInt16 EXC_ID_CHFRLABELPROPS
= 0x086B;
204 const sal_uInt16 EXC_CHFRLABELPROPS_SHOWSERIES
= 0x0001;
205 const sal_uInt16 EXC_CHFRLABELPROPS_SHOWCATEG
= 0x0002;
206 const sal_uInt16 EXC_CHFRLABELPROPS_SHOWVALUE
= 0x0004;
207 const sal_uInt16 EXC_CHFRLABELPROPS_SHOWPERCENT
= 0x0008;
208 const sal_uInt16 EXC_CHFRLABELPROPS_SHOWBUBBLE
= 0x0010;
210 // (0x1001) CHUNITS -----------------------------------------------------------
212 const sal_uInt16 EXC_ID_CHUNITS
= 0x1001;
214 const sal_uInt16 EXC_CHUNITS_TWIPS
= 0;
215 const sal_uInt16 EXC_CHUNITS_PIXELS
= 1;
217 // (0x1002) CHCHART -----------------------------------------------------------
219 const sal_uInt16 EXC_ID_CHCHART
= 0x1002;
221 // (0x1003) CHSERIES ----------------------------------------------------------
223 const sal_uInt16 EXC_ID_CHSERIES
= 0x1003;
225 const sal_uInt16 EXC_CHSERIES_DATE
= 0;
226 const sal_uInt16 EXC_CHSERIES_NUMERIC
= 1;
227 const sal_uInt16 EXC_CHSERIES_SEQUENCE
= 2;
228 const sal_uInt16 EXC_CHSERIES_TEXT
= 3;
230 const sal_uInt16 EXC_CHSERIES_MAXSERIES
= 255; /// Maximum valid series index.
231 const sal_uInt16 EXC_CHSERIES_INVALID
= 0xFFFF; /// Invalid series index (for internal use).
233 // (0x1006) CHDATAFORMAT ------------------------------------------------------
235 const sal_uInt16 EXC_ID_CHDATAFORMAT
= 0x1006;
237 const sal_uInt16 EXC_CHDATAFORMAT_MAXPOINTCOUNT
= 32000; /// Maximum number of data points.
238 const sal_uInt16 EXC_CHDATAFORMAT_DEFAULT
= 0xFFFD; /// As format index: global default for an axes set.
239 const sal_uInt16 EXC_CHDATAFORMAT_UNKNOWN
= 0xFFFE; /// As point index: unknown format, don't use.
240 const sal_uInt16 EXC_CHDATAFORMAT_ALLPOINTS
= 0xFFFF; /// As point index: default for a series.
242 const sal_uInt16 EXC_CHDATAFORMAT_OLDCOLORS
= 0x0001;
244 // (0x1007) CHLINEFORMAT ------------------------------------------------------
246 const sal_uInt16 EXC_ID_CHLINEFORMAT
= 0x1007;
248 const sal_uInt16 EXC_CHLINEFORMAT_SOLID
= 0;
249 const sal_uInt16 EXC_CHLINEFORMAT_DASH
= 1;
250 const sal_uInt16 EXC_CHLINEFORMAT_DOT
= 2;
251 const sal_uInt16 EXC_CHLINEFORMAT_DASHDOT
= 3;
252 const sal_uInt16 EXC_CHLINEFORMAT_DASHDOTDOT
= 4;
253 const sal_uInt16 EXC_CHLINEFORMAT_NONE
= 5;
254 const sal_uInt16 EXC_CHLINEFORMAT_DARKTRANS
= 6;
255 const sal_uInt16 EXC_CHLINEFORMAT_MEDTRANS
= 7;
256 const sal_uInt16 EXC_CHLINEFORMAT_LIGHTTRANS
= 8;
258 const sal_Int16 EXC_CHLINEFORMAT_HAIR
= -1;
259 const sal_Int16 EXC_CHLINEFORMAT_SINGLE
= 0;
260 const sal_Int16 EXC_CHLINEFORMAT_DOUBLE
= 1;
261 const sal_Int16 EXC_CHLINEFORMAT_TRIPLE
= 2;
263 const sal_uInt16 EXC_CHLINEFORMAT_AUTO
= 0x0001;
264 const sal_uInt16 EXC_CHLINEFORMAT_SHOWAXIS
= 0x0004;
266 // (0x1009) CHMARKERFORMAT ----------------------------------------------------
268 const sal_uInt16 EXC_ID_CHMARKERFORMAT
= 0x1009;
270 const sal_uInt16 EXC_CHMARKERFORMAT_NOSYMBOL
= 0;
271 const sal_uInt16 EXC_CHMARKERFORMAT_SQUARE
= 1;
272 const sal_uInt16 EXC_CHMARKERFORMAT_DIAMOND
= 2;
273 const sal_uInt16 EXC_CHMARKERFORMAT_TRIANGLE
= 3;
274 const sal_uInt16 EXC_CHMARKERFORMAT_CROSS
= 4;
275 const sal_uInt16 EXC_CHMARKERFORMAT_STAR
= 5;
276 const sal_uInt16 EXC_CHMARKERFORMAT_DOWJ
= 6;
277 const sal_uInt16 EXC_CHMARKERFORMAT_STDDEV
= 7;
278 const sal_uInt16 EXC_CHMARKERFORMAT_CIRCLE
= 8;
279 const sal_uInt16 EXC_CHMARKERFORMAT_PLUS
= 9;
281 const sal_uInt32 EXC_CHMARKERFORMAT_HAIRSIZE
= 60; /// Automatic symbol size for hair lines.
282 const sal_uInt32 EXC_CHMARKERFORMAT_SINGLESIZE
= 100; /// Automatic symbol size for single lines.
283 const sal_uInt32 EXC_CHMARKERFORMAT_DOUBLESIZE
= 140; /// Automatic symbol size for double lines.
284 const sal_uInt32 EXC_CHMARKERFORMAT_TRIPLESIZE
= 180; /// Automatic symbol size for triple lines.
286 const sal_uInt16 EXC_CHMARKERFORMAT_AUTO
= 0x0001;
287 const sal_uInt16 EXC_CHMARKERFORMAT_NOFILL
= 0x0010;
288 const sal_uInt16 EXC_CHMARKERFORMAT_NOLINE
= 0x0020;
290 // (0x100A) CHAREAFORMAT ------------------------------------------------------
292 const sal_uInt16 EXC_ID_CHAREAFORMAT
= 0x100A;
294 const sal_uInt16 EXC_CHAREAFORMAT_AUTO
= 0x0001;
295 const sal_uInt16 EXC_CHAREAFORMAT_INVERTNEG
= 0x0002;
297 // (0x100B) CHPIEFORMAT -------------------------------------------------------
299 const sal_uInt16 EXC_ID_CHPIEFORMAT
= 0x100B;
301 // (0x100C) CHATTACHEDLABEL ---------------------------------------------------
303 const sal_uInt16 EXC_ID_CHATTACHEDLABEL
= 0x100C;
305 const sal_uInt16 EXC_CHATTLABEL_SHOWVALUE
= 0x0001;
306 const sal_uInt16 EXC_CHATTLABEL_SHOWPERCENT
= 0x0002;
307 const sal_uInt16 EXC_CHATTLABEL_SHOWCATEGPERC
= 0x0004;
308 const sal_uInt16 EXC_CHATTLABEL_SMOOTHED
= 0x0008; /// Smoothed line.
309 const sal_uInt16 EXC_CHATTLABEL_SHOWCATEG
= 0x0010;
310 const sal_uInt16 EXC_CHATTLABEL_SHOWBUBBLE
= 0x0020;
312 // (0x100D) CHSTRING ----------------------------------------------------------
314 const sal_uInt16 EXC_ID_CHSTRING
= 0x100D;
316 // (0x1014) CHTYPEGROUP -------------------------------------------------------
318 const sal_uInt16 EXC_ID_CHTYPEGROUP
= 0x1014;
320 const sal_uInt16 EXC_CHTYPEGROUP_VARIEDCOLORS
= 0x0001; /// Varied colors for points.
322 // (0x1015) CHLEGEND ----------------------------------------------------------
324 const sal_uInt16 EXC_ID_CHLEGEND
= 0x1015;
326 const sal_uInt8 EXC_CHLEGEND_BOTTOM
= 0;
327 const sal_uInt8 EXC_CHLEGEND_CORNER
= 1;
328 const sal_uInt8 EXC_CHLEGEND_TOP
= 2;
329 const sal_uInt8 EXC_CHLEGEND_RIGHT
= 3;
330 const sal_uInt8 EXC_CHLEGEND_LEFT
= 4;
331 const sal_uInt8 EXC_CHLEGEND_NOTDOCKED
= 7;
333 const sal_uInt8 EXC_CHLEGEND_CLOSE
= 0;
334 const sal_uInt8 EXC_CHLEGEND_MEDIUM
= 1;
335 const sal_uInt8 EXC_CHLEGEND_OPEN
= 2;
337 const sal_uInt16 EXC_CHLEGEND_DOCKED
= 0x0001;
338 const sal_uInt16 EXC_CHLEGEND_AUTOSERIES
= 0x0002;
339 const sal_uInt16 EXC_CHLEGEND_AUTOPOSX
= 0x0004;
340 const sal_uInt16 EXC_CHLEGEND_AUTOPOSY
= 0x0008;
341 const sal_uInt16 EXC_CHLEGEND_STACKED
= 0x0010;
342 const sal_uInt16 EXC_CHLEGEND_DATATABLE
= 0x0020;
344 // (0x1017) CHBAR, CHCOLUMN ---------------------------------------------------
346 const sal_uInt16 EXC_ID_CHBAR
= 0x1017;
348 const sal_uInt16 EXC_CHBAR_HORIZONTAL
= 0x0001;
349 const sal_uInt16 EXC_CHBAR_STACKED
= 0x0002;
350 const sal_uInt16 EXC_CHBAR_PERCENT
= 0x0004;
351 const sal_uInt16 EXC_CHBAR_SHADOW
= 0x0008;
353 // (0x1018, 0x101A) CHLINE, CHAREA --------------------------------------------
355 const sal_uInt16 EXC_ID_CHLINE
= 0x1018;
356 const sal_uInt16 EXC_ID_CHAREA
= 0x101A;
358 const sal_uInt16 EXC_CHLINE_STACKED
= 0x0001;
359 const sal_uInt16 EXC_CHLINE_PERCENT
= 0x0002;
360 const sal_uInt16 EXC_CHLINE_SHADOW
= 0x0004;
362 // (0x1019) CHPIE -------------------------------------------------------------
364 const sal_uInt16 EXC_ID_CHPIE
= 0x1019;
366 const sal_uInt16 EXC_CHPIE_SHADOW
= 0x0001;
367 const sal_uInt16 EXC_CHPIE_LINES
= 0x0002;
369 // (0x101B) CHSCATTER ---------------------------------------------------------
371 const sal_uInt16 EXC_ID_CHSCATTER
= 0x101B;
373 const sal_uInt16 EXC_CHSCATTER_AREA
= 1; /// Bubble area refers to value.
374 const sal_uInt16 EXC_CHSCATTER_WIDTH
= 2; /// Bubble width refers to value.
376 const sal_uInt16 EXC_CHSCATTER_BUBBLES
= 0x0001;
377 const sal_uInt16 EXC_CHSCATTER_SHOWNEG
= 0x0002;
378 const sal_uInt16 EXC_CHSCATTER_SHADOW
= 0x0004;
380 // (0x001C) CHCHARTLINE -------------------------------------------------------
382 const sal_uInt16 EXC_ID_CHCHARTLINE
= 0x101C;
384 const sal_uInt16 EXC_CHCHARTLINE_DROP
= 0; /// Drop lines.
385 const sal_uInt16 EXC_CHCHARTLINE_HILO
= 1; /// Hi-lo lines.
386 const sal_uInt16 EXC_CHCHARTLINE_CONNECT
= 2; /// Connector lines in stacked bar charts.
388 // (0x101D) CHAXIS ------------------------------------------------------------
390 const sal_uInt16 EXC_ID_CHAXIS
= 0x101D;
392 const sal_uInt16 EXC_CHAXIS_X
= 0;
393 const sal_uInt16 EXC_CHAXIS_Y
= 1;
394 const sal_uInt16 EXC_CHAXIS_Z
= 2;
395 const sal_uInt16 EXC_CHAXIS_NONE
= 0xFFFF; /// For internal use only.
397 // (0x101E) CHTICK ------------------------------------------------------------
399 const sal_uInt16 EXC_ID_CHTICK
= 0x101E;
401 const sal_uInt8 EXC_CHTICK_INSIDE
= 0x01;
402 const sal_uInt8 EXC_CHTICK_OUTSIDE
= 0x02;
404 const sal_uInt8 EXC_CHTICK_NOLABEL
= 0;
405 const sal_uInt8 EXC_CHTICK_LOW
= 1; /// Below diagram/right of diagram.
406 const sal_uInt8 EXC_CHTICK_HIGH
= 2; /// Above diagram/left of diagram.
407 const sal_uInt8 EXC_CHTICK_NEXT
= 3; /// Next to axis.
409 const sal_uInt8 EXC_CHTICK_TRANSPARENT
= 1;
410 const sal_uInt8 EXC_CHTICK_OPAQUE
= 2;
412 const sal_uInt16 EXC_CHTICK_AUTOCOLOR
= 0x0001;
413 const sal_uInt16 EXC_CHTICK_AUTOFILL
= 0x0002;
414 const sal_uInt16 EXC_CHTICK_AUTOROT
= 0x0020;
416 // (0x101F) CHVALUERANGE ------------------------------------------------------
418 const sal_uInt16 EXC_ID_CHVALUERANGE
= 0x101F;
420 const sal_uInt16 EXC_CHVALUERANGE_AUTOMIN
= 0x0001;
421 const sal_uInt16 EXC_CHVALUERANGE_AUTOMAX
= 0x0002;
422 const sal_uInt16 EXC_CHVALUERANGE_AUTOMAJOR
= 0x0004;
423 const sal_uInt16 EXC_CHVALUERANGE_AUTOMINOR
= 0x0008;
424 const sal_uInt16 EXC_CHVALUERANGE_AUTOCROSS
= 0x0010;
425 const sal_uInt16 EXC_CHVALUERANGE_LOGSCALE
= 0x0020;
426 const sal_uInt16 EXC_CHVALUERANGE_REVERSE
= 0x0040; /// Axis direction reversed.
427 const sal_uInt16 EXC_CHVALUERANGE_MAXCROSS
= 0x0080; /// Other axis crosses at own maximum.
428 const sal_uInt16 EXC_CHVALUERANGE_BIT8
= 0x0100; /// This bit is always set in BIFF5+.
430 // (0x1020) CHLABELRANGE -----------------------------------------------------
432 const sal_uInt16 EXC_ID_CHLABELRANGE
= 0x1020;
434 const sal_uInt16 EXC_CHLABELRANGE_BETWEEN
= 0x0001; /// Axis between categories.
435 const sal_uInt16 EXC_CHLABELRANGE_MAXCROSS
= 0x0002; /// Other axis crosses at own maximum.
436 const sal_uInt16 EXC_CHLABELRANGE_REVERSE
= 0x0004; /// Axis direction reversed.
438 // (0x1021) CHAXISLINE --------------------------------------------------------
440 const sal_uInt16 EXC_ID_CHAXISLINE
= 0x1021;
442 const sal_uInt16 EXC_CHAXISLINE_AXISLINE
= 0; /// Axis line itself.
443 const sal_uInt16 EXC_CHAXISLINE_MAJORGRID
= 1; /// Major grid line.
444 const sal_uInt16 EXC_CHAXISLINE_MINORGRID
= 2; /// Minor grid line.
445 const sal_uInt16 EXC_CHAXISLINE_WALLS
= 3; /// Walls (X, Z axis), floor (Y axis).
447 // (0x1024) CHDEFAULTTEXT -----------------------------------------------------
449 const sal_uInt16 EXC_ID_CHDEFAULTTEXT
= 0x1024;
451 const sal_uInt16 EXC_CHDEFTEXT_TEXTLABEL
= 0; /// Default for text data labels (not used?).
452 const sal_uInt16 EXC_CHDEFTEXT_NUMLABEL
= 1; /// Default for numeric data labels (not used?).
453 const sal_uInt16 EXC_CHDEFTEXT_GLOBAL
= 2; /// Default text for all chart objects.
454 const sal_uInt16 EXC_CHDEFTEXT_AXESSET
= 3; /// Default text for axes and data points (BIFF8 only).
455 const sal_uInt16 EXC_CHDEFTEXT_NONE
= 0xFFFF; /// No default text available.
457 // (0x1025) CHTEXT ------------------------------------------------------------
459 const sal_uInt16 EXC_ID_CHTEXT
= 0x1025;
461 const sal_uInt8 EXC_CHTEXT_ALIGN_TOPLEFT
= 1; /// Horizontal: left, vertical: top.
462 const sal_uInt8 EXC_CHTEXT_ALIGN_CENTER
= 2;
463 const sal_uInt8 EXC_CHTEXT_ALIGN_BOTTOMRIGHT
= 3; /// Horizontal: right, vertical: bottom.
464 const sal_uInt8 EXC_CHTEXT_ALIGN_JUSTIFY
= 4;
465 const sal_uInt8 EXC_CHTEXT_ALIGN_DISTRIBUTE
= 5;
467 const sal_uInt16 EXC_CHTEXT_TRANSPARENT
= 1;
468 const sal_uInt16 EXC_CHTEXT_OPAQUE
= 2;
470 const sal_uInt16 EXC_CHTEXT_AUTOCOLOR
= 0x0001; /// Automatic text color.
471 const sal_uInt16 EXC_CHTEXT_SHOWSYMBOL
= 0x0002; /// Legend symbol for data point caption.
472 const sal_uInt16 EXC_CHTEXT_SHOWVALUE
= 0x0004; /// Data point caption is the value.
473 const sal_uInt16 EXC_CHTEXT_VERTICAL
= 0x0008;
474 const sal_uInt16 EXC_CHTEXT_AUTOTEXT
= 0x0010; /// Label text generated from chart data.
475 const sal_uInt16 EXC_CHTEXT_AUTOGEN
= 0x0020; /// Text object is inserted automatically.
476 const sal_uInt16 EXC_CHTEXT_DELETED
= 0x0040; /// Text object is removed.
477 const sal_uInt16 EXC_CHTEXT_AUTOFILL
= 0x0080; /// Automatic text background mode (transparent/opaque).
478 const sal_uInt16 EXC_CHTEXT_SHOWCATEGPERC
= 0x0800; /// Data point caption is category and percent.
479 const sal_uInt16 EXC_CHTEXT_SHOWPERCENT
= 0x1000; /// Data point caption as percent.
480 const sal_uInt16 EXC_CHTEXT_SHOWBUBBLE
= 0x2000; /// Show bubble size.
481 const sal_uInt16 EXC_CHTEXT_SHOWCATEG
= 0x4000; /// Data point caption is category name.
483 const sal_uInt16 EXC_CHTEXT_POS_DEFAULT
= 0;
484 const sal_uInt16 EXC_CHTEXT_POS_OUTSIDE
= 1;
485 const sal_uInt16 EXC_CHTEXT_POS_INSIDE
= 2;
486 const sal_uInt16 EXC_CHTEXT_POS_CENTER
= 3;
487 const sal_uInt16 EXC_CHTEXT_POS_AXIS
= 4;
488 const sal_uInt16 EXC_CHTEXT_POS_ABOVE
= 5;
489 const sal_uInt16 EXC_CHTEXT_POS_BELOW
= 6;
490 const sal_uInt16 EXC_CHTEXT_POS_LEFT
= 7;
491 const sal_uInt16 EXC_CHTEXT_POS_RIGHT
= 8;
492 const sal_uInt16 EXC_CHTEXT_POS_AUTO
= 9;
493 const sal_uInt16 EXC_CHTEXT_POS_MOVED
= 10;
495 // (0x1026) CHFONT ------------------------------------------------------------
497 const sal_uInt16 EXC_ID_CHFONT
= 0x1026;
499 // (0x1027) CHOBJECTLINK ------------------------------------------------------
501 const sal_uInt16 EXC_ID_CHOBJECTLINK
= 0x1027;
504 const sal_uInt16 EXC_CHOBJLINK_NONE
= 0; /// No link target.
505 const sal_uInt16 EXC_CHOBJLINK_TITLE
= 1; /// Chart title.
506 const sal_uInt16 EXC_CHOBJLINK_YAXIS
= 2; /// Value axis (Y axis).
507 const sal_uInt16 EXC_CHOBJLINK_XAXIS
= 3; /// Category axis (X axis).
508 const sal_uInt16 EXC_CHOBJLINK_DATA
= 4; /// Data series/point.
509 const sal_uInt16 EXC_CHOBJLINK_ZAXIS
= 7; /// Series axis (Z axis).
510 const sal_uInt16 EXC_CHOBJLINK_AXISUNIT
= 12; /// Unit name for axis labels.
512 // (0x1032) CHFRAME -----------------------------------------------------------
514 const sal_uInt16 EXC_ID_CHFRAME
= 0x1032;
516 const sal_uInt16 EXC_CHFRAME_STANDARD
= 0;
517 const sal_uInt16 EXC_CHFRAME_SHADOW
= 4;
519 const sal_uInt16 EXC_CHFRAME_AUTOSIZE
= 0x0001;
520 const sal_uInt16 EXC_CHFRAME_AUTOPOS
= 0x0002;
522 // (0x1033, 0x1034) CHBEGIN, CHEND --------------------------------------------
524 const sal_uInt16 EXC_ID_CHBEGIN
= 0x1033;
525 const sal_uInt16 EXC_ID_CHEND
= 0x1034;
527 // (0x1035) CHPLOTFRAME -------------------------------------------------------
529 const sal_uInt16 EXC_ID_CHPLOTFRAME
= 0x1035;
531 // (0x103A) CHCHART3D ---------------------------------------------------------
533 const sal_uInt16 EXC_ID_CHCHART3D
= 0x103A;
535 const sal_uInt16 EXC_CHCHART3D_REAL3D
= 0x0001; /// true = real 3d perspective.
536 const sal_uInt16 EXC_CHCHART3D_CLUSTER
= 0x0002; /// false = Z axis, true = clustered/stacked.
537 const sal_uInt16 EXC_CHCHART3D_AUTOHEIGHT
= 0x0004; /// true = automatic height to width ratio.
538 const sal_uInt16 EXC_CHCHART3D_HASWALLS
= 0x0010; /// true = 3d chart has walls/floor.
539 const sal_uInt16 EXC_CHCHART3D_2DWALLS
= 0x0020; /// true = 2d wall/gridlines, no floor.
541 // (0x103C) CHPICFORMAT -------------------------------------------------------
543 const sal_uInt16 EXC_ID_CHPICFORMAT
= 0x103C;
545 const sal_uInt16 EXC_CHPICFORMAT_NONE
= 0; /// For internal use only.
546 const sal_uInt16 EXC_CHPICFORMAT_STRETCH
= 1; /// Bitmap stretched to area.
547 const sal_uInt16 EXC_CHPICFORMAT_STACK
= 2; /// Bitmap stacked.
548 const sal_uInt16 EXC_CHPICFORMAT_SCALE
= 3; /// Bitmap scaled to axis scale.
550 const sal_uInt16 EXC_CHPICFORMAT_TOPBOTTOM
= 0x0200;
551 const sal_uInt16 EXC_CHPICFORMAT_FRONTBACK
= 0x0400;
552 const sal_uInt16 EXC_CHPICFORMAT_LEFTRIGHT
= 0x0800;
554 // (0x103D) CHDROPBAR ---------------------------------------------------------
556 const sal_uInt16 EXC_ID_CHDROPBAR
= 0x103D;
558 const sal_uInt16 EXC_CHDROPBAR_UP
= 0;
559 const sal_uInt16 EXC_CHDROPBAR_DOWN
= 1;
560 const sal_uInt16 EXC_CHDROPBAR_NONE
= 0xFFFF;
562 // (0x103E, 0x1040) CHRADARLINE, CHRADARAREA ----------------------------------
564 const sal_uInt16 EXC_ID_CHRADARLINE
= 0x103E;
565 const sal_uInt16 EXC_ID_CHRADARAREA
= 0x1040;
567 const sal_uInt16 EXC_CHRADAR_AXISLABELS
= 0x0001;
568 const sal_uInt16 EXC_CHRADAR_SHADOW
= 0x0002;
570 // (0x103F) CHSURFACE ---------------------------------------------------------
572 const sal_uInt16 EXC_ID_CHSURFACE
= 0x103F;
574 const sal_uInt16 EXC_CHSURFACE_FILLED
= 0x0001;
575 const sal_uInt16 EXC_CHSURFACE_SHADING
= 0x0002;
577 // (0x1041) CHAXESSET ---------------------------------------------------------
579 const sal_uInt16 EXC_ID_CHAXESSET
= 0x1041;
581 const sal_uInt16 EXC_CHAXESSET_PRIMARY
= 0;
582 const sal_uInt16 EXC_CHAXESSET_SECONDARY
= 1;
583 const sal_uInt16 EXC_CHAXESSET_NONE
= 0xFFFF; /// For internal use.
585 // (0x1044) CHPROPERTIES ------------------------------------------------------
587 const sal_uInt16 EXC_ID_CHPROPERTIES
= 0x1044;
589 const sal_uInt16 EXC_CHPROPS_MANSERIES
= 0x0001; /// Manual series allocation.
590 const sal_uInt16 EXC_CHPROPS_SHOWVISIBLEONLY
= 0x0002; /// Show visible cells only.
591 const sal_uInt16 EXC_CHPROPS_NORESIZE
= 0x0004; /// Do not resize chart with window.
592 const sal_uInt16 EXC_CHPROPS_MANPLOTAREA
= 0x0008; /// Manual plot area mode.
593 const sal_uInt16 EXC_CHPROPS_USEMANPLOTAREA
= 0x0010; /// Manual plot area layout in CHFRAMEPOS record.
595 const sal_uInt8 EXC_CHPROPS_EMPTY_SKIP
= 0; /// Skip empty values.
596 const sal_uInt8 EXC_CHPROPS_EMPTY_ZERO
= 1; /// Plot empty values as zero.
597 const sal_uInt8 EXC_CHPROPS_EMPTY_INTERPOLATE
= 2; /// Interpolate empty values.
599 // (0x1045) CHSERGROUP --------------------------------------------------------
601 const sal_uInt16 EXC_ID_CHSERGROUP
= 0x1045;
603 const sal_uInt16 EXC_CHSERGROUP_NONE
= 0xFFFF; /// For internal use: no chart type group.
605 // (0x1048, 0x0858) CHPIVOTREF ------------------------------------------------
607 const sal_uInt16 EXC_ID5_CHPIVOTREF
= 0x1048;
608 const sal_uInt16 EXC_ID8_CHPIVOTREF
= 0x0858;
610 // (0x104A) CHSERPARENT -------------------------------------------------------
612 const sal_uInt16 EXC_ID_CHSERPARENT
= 0x104A;
614 // (0x104B) CHSERTRENDLINE ----------------------------------------------------
616 const sal_uInt16 EXC_ID_CHSERTRENDLINE
= 0x104B;
618 const sal_uInt8 EXC_CHSERTREND_POLYNOMIAL
= 0; /// If order is 1, trend line is linear.
619 const sal_uInt8 EXC_CHSERTREND_EXPONENTIAL
= 1;
620 const sal_uInt8 EXC_CHSERTREND_LOGARITHMIC
= 2;
621 const sal_uInt8 EXC_CHSERTREND_POWER
= 3;
622 const sal_uInt8 EXC_CHSERTREND_MOVING_AVG
= 4;
624 // (0x104E) CHFORMAT ----------------------------------------------------------
626 const sal_uInt16 EXC_ID_CHFORMAT
= 0x104E;
628 // (0x104F) CHFRAMEPOS --------------------------------------------------------
630 const sal_uInt16 EXC_ID_CHFRAMEPOS
= 0x104F;
632 const sal_uInt16 EXC_CHFRAMEPOS_POINTS
= 0;
633 const sal_uInt16 EXC_CHFRAMEPOS_ABSSIZE_POINTS
= 1;
634 const sal_uInt16 EXC_CHFRAMEPOS_PARENT
= 2;
635 const sal_uInt16 EXC_CHFRAMEPOS_DEFOFFSET_PLOT
= 3;
636 const sal_uInt16 EXC_CHFRAMEPOS_CHARTSIZE
= 5;
638 // (0x1050) CHFORMATRUNS ------------------------------------------------------
640 const sal_uInt16 EXC_ID_CHFORMATRUNS
= 0x1050;
642 // (0x1051) CHSOURCELINK ------------------------------------------------------
644 const sal_uInt16 EXC_ID_CHSOURCELINK
= 0x1051;
646 const sal_uInt8 EXC_CHSRCLINK_TITLE
= 0;
647 const sal_uInt8 EXC_CHSRCLINK_VALUES
= 1;
648 const sal_uInt8 EXC_CHSRCLINK_CATEGORY
= 2;
649 const sal_uInt8 EXC_CHSRCLINK_BUBBLES
= 3;
651 const sal_uInt8 EXC_CHSRCLINK_DEFAULT
= 0;
652 const sal_uInt8 EXC_CHSRCLINK_DIRECTLY
= 1;
653 const sal_uInt8 EXC_CHSRCLINK_WORKSHEET
= 2;
655 const sal_uInt16 EXC_CHSRCLINK_NUMFMT
= 0x0001;
657 // (0x105B) CHSERERRORBAR -----------------------------------------------------
659 const sal_uInt16 EXC_ID_CHSERERRORBAR
= 0x105B;
661 const sal_uInt8 EXC_CHSERERR_NONE
= 0; /// For internal use only.
662 const sal_uInt8 EXC_CHSERERR_XPLUS
= 1;
663 const sal_uInt8 EXC_CHSERERR_XMINUS
= 2;
664 const sal_uInt8 EXC_CHSERERR_YPLUS
= 3;
665 const sal_uInt8 EXC_CHSERERR_YMINUS
= 4;
667 const sal_uInt8 EXC_CHSERERR_PERCENT
= 1;
668 const sal_uInt8 EXC_CHSERERR_FIXED
= 2;
669 const sal_uInt8 EXC_CHSERERR_STDDEV
= 3;
670 const sal_uInt8 EXC_CHSERERR_CUSTOM
= 4;
671 const sal_uInt8 EXC_CHSERERR_STDERR
= 5;
673 const sal_uInt8 EXC_CHSERERR_END_BLANK
= 0; /// Line end: blank.
674 const sal_uInt8 EXC_CHSERERR_END_TSHAPE
= 1; /// Line end: t-shape.
676 // (0x105D) CHSERIESFORMAT ----------------------------------------------------
678 const sal_uInt16 EXC_ID_CHSERIESFORMAT
= 0x105D;
680 const sal_uInt16 EXC_CHSERIESFORMAT_SMOOTHED
= 0x0001;
681 const sal_uInt16 EXC_CHSERIESFORMAT_BUBBLE3D
= 0x0002;
682 const sal_uInt16 EXC_CHSERIESFORMAT_SHADOW
= 0x0004;
684 // (0x105F) CH3DDATAFORMAT ----------------------------------------------------
686 const sal_uInt16 EXC_ID_CH3DDATAFORMAT
= 0x105F;
688 const sal_uInt8 EXC_CH3DDATAFORMAT_RECT
= 0; /// Rectangular base.
689 const sal_uInt8 EXC_CH3DDATAFORMAT_CIRC
= 1; /// Circular base.
691 const sal_uInt8 EXC_CH3DDATAFORMAT_STRAIGHT
= 0; /// Straight to top.
692 const sal_uInt8 EXC_CH3DDATAFORMAT_SHARP
= 1; /// Sharp top.
693 const sal_uInt8 EXC_CH3DDATAFORMAT_TRUNC
= 2; /// Sharp top, truncated.
695 // (0x1061) CHPIEEXT ----------------------------------------------------------
697 const sal_uInt16 EXC_ID_CHPIEEXT
= 0x1061;
699 // (0x1062) CHDATERANGE -------------------------------------------------------
701 const sal_uInt16 EXC_ID_CHDATERANGE
= 0x1062;
703 const sal_uInt16 EXC_CHDATERANGE_AUTOMIN
= 0x0001;
704 const sal_uInt16 EXC_CHDATERANGE_AUTOMAX
= 0x0002;
705 const sal_uInt16 EXC_CHDATERANGE_AUTOMAJOR
= 0x0004;
706 const sal_uInt16 EXC_CHDATERANGE_AUTOMINOR
= 0x0008;
707 const sal_uInt16 EXC_CHDATERANGE_DATEAXIS
= 0x0010;
708 const sal_uInt16 EXC_CHDATERANGE_AUTOBASE
= 0x0020;
709 const sal_uInt16 EXC_CHDATERANGE_AUTOCROSS
= 0x0040; /// Other axis crosses at own maximum.
710 const sal_uInt16 EXC_CHDATERANGE_AUTODATE
= 0x0080; /// Recognize date/text automatically.
712 const sal_uInt16 EXC_CHDATERANGE_DAYS
= 0;
713 const sal_uInt16 EXC_CHDATERANGE_MONTHS
= 1;
714 const sal_uInt16 EXC_CHDATERANGE_YEARS
= 2;
716 // (0x1066) CHESCHERFORMAT ----------------------------------------------------
718 const sal_uInt16 EXC_ID_CHESCHERFORMAT
= 0x1066;
720 // Other record IDs -----------------------------------------------------------
722 const sal_uInt16 EXC_ID_CHWRAPPEDRECORD
= 0x0851;
723 const sal_uInt16 EXC_ID_CHUNITPROPERTIES
= 0x0857;
724 const sal_uInt16 EXC_ID_CHUSEDAXESSETS
= 0x1046;
725 const sal_uInt16 EXC_ID_CHLABELRANGE2
= 0x1062;
726 const sal_uInt16 EXC_ID_CHPLOTGROWTH
= 0x1064;
727 const sal_uInt16 EXC_ID_CHSERINDEX
= 0x1065;
728 const sal_uInt16 EXC_ID_CHUNKNOWN
= 0xFFFF;
730 // Structs and classes
732 // Common =====================================================================
734 struct XclChRectangle
736 sal_Int32 mnX
; /// X position of the object in 1/4000 of chart width.
737 sal_Int32 mnY
; /// Y position of the object in 1/4000 of chart height.
738 sal_Int32 mnWidth
; /// Width of the object in 1/4000 of chart width.
739 sal_Int32 mnHeight
; /// Height of the object in 1/4000 of chart height.
741 explicit XclChRectangle();
744 /** Specifies the position of a data series or data point. */
745 struct XclChDataPointPos
747 sal_uInt16 mnSeriesIdx
; /// Series index of series or a data point.
748 sal_uInt16 mnPointIdx
; /// Index of a data point inside a series.
750 explicit XclChDataPointPos(
751 sal_uInt16 nSeriesIdx
= EXC_CHSERIES_INVALID
,
752 sal_uInt16 nPointIdx
= EXC_CHDATAFORMAT_ALLPOINTS
);
755 bool operator<( const XclChDataPointPos
& rL
, const XclChDataPointPos
& rR
);
757 /** Contains the type and context of a block of future records which are
758 guarded by CHFRBLOCKBEGIN and CHFRBLOCKEND records. */
761 sal_uInt16 mnType
; /// Type of the future record block.
762 sal_uInt16 mnContext
; /// Context dependent on type.
763 sal_uInt16 mnValue1
; /// Optional primary value for current context.
764 sal_uInt16 mnValue2
; /// Optional secondary value for current context.
766 explicit XclChFrBlock( sal_uInt16 nType
);
769 // Frame formatting ===========================================================
773 XclChRectangle maRect
; /// Object dependent position data.
774 sal_uInt16 mnTLMode
; /// Top-left position mode.
775 sal_uInt16 mnBRMode
; /// Bottom-right position mode.
777 explicit XclChFramePos();
780 struct XclChLineFormat
782 Color maColor
; /// Line color.
783 sal_uInt16 mnPattern
; /// Line pattern (solid, dashed, ...).
784 sal_Int16 mnWeight
; /// Line weight (hairline, single, ...).
785 sal_uInt16 mnFlags
; /// Additional flags.
787 explicit XclChLineFormat();
790 struct XclChAreaFormat
792 Color maPattColor
; /// Pattern color.
793 Color maBackColor
; /// Pattern background color.
794 sal_uInt16 mnPattern
; /// Fill pattern.
795 sal_uInt16 mnFlags
; /// Additional flags.
797 explicit XclChAreaFormat();
801 class EscherPropertyContainer
;
803 struct XclChEscherFormat
805 typedef std::shared_ptr
< SfxItemSet
> SfxItemSetRef
;
806 typedef std::shared_ptr
< EscherPropertyContainer
> EscherPropSetRef
;
808 SfxItemSetRef mxItemSet
; /// Item set for Escher properties import.
809 EscherPropSetRef mxEscherSet
; /// Container for Escher properties export.
811 explicit XclChEscherFormat();
812 ~XclChEscherFormat();
815 struct XclChPicFormat
817 sal_uInt16 mnBmpMode
; /// Bitmap mode, e.g. stretched, stacked.
818 sal_uInt16 mnFlags
; /// Additional flags.
819 double mfScale
; /// Picture scaling (units).
821 explicit XclChPicFormat();
826 sal_uInt16 mnFormat
; /// Format type of the frame.
827 sal_uInt16 mnFlags
; /// Additional flags.
829 explicit XclChFrame();
832 // Source links ===============================================================
834 struct XclChSourceLink
836 sal_uInt8 mnDestType
; /// Type of the destination (title, values, ...).
837 sal_uInt8 mnLinkType
; /// Link type (directly, linked to worksheet, ...).
838 sal_uInt16 mnFlags
; /// Additional flags.
839 sal_uInt16 mnNumFmtIdx
; /// Number format index.
841 explicit XclChSourceLink();
844 // Text =======================================================================
846 struct XclChObjectLink
848 XclChDataPointPos maPointPos
; /// Position of the data point.
849 sal_uInt16 mnTarget
; /// Target of the link.
851 explicit XclChObjectLink();
854 struct XclChFrLabelProps
856 OUString maSeparator
; /// Separator between label values.
857 sal_uInt16 mnFlags
; /// Flags indicating which values to be displayed.
859 explicit XclChFrLabelProps();
864 XclChRectangle maRect
; /// Position of the text object.
865 Color maTextColor
; /// Text color.
866 sal_uInt8 mnHAlign
; /// Horizontal alignment.
867 sal_uInt8 mnVAlign
; /// Vertical alignment.
868 sal_uInt16 mnBackMode
; /// Background mode: transparent, opaque.
869 sal_uInt16 mnFlags
; /// Additional flags.
870 sal_uInt16 mnFlags2
; /// Text object placement and text direction (BIFF8+).
871 sal_uInt16 mnRotation
; /// Text object rotation (BIFF8+).
873 explicit XclChText();
876 // Data series ================================================================
878 struct XclChMarkerFormat
880 Color maLineColor
; /// Border line color.
881 Color maFillColor
; /// Fill color.
882 sal_uInt32 mnMarkerSize
; /// Size of a marker
883 sal_uInt16 mnMarkerType
; /// Marker type (none, diamond, ...).
884 sal_uInt16 mnFlags
; /// Additional flags.
886 explicit XclChMarkerFormat();
889 struct XclCh3dDataFormat
891 sal_uInt8 mnBase
; /// Base form.
892 sal_uInt8 mnTop
; /// Top egde mode.
894 explicit XclCh3dDataFormat();
897 struct XclChDataFormat
899 XclChDataPointPos maPointPos
; /// Position of the data point or series.
900 sal_uInt16 mnFormatIdx
; /// Formatting index for automatic colors.
901 sal_uInt16 mnFlags
; /// Additional flags.
903 explicit XclChDataFormat();
906 struct XclChSerTrendLine
908 double mfIntercept
; /// Forced intercept.
909 double mfForecastFor
; /// Counter to forecast forward.
910 double mfForecastBack
; /// Counter to forecast backward.
911 sal_uInt8 mnLineType
; /// Type of the trend line.
912 sal_uInt8 mnOrder
; /// Polynomial order or moving average counter.
913 sal_uInt8 mnShowEquation
; /// 1 = Show equation.
914 sal_uInt8 mnShowRSquared
; /// 1 = Show R-squared.
916 explicit XclChSerTrendLine();
919 struct XclChSerErrorBar
921 double mfValue
; /// Fixed value for several source types.
922 sal_uInt16 mnValueCount
; /// Number of custom error values.
923 sal_uInt8 mnBarType
; /// Type of the error bar (X/Y).
924 sal_uInt8 mnSourceType
; /// Type of source values.
925 sal_uInt8 mnLineEnd
; /// Type of the line ends.
927 explicit XclChSerErrorBar();
932 sal_uInt16 mnCategType
; /// Data type for category entries.
933 sal_uInt16 mnValueType
; /// Data type for value entries.
934 sal_uInt16 mnBubbleType
; /// Data type for bubble entries.
935 sal_uInt16 mnCategCount
; /// Number of category entries.
936 sal_uInt16 mnValueCount
; /// Number of value entries.
937 sal_uInt16 mnBubbleCount
; /// Number of bubble entries.
939 explicit XclChSeries();
942 // Chart type groups ==========================================================
946 sal_Int16 mnOverlap
; /// Bar overlap width (CHBAR).
947 sal_Int16 mnGap
; /// Gap between bars (CHBAR).
948 sal_uInt16 mnRotation
; /// Rotation angle of first pie (CHPIE).
949 sal_uInt16 mnPieHole
; /// Hole size in donut chart (CHPIE).
950 sal_uInt16 mnBubbleSize
; /// Bubble size in bubble chart (CHSCATTER).
951 sal_uInt16 mnBubbleType
; /// Bubble type in bubble chart (CHSCATTER).
952 sal_uInt16 mnFlags
; /// Additional flags (all chart types).
954 explicit XclChType();
959 sal_uInt16 mnRotation
; /// Rotation (0...359deg).
960 sal_Int16 mnElevation
; /// Elevation (-90...+90deg).
961 sal_uInt16 mnEyeDist
; /// Eye distance to chart (0...100).
962 sal_uInt16 mnRelHeight
; /// Height relative to width.
963 sal_uInt16 mnRelDepth
; /// Depth relative to width.
964 sal_uInt16 mnDepthGap
; /// Space between series.
965 sal_uInt16 mnFlags
; /// Additional flags.
967 explicit XclChChart3d();
972 XclChRectangle maRect
; /// Position of the legend.
973 sal_uInt8 mnDockMode
; /// Docking mode.
974 sal_uInt8 mnSpacing
; /// Spacing between elements.
975 sal_uInt16 mnFlags
; /// Additional flags.
977 explicit XclChLegend();
980 struct XclChTypeGroup
982 sal_uInt16 mnFlags
; /// Additional flags.
983 sal_uInt16 mnGroupIdx
; /// Chart type group index.
985 explicit XclChTypeGroup();
988 struct XclChProperties
990 sal_uInt16 mnFlags
; /// Additional flags.
991 sal_uInt8 mnEmptyMode
; /// Plotting mode for empty cells.
993 explicit XclChProperties();
996 // Axes =======================================================================
998 struct XclChLabelRange
1000 sal_uInt16 mnCross
; /// Crossing position of other axis.
1001 sal_uInt16 mnLabelFreq
; /// Frequency of labels.
1002 sal_uInt16 mnTickFreq
; /// Frequency of ticks.
1003 sal_uInt16 mnFlags
; /// Additional flags.
1005 explicit XclChLabelRange();
1008 struct XclChDateRange
1010 sal_uInt16 mnMinDate
; /// Minimum value on axis.
1011 sal_uInt16 mnMaxDate
; /// Maximum value on axis.
1012 sal_uInt16 mnMajorStep
; /// Distance for major grid lines.
1013 sal_uInt16 mnMajorUnit
; /// Time unit for major step.
1014 sal_uInt16 mnMinorStep
; /// Distance for minor grid lines.
1015 sal_uInt16 mnMinorUnit
; /// Time unit for minor step.
1016 sal_uInt16 mnBaseUnit
; /// Time unit for axis values.
1017 sal_uInt16 mnCross
; /// Crossing position of other axis.
1018 sal_uInt16 mnFlags
; /// Additional flags.
1020 explicit XclChDateRange();
1023 struct XclChValueRange
1025 double mfMin
; /// Minimum value on axis.
1026 double mfMax
; /// Maximum value on axis.
1027 double mfMajorStep
; /// Distance for major grid lines.
1028 double mfMinorStep
; /// Distance for minor grid lines.
1029 double mfCross
; /// Crossing position of other axis.
1030 sal_uInt16 mnFlags
; /// Additional flags.
1032 explicit XclChValueRange();
1037 Color maTextColor
; /// Tick labels color.
1038 sal_uInt8 mnMajor
; /// Type of tick marks of major grid.
1039 sal_uInt8 mnMinor
; /// Type of tick marks of minor grid.
1040 sal_uInt8 mnLabelPos
; /// Position of labels relative to axis.
1041 sal_uInt8 mnBackMode
; /// Background mode: transparent, opaque.
1042 sal_uInt16 mnFlags
; /// Additional flags.
1043 sal_uInt16 mnRotation
; /// Tick labels angle (BIFF8+).
1045 explicit XclChTick();
1050 sal_uInt16 mnType
; /// Axis type.
1052 explicit XclChAxis();
1054 /** Returns the axis dimension index used by the chart API. */
1055 sal_Int32
GetApiAxisDimension() const;
1060 XclChRectangle maRect
; /// Position of the axes set (inner plot area).
1061 sal_uInt16 mnAxesSetId
; /// Primary/secondary axes set.
1063 explicit XclChAxesSet();
1065 /** Returns the axes set index used by the chart API. */
1066 sal_Int32
GetApiAxesSetIndex() const;
1069 // Property mode ==============================================================
1071 /** Specifies the type of a formatting. This results in different property names. */
1072 enum XclChPropertyMode
1074 EXC_CHPROPMODE_COMMON
, /// Common objects, no special handling.
1075 EXC_CHPROPMODE_LINEARSERIES
, /// Specific to data series drawn as lines.
1076 EXC_CHPROPMODE_FILLEDSERIES
/// Specific to data series drawn as areas.
1079 // Static helper functions ====================================================
1081 /** Contains static helper functions for the chart filters. */
1082 class XclChartHelper
1085 /** Returns a palette index for automatic series line colors. */
1086 static sal_uInt16
GetSeriesLineAutoColorIdx( sal_uInt16 nFormatIdx
);
1087 /** Returns a palette index for automatic series fill colors. */
1088 static sal_uInt16
GetSeriesFillAutoColorIdx( sal_uInt16 nFormatIdx
);
1089 /** Returns a transparency value for automatic series fill colors. */
1090 static sal_uInt8
GetSeriesFillAutoTransp( sal_uInt16 nFormatIdx
);
1091 /** Returns an automatic symbol index for the passed format index. */
1092 static sal_uInt16
GetAutoMarkerType( sal_uInt16 nFormatIdx
);
1093 /** Returns true, if the passed marker type is filled. */
1094 static bool HasMarkerFillColor( sal_uInt16 nMarkerType
);
1095 /** Returns the role name for a manual data source for error bars. */
1096 static OUString
GetErrorBarValuesRole( sal_uInt8 nBarType
);
1099 // Chart formatting info provider =============================================
1101 /** Enumerates different object types for specific automatic formatting behaviour. */
1102 enum XclChObjectType
1104 EXC_CHOBJTYPE_BACKGROUND
, /// Chart background.
1105 EXC_CHOBJTYPE_PLOTFRAME
, /// Wall formatting in 2d charts.
1106 EXC_CHOBJTYPE_WALL3D
, /// Wall formatting in 3d charts.
1107 EXC_CHOBJTYPE_FLOOR3D
, /// Floor formatting in 3d charts.
1108 EXC_CHOBJTYPE_TEXT
, /// Text boxes (titles, data point labels).
1109 EXC_CHOBJTYPE_LEGEND
, /// Chart legend.
1110 EXC_CHOBJTYPE_LINEARSERIES
, /// Series formatting in a chart supporting line formatting only.
1111 EXC_CHOBJTYPE_FILLEDSERIES
, /// Series formatting in a chart supporting area formatting.
1112 EXC_CHOBJTYPE_AXISLINE
, /// Axis line format.
1113 EXC_CHOBJTYPE_GRIDLINE
, /// Axis grid line format.
1114 EXC_CHOBJTYPE_TRENDLINE
, /// Series trend line.
1115 EXC_CHOBJTYPE_ERRORBAR
, /// Series error bar.
1116 EXC_CHOBJTYPE_CONNECTLINE
, /// Data point connector line.
1117 EXC_CHOBJTYPE_HILOLINE
, /// High/low lines in stock charts.
1118 EXC_CHOBJTYPE_WHITEDROPBAR
, /// White-day drop bar in stock charts.
1119 EXC_CHOBJTYPE_BLACKDROPBAR
/// Black-day drop bar in stock charts.
1122 /** Enumerates different types to handle missing frame objects. */
1125 EXC_CHFRAMETYPE_AUTO
, /// Missing frame represents automatic formatting.
1126 EXC_CHFRAMETYPE_INVISIBLE
/// Missing frame represents invisible formatting.
1129 /** Contains information about auto formatting of a specific chart object type. */
1130 struct XclChFormatInfo
1132 XclChObjectType meObjType
; /// Object type for automatic format.
1133 XclChPropertyMode mePropMode
; /// Property mode for property set helper.
1134 sal_uInt16 mnAutoLineColorIdx
; /// Automatic line color index.
1135 sal_Int16 mnAutoLineWeight
; /// Automatic line weight (hairline, single, ...).
1136 sal_uInt16 mnAutoPattColorIdx
; /// Automatic fill pattern color index.
1137 XclChFrameType meDefFrameType
; /// Default format type for missing frame objects.
1138 bool mbCreateDefFrame
; /// true = Create missing frame objects on import.
1139 bool mbDeleteDefFrame
; /// true = Delete default frame formatting on export.
1140 bool mbIsFrame
; /// true = Object is a frame, false = Object is a line.
1143 /** Provides access to chart auto formatting for all available object types. */
1144 class XclChFormatInfoProvider
1147 explicit XclChFormatInfoProvider();
1149 /** Returns an info struct about auto formatting for the passed object type. */
1150 const XclChFormatInfo
& GetFormatInfo( XclChObjectType eObjType
) const;
1153 typedef ::std::map
< XclChObjectType
, const XclChFormatInfo
* > XclFmtInfoMap
;
1154 XclFmtInfoMap maInfoMap
; /// Maps object type to formatting data.
1157 // Chart type info provider ===================================================
1159 /** Enumerates all kinds of different chart types. */
1162 EXC_CHTYPEID_BAR
, /// Vertical bar chart.
1163 EXC_CHTYPEID_HORBAR
, /// Horizontal bar chart.
1164 EXC_CHTYPEID_LINE
, /// Line chart.
1165 EXC_CHTYPEID_AREA
, /// Area chart.
1166 EXC_CHTYPEID_STOCK
, /// Stock chart.
1167 EXC_CHTYPEID_RADARLINE
, /// Linear radar chart.
1168 EXC_CHTYPEID_RADARAREA
, /// Filled radar chart.
1169 EXC_CHTYPEID_PIE
, /// Pie chart.
1170 EXC_CHTYPEID_DONUT
, /// Donut chart.
1171 EXC_CHTYPEID_PIEEXT
, /// Pie-to-pie or pie-to-bar chart.
1172 EXC_CHTYPEID_SCATTER
, /// Scatter (XY) chart.
1173 EXC_CHTYPEID_BUBBLES
, /// Bubble chart.
1174 EXC_CHTYPEID_SURFACE
, /// Surface chart.
1175 EXC_CHTYPEID_UNKNOWN
/// Default for unknown chart types.
1178 /** Enumerates different categories of similar chart types. */
1181 EXC_CHTYPECATEG_BAR
, /// Bar charts (horizontal or vertical).
1182 EXC_CHTYPECATEG_LINE
, /// Line charts (line, area, stock charts).
1183 EXC_CHTYPECATEG_RADAR
, /// Radar charts (linear or filled).
1184 EXC_CHTYPECATEG_PIE
, /// Pie and donut charts.
1185 EXC_CHTYPECATEG_SCATTER
, /// Scatter and bubble charts.
1186 EXC_CHTYPECATEG_SURFACE
/// Surface charts.
1189 /** Enumerates modes for varying point colors in a series. */
1190 enum XclChVarPointMode
1192 EXC_CHVARPOINT_NONE
, /// No varied colors supported.
1193 EXC_CHVARPOINT_SINGLE
, /// Only supported, if type group contains only one series.
1194 EXC_CHVARPOINT_MULTI
/// Supported for multiple series in a chart type group.
1197 /** Contains information for a chart type. */
1198 struct XclChTypeInfo
1200 XclChTypeId meTypeId
; /// Unique chart type identifier.
1201 XclChTypeCateg meTypeCateg
; /// Chart type category this type belongs to.
1202 sal_uInt16 mnRecId
; /// Record identifier written to the file.
1203 const sal_Char
* mpcServiceName
; /// Service name of the type.
1204 XclChVarPointMode meVarPointMode
; /// Mode for varying point colors.
1205 sal_Int32 mnDefaultLabelPos
; /// Default data label position (API constant).
1206 bool mbCombinable2d
; /// true = Types can be combined in one axes set.
1207 bool mbSupports3d
; /// true = 3d type allowed, false = Only 2d type.
1208 bool mbPolarCoordSystem
; /// true = Polar, false = Cartesian.
1209 bool mbSeriesIsFrame2d
; /// true = Series with area formatting (2d charts).
1210 bool mbSeriesIsFrame3d
; /// true = Series with area formatting (3d charts).
1211 bool mbSingleSeriesVis
; /// true = Only first series visible.
1212 bool mbCategoryAxis
; /// true = X axis contains categories.
1213 bool mbSwappedAxesSet
; /// true = X and Y axes are swapped.
1214 bool mbSupportsStacking
; /// true = Series can be stacked on each other.
1215 bool mbReverseSeries
; /// true = Insert unstacked series in reverse order.
1216 bool mbTicksBetweenCateg
; /// true = X axis ticks between categories.
1219 /** Extended chart type information and access functions. */
1220 struct XclChExtTypeInfo
: public XclChTypeInfo
1222 bool mb3dChart
; /// Chart is actually a 3D chart.
1223 bool mbSpline
; /// Series lines are smoothed.
1225 explicit XclChExtTypeInfo( const XclChTypeInfo
& rTypeInfo
);
1227 void Set( const XclChTypeInfo
& rTypeInfo
, bool b3dChart
, bool bSpline
);
1229 /** Returns true, if this chart type supports area formatting for its series. */
1230 inline bool IsSeriesFrameFormat() const
1231 { return mb3dChart
? mbSeriesIsFrame3d
: mbSeriesIsFrame2d
; }
1232 /** Returns the correct object type identifier for series and data points. */
1233 inline XclChObjectType
GetSeriesObjectType() const
1234 { return IsSeriesFrameFormat() ? EXC_CHOBJTYPE_FILLEDSERIES
: EXC_CHOBJTYPE_LINEARSERIES
; }
1237 /** Provides access to chart type info structs for all available chart types. */
1238 class XclChTypeInfoProvider
1241 explicit XclChTypeInfoProvider();
1243 /** Returns chart type info for a unique chart type identifier. */
1244 const XclChTypeInfo
& GetTypeInfo( XclChTypeId eType
) const;
1245 /** Returns the first fitting chart type info for an Excel chart type record identifier. */
1246 const XclChTypeInfo
& GetTypeInfoFromRecId( sal_uInt16 nRecId
) const;
1247 /** Returns the first fitting chart type info for the passed service name. */
1248 const XclChTypeInfo
& GetTypeInfoFromService( const OUString
& rServiceName
) const;
1251 typedef ::std::map
< XclChTypeId
, const XclChTypeInfo
* > XclChTypeInfoMap
;
1252 XclChTypeInfoMap maInfoMap
; /// Maps chart types to type info data.
1255 // Chart text and title object helpers ========================================
1257 /** Enumerates different text box types for default text formatting and title
1261 EXC_CHTEXTTYPE_TITLE
, /// Chart title.
1262 EXC_CHTEXTTYPE_LEGEND
, /// Chart legend.
1263 EXC_CHTEXTTYPE_AXISTITLE
, /// Chart axis titles.
1264 EXC_CHTEXTTYPE_AXISLABEL
, /// Chart axis labels.
1265 EXC_CHTEXTTYPE_DATALABEL
/// Data point labels.
1268 /** A map key for text and title objects. */
1269 struct XclChTextKey
: public ::std::pair
< XclChTextType
, ::std::pair
< sal_uInt16
, sal_uInt16
> >
1271 inline explicit XclChTextKey( XclChTextType eTextType
, sal_uInt16 nMainIdx
= 0, sal_uInt16 nSubIdx
= 0 )
1272 { first
= eTextType
; second
.first
= nMainIdx
; second
.second
= nSubIdx
; }
1275 /** Function prototype receiving a chart document and returning a title shape. */
1276 typedef css::uno::Reference
< css::drawing::XShape
>
1277 (*XclChGetShapeFunc
)( const css::uno::Reference
< css::chart::XChartDocument
>& );
1279 // Property helpers ===========================================================
1281 class XclChObjectTable
1284 explicit XclChObjectTable( css::uno::Reference
< css::lang::XMultiServiceFactory
> xFactory
,
1285 const OUString
& rServiceName
, const OUString
& rObjNameBase
);
1287 /** Returns a named formatting object from the chart document. */
1288 css::uno::Any
GetObject( const OUString
& rObjName
);
1289 /** Insertes a named formatting object into the chart document. */
1290 OUString
InsertObject( const css::uno::Any
& rObj
);
1293 css::uno::Reference
< css::lang::XMultiServiceFactory
> mxFactory
; /// Factory to create the container.
1294 css::uno::Reference
< css::container::XNameContainer
> mxContainer
; /// Container for the objects.
1295 OUString maServiceName
; /// Service name to create the container.
1296 OUString maObjNameBase
; /// Base of names for inserted objects.
1297 sal_Int32 mnIndex
; /// Index to create unique identifiers.
1302 /** Helper class for usage of property sets. */
1303 class XclChPropSetHelper
1306 explicit XclChPropSetHelper();
1308 /** Reads all line properties from the passed property set. */
1309 void ReadLineProperties(
1310 XclChLineFormat
& rLineFmt
,
1311 XclChObjectTable
& rDashTable
,
1312 const ScfPropertySet
& rPropSet
,
1313 XclChPropertyMode ePropMode
);
1314 /** Reads solid area properties from the passed property set.
1315 @return true = object contains complex fill properties. */
1316 bool ReadAreaProperties(
1317 XclChAreaFormat
& rAreaFmt
,
1318 const ScfPropertySet
& rPropSet
,
1319 XclChPropertyMode ePropMode
);
1320 /** Reads gradient or bitmap area properties from the passed property set. */
1321 void ReadEscherProperties(
1322 XclChEscherFormat
& rEscherFmt
,
1323 XclChPicFormat
& rPicFmt
,
1324 XclChObjectTable
& rGradientTable
,
1325 XclChObjectTable
& rHatchTable
,
1326 XclChObjectTable
& rBitmapTable
,
1327 const ScfPropertySet
& rPropSet
,
1328 XclChPropertyMode ePropMode
);
1329 /** Reads all marker properties from the passed property set. */
1330 static void ReadMarkerProperties(
1331 XclChMarkerFormat
& rMarkerFmt
,
1332 const ScfPropertySet
& rPropSet
,
1333 sal_uInt16 nFormatIdx
);
1334 /** Reads rotation properties from the passed property set. */
1335 static sal_uInt16
ReadRotationProperties(
1336 const ScfPropertySet
& rPropSet
,
1337 bool bSupportsStacked
);
1339 /** Writes all line properties to the passed property set. */
1340 void WriteLineProperties(
1341 ScfPropertySet
& rPropSet
,
1342 XclChObjectTable
& rDashTable
,
1343 const XclChLineFormat
& rLineFmt
,
1344 XclChPropertyMode ePropMode
);
1345 /** Writes solid area properties to the passed property set. */
1346 void WriteAreaProperties(
1347 ScfPropertySet
& rPropSet
,
1348 const XclChAreaFormat
& rAreaFmt
,
1349 XclChPropertyMode ePropMode
);
1350 /** Writes gradient or bitmap area properties to the passed property set. */
1351 void WriteEscherProperties(
1352 ScfPropertySet
& rPropSet
,
1353 XclChObjectTable
& rGradientTable
,
1354 XclChObjectTable
& rHatchTable
,
1355 XclChObjectTable
& rBitmapTable
,
1356 const XclChEscherFormat
& rEscherFmt
,
1357 const XclChPicFormat
* pPicFmt
,
1358 sal_uInt32 nDffFillType
,
1359 XclChPropertyMode ePropMode
);
1360 /** Writes all marker properties to the passed property set. */
1361 static void WriteMarkerProperties(
1362 ScfPropertySet
& rPropSet
,
1363 const XclChMarkerFormat
& rMarkerFmt
);
1364 /** Writes rotation properties to the passed property set. */
1365 static void WriteRotationProperties(
1366 ScfPropertySet
& rPropSet
,
1367 sal_uInt16 nRotation
,
1368 bool bSupportsStacked
);
1371 /** Returns a line property set helper according to the passed property mode. */
1372 ScfPropSetHelper
& GetLineHelper( XclChPropertyMode ePropMode
);
1373 /** Returns an area property set helper according to the passed property mode. */
1374 ScfPropSetHelper
& GetAreaHelper( XclChPropertyMode ePropMode
);
1375 /** Returns a gradient property set helper according to the passed property mode. */
1376 ScfPropSetHelper
& GetGradientHelper( XclChPropertyMode ePropMode
);
1377 /** Returns a hatch property set helper according to the passed property mode. */
1378 ScfPropSetHelper
& GetHatchHelper( XclChPropertyMode ePropMode
);
1381 ScfPropSetHelper maLineHlpCommon
; /// Properties for lines in common objects.
1382 ScfPropSetHelper maLineHlpLinear
; /// Properties for lines in linear series.
1383 ScfPropSetHelper maLineHlpFilled
; /// Properties for lines in filled series.
1384 ScfPropSetHelper maAreaHlpCommon
; /// Properties for areas in common objects.
1385 ScfPropSetHelper maAreaHlpFilled
; /// Properties for areas in filled series.
1386 ScfPropSetHelper maGradHlpCommon
; /// Properties for gradients in common objects.
1387 ScfPropSetHelper maGradHlpFilled
; /// Properties for gradients in filled series.
1388 ScfPropSetHelper maHatchHlpCommon
; /// Properties for hatches in common objects.
1389 ScfPropSetHelper maHatchHlpFilled
; /// Properties for hatches in filled series.
1390 ScfPropSetHelper maBitmapHlp
; /// Properties for bitmaps.
1393 /** Base struct for internal root data structs for import and export. */
1394 struct XclChRootData
1396 typedef std::shared_ptr
< XclChTypeInfoProvider
> XclChTypeProvRef
;
1397 typedef std::shared_ptr
< XclChFormatInfoProvider
> XclChFmtInfoProvRef
;
1398 typedef std::shared_ptr
< XclChObjectTable
> XclChObjectTableRef
;
1399 typedef std::map
< XclChTextKey
, XclChGetShapeFunc
> XclChGetShapeFuncMap
;
1401 css::uno::Reference
< css::chart2::XChartDocument
>
1402 mxChartDoc
; /// The chart document.
1403 Rectangle maChartRect
; /// Position and size of the chart shape.
1404 XclChTypeProvRef mxTypeInfoProv
; /// Provides info about chart types.
1405 XclChFmtInfoProvRef mxFmtInfoProv
; /// Provides info about auto formatting.
1406 XclChObjectTableRef mxLineDashTable
; /// Container for line dash styles.
1407 XclChObjectTableRef mxGradientTable
; /// Container for gradient fill styles.
1408 XclChObjectTableRef mxHatchTable
; /// Container for hatch fill styles.
1409 XclChObjectTableRef mxBitmapTable
; /// Container for bitmap fill styles.
1410 XclChGetShapeFuncMap maGetShapeFuncs
; /// Maps title shape getter functions.
1411 sal_Int32 mnBorderGapX
; /// Border gap to chart space in 1/100mm.
1412 sal_Int32 mnBorderGapY
; /// Border gap to chart space in 1/100mm.
1413 double mfUnitSizeX
; /// Size of a chart X unit (1/4000 of chart width) in 1/100 mm.
1414 double mfUnitSizeY
; /// Size of a chart Y unit (1/4000 of chart height) in 1/100 mm.
1416 explicit XclChRootData();
1417 virtual ~XclChRootData();
1419 /** Starts the API chart document conversion. Must be called once before any API access. */
1420 void InitConversion(
1421 const XclRoot
& rRoot
,
1422 const css::uno::Reference
< css::chart2::XChartDocument
>& rxChartDoc
,
1423 const Rectangle
& rChartRect
);
1424 /** Finishes the API chart document conversion. Must be called once before any API access. */
1425 void FinishConversion();
1427 /** Returns the drawing shape interface of the specified title object. */
1428 css::uno::Reference
< css::drawing::XShape
>
1429 GetTitleShape( const XclChTextKey
& rTitleKey
) const;
1434 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */