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 // disable/enable support for varied point colors property
24 #define EXC_CHART2_VARYCOLORSBY_PROP 0
25 // disable/enable restriction to hair lines in 3D bar charts (#i83151#)
26 #define EXC_CHART2_3DBAR_HAIRLINES_ONLY 1
28 #include <tools/gen.hxx>
29 #include "fapihelper.hxx"
33 namespace com
{ namespace sun
{ namespace star
{
34 namespace container
{ class XNameContainer
; }
35 namespace lang
{ class XMultiServiceFactory
; }
36 namespace chart
{ class XChartDocument
; }
37 namespace chart2
{ class XChartDocument
; }
38 namespace drawing
{ class XShape
; }
43 // Property names =============================================================
46 #define SERVICE_DRAWING_BITMAPTABLE "com.sun.star.drawing.BitmapTable"
47 #define SERVICE_DRAWING_DASHTABLE "com.sun.star.drawing.DashTable"
48 #define SERVICE_DRAWING_GRADIENTTABLE "com.sun.star.drawing.GradientTable"
49 #define SERVICE_DRAWING_HATCHTABLE "com.sun.star.drawing.HatchTable"
51 #define SERVICE_CHART2_AXIS "com.sun.star.chart2.Axis"
52 #define SERVICE_CHART2_DATAPROVIDER "com.sun.star.chart2.data.DataProvider"
53 #define SERVICE_CHART2_DATASERIES "com.sun.star.chart2.DataSeries"
54 #define SERVICE_CHART2_DIAGRAM "com.sun.star.chart2.Diagram"
55 #define SERVICE_CHART2_ERRORBAR "com.sun.star.chart2.ErrorBar"
56 #define SERVICE_CHART2_LEGEND "com.sun.star.chart2.Legend"
57 #define SERVICE_CHART2_TITLE "com.sun.star.chart2.Title"
60 #define EXC_CHPROP_ADDITIONALSHAPES "AdditionalShapes"
61 #define EXC_CHPROP_ANCHORPOSITION "AnchorPosition"
62 #define EXC_CHPROP_ARRANGEORDER "ArrangeOrder"
63 #define EXC_CHPROP_ATTAXISINDEX "AttachedAxisIndex"
64 #define EXC_CHPROP_ATTRIBDATAPOINTS "AttributedDataPoints"
65 #define EXC_CHPROP_BLACKDAY "BlackDay"
66 #define EXC_CHPROP_COLOR "Color"
67 #define EXC_CHPROP_CONNECTBARS "ConnectBars"
68 #define EXC_CHPROP_CROSSOVERPOSITION "CrossoverPosition"
69 #define EXC_CHPROP_CROSSOVERVALUE "CrossoverValue"
70 #define EXC_CHPROP_CURVESTYLE "CurveStyle"
71 #define EXC_CHPROP_CURVENAME "CurveName"
72 #define EXC_CHPROP_D3DSCENEAMBIENTCOLOR "D3DSceneAmbientColor"
73 #define EXC_CHPROP_D3DSCENELIGHTON1 "D3DSceneLightOn1"
74 #define EXC_CHPROP_D3DSCENELIGHTCOLOR2 "D3DSceneLightColor2"
75 #define EXC_CHPROP_D3DSCENELIGHTDIR2 "D3DSceneLightDirection2"
76 #define EXC_CHPROP_D3DSCENELIGHTON2 "D3DSceneLightOn2"
77 #define EXC_CHPROP_D3DSCENEPERSPECTIVE "D3DScenePerspective"
78 #define EXC_CHPROP_D3DSCENESHADEMODE "D3DSceneShadeMode"
79 #define EXC_CHPROP_DISPLAYLABELS "DisplayLabels"
80 #define EXC_CHPROP_ERRORBARSTYLE "ErrorBarStyle"
81 #define EXC_CHPROP_ERRORBARX "ErrorBarX"
82 #define EXC_CHPROP_ERRORBARY "ErrorBarY"
83 #define EXC_CHPROP_EXPANSION "Expansion"
84 #define EXC_CHPROP_EXPTIMEINCREMENT "ExplicitTimeIncrement"
85 #define EXC_CHPROP_EXTRAPOLATE_FORWARD "ExtrapolateForward"
86 #define EXC_CHPROP_EXTRAPOLATE_BACKWARD "ExtrapolateBackward"
87 #define EXC_CHPROP_FORCE_INTERCEPT "ForceIntercept"
88 #define EXC_CHPROP_GAPWIDTHSEQ "GapwidthSequence"
89 #define EXC_CHPROP_GEOMETRY3D "Geometry3D"
90 #define EXC_CHPROP_INCLUDEHIDDENCELLS "IncludeHiddenCells"
91 #define EXC_CHPROP_INTERCEPT_VALUE "InterceptValue"
92 #define EXC_CHPROP_JAPANESE "Japanese"
93 #define EXC_CHPROP_LABEL "Label"
94 #define EXC_CHPROP_LABELPLACEMENT "LabelPlacement"
95 #define EXC_CHPROP_LABELPOSITION "LabelPosition"
96 #define EXC_CHPROP_LABELSEPARATOR "LabelSeparator"
97 #define EXC_CHPROP_MAJORTICKS "MajorTickmarks"
98 #define EXC_CHPROP_MARKPOSITION "MarkPosition"
99 #define EXC_CHPROP_MINORTICKS "MinorTickmarks"
100 #define EXC_CHPROP_MISSINGVALUETREATMENT "MissingValueTreatment"
101 #define EXC_CHPROP_MOVING_AVERAGE_PERIOD "MovingAveragePeriod"
102 #define EXC_CHPROP_NEGATIVEERROR "NegativeError"
103 #define EXC_CHPROP_NUMBERFORMAT "NumberFormat"
104 #define EXC_CHPROP_OFFSET "Offset"
105 #define EXC_CHPROP_OVERLAPSEQ "OverlapSequence"
106 #define EXC_CHPROP_PERCENTAGENUMFMT "PercentageNumberFormat"
107 #define EXC_CHPROP_PERCENTDIAGONAL "PercentDiagonal"
108 #define EXC_CHPROP_PERSPECTIVE "Perspective"
109 #define EXC_CHPROP_POSITIVEERROR "PositiveError"
110 #define EXC_CHPROP_POLYNOMIAL_DEGREE "PolynomialDegree"
111 #define EXC_CHPROP_RELATIVEPOSITION "RelativePosition"
112 #define EXC_CHPROP_RELATIVESIZE "RelativeSize"
113 #define EXC_CHPROP_RIGHTANGLEDAXES "RightAngledAxes"
114 #define EXC_CHPROP_ROLE "Role"
115 #define EXC_CHPROP_ROTATIONHORIZONTAL "RotationHorizontal"
116 #define EXC_CHPROP_ROTATIONVERTICAL "RotationVertical"
117 #define EXC_CHPROP_3DRELATIVEHEIGHT "3DRelativeHeight"
118 #define EXC_CHPROP_SHOW "Show"
119 #define EXC_CHPROP_SHOWCORRELATION "ShowCorrelationCoefficient"
120 #define EXC_CHPROP_SHOWEQUATION "ShowEquation"
121 #define EXC_CHPROP_SHOWFIRST "ShowFirst"
122 #define EXC_CHPROP_SHOWHIGHLOW "ShowHighLow"
123 #define EXC_CHPROP_SHOWNEGATIVEERROR "ShowNegativeError"
124 #define EXC_CHPROP_SHOWPOSITIVEERROR "ShowPositiveError"
125 #define EXC_CHPROP_STACKCHARACTERS "StackCharacters"
126 #define EXC_CHPROP_STACKINGDIR "StackingDirection"
127 #define EXC_CHPROP_STARTINGANGLE "StartingAngle"
128 #define EXC_CHPROP_SWAPXANDYAXIS "SwapXAndYAxis"
129 #define EXC_CHPROP_SYMBOL "Symbol"
130 #define EXC_CHPROP_TEXTBREAK "TextBreak"
131 #define EXC_CHPROP_TEXTOVERLAP "TextOverlap"
132 #define EXC_CHPROP_TEXTROTATION "TextRotation"
133 #define EXC_CHPROP_USERINGS "UseRings"
134 #define EXC_CHPROP_VARYCOLORSBY "VaryColorsByPoint"
135 #define EXC_CHPROP_WEIGHT "Weight"
136 #define EXC_CHPROP_WHITEDAY "WhiteDay"
139 #define EXC_CHPROP_ROLE_CATEG "categories"
140 #define EXC_CHPROP_ROLE_ERRORBARS_NEGX "error-bars-x-negative"
141 #define EXC_CHPROP_ROLE_ERRORBARS_NEGY "error-bars-y-negative"
142 #define EXC_CHPROP_ROLE_ERRORBARS_POSX "error-bars-x-positive"
143 #define EXC_CHPROP_ROLE_ERRORBARS_POSY "error-bars-y-positive"
144 #define EXC_CHPROP_ROLE_LABEL "label"
145 #define EXC_CHPROP_ROLE_XVALUES "values-x"
146 #define EXC_CHPROP_ROLE_YVALUES "values-y"
147 #define EXC_CHPROP_ROLE_OPENVALUES "values-first"
148 #define EXC_CHPROP_ROLE_CLOSEVALUES "values-last"
149 #define EXC_CHPROP_ROLE_LOWVALUES "values-min"
150 #define EXC_CHPROP_ROLE_HIGHVALUES "values-max"
151 #define EXC_CHPROP_ROLE_SIZEVALUES "values-size"
153 // Constants and Enumerations =================================================
155 const sal_Size EXC_CHART_PROGRESS_SIZE
= 10;
156 const sal_uInt16 EXC_CHART_AUTOROTATION
= 0xFFFF; /// Automatic rotation, e.g. axis labels (internal use only).
158 const sal_Int32 EXC_CHART_AXIS_NONE
= -1; /// For internal use only.
159 const sal_Int32 EXC_CHART_AXIS_X
= 0; /// API X axis index.
160 const sal_Int32 EXC_CHART_AXIS_Y
= 1; /// API Y axis index.
161 const sal_Int32 EXC_CHART_AXIS_Z
= 2; /// API Z axis index.
162 const sal_Int32 EXC_CHART_AXESSET_NONE
= -1; /// For internal use only.
163 const sal_Int32 EXC_CHART_AXESSET_PRIMARY
= 0; /// API primary axes set index.
164 const sal_Int32 EXC_CHART_AXESSET_SECONDARY
= 1; /// API secondary axes set index.
166 const sal_Int32 EXC_CHART_TOTALUNITS
= 4000; /// Most chart objects are positioned in 1/4000 of chart area.
167 const sal_Int32 EXC_CHART_PLOTAREAUNITS
= 1000; /// For objects that are positioned in 1/1000 of plot area.
169 // (0x0850) CHFRINFO ----------------------------------------------------------
171 const sal_uInt16 EXC_ID_CHFRINFO
= 0x0850;
173 const sal_uInt8 EXC_CHFRINFO_EXCEL2000
= 9;
174 const sal_uInt8 EXC_CHFRINFO_EXCELXP2003
= 10;
175 const sal_uInt8 EXC_CHFRINFO_EXCEL2007
= 11;
177 // (0x0852, 0x0853) CHFRBLOCKBEGIN, CHFRBLOCKEND ------------------------------
179 const sal_uInt16 EXC_ID_CHFRBLOCKBEGIN
= 0x0852;
180 const sal_uInt16 EXC_ID_CHFRBLOCKEND
= 0x0853;
182 const sal_uInt16 EXC_CHFRBLOCK_TYPE_AXESSET
= 0;
183 const sal_uInt16 EXC_CHFRBLOCK_TYPE_TEXT
= 2;
184 const sal_uInt16 EXC_CHFRBLOCK_TYPE_AXIS
= 4;
185 const sal_uInt16 EXC_CHFRBLOCK_TYPE_TYPEGROUP
= 5;
186 const sal_uInt16 EXC_CHFRBLOCK_TYPE_DATATABLE
= 6;
187 const sal_uInt16 EXC_CHFRBLOCK_TYPE_FRAME
= 7;
188 const sal_uInt16 EXC_CHFRBLOCK_TYPE_LEGEND
= 9;
189 const sal_uInt16 EXC_CHFRBLOCK_TYPE_LEGENDEX
= 10;
190 const sal_uInt16 EXC_CHFRBLOCK_TYPE_SERIES
= 12;
191 const sal_uInt16 EXC_CHFRBLOCK_TYPE_CHART
= 13;
192 const sal_uInt16 EXC_CHFRBLOCK_TYPE_DATAFORMAT
= 14;
193 const sal_uInt16 EXC_CHFRBLOCK_TYPE_DROPBAR
= 15;
194 const sal_uInt16 EXC_CHFRBLOCK_TYPE_UNKNOWN
= 0xFFFF; /// For internal use only.
196 const sal_uInt16 EXC_CHFRBLOCK_TEXT_TITLE
= 0;
197 const sal_uInt16 EXC_CHFRBLOCK_TEXT_DEFTEXT
= 2;
198 const sal_uInt16 EXC_CHFRBLOCK_TEXT_AXISTITLE
= 4;
199 const sal_uInt16 EXC_CHFRBLOCK_TEXT_DATALABEL
= 5;
201 const sal_uInt16 EXC_CHFRBLOCK_FRAME_STANDARD
= 0;
202 const sal_uInt16 EXC_CHFRBLOCK_FRAME_PLOTFRAME
= 1;
203 const sal_uInt16 EXC_CHFRBLOCK_FRAME_BACKGROUND
= 2;
205 // (0x086B) CHFRLABELPROPS ----------------------------------------------------
207 const sal_uInt16 EXC_ID_CHFRLABELPROPS
= 0x086B;
209 const sal_uInt16 EXC_CHFRLABELPROPS_SHOWSERIES
= 0x0001;
210 const sal_uInt16 EXC_CHFRLABELPROPS_SHOWCATEG
= 0x0002;
211 const sal_uInt16 EXC_CHFRLABELPROPS_SHOWVALUE
= 0x0004;
212 const sal_uInt16 EXC_CHFRLABELPROPS_SHOWPERCENT
= 0x0008;
213 const sal_uInt16 EXC_CHFRLABELPROPS_SHOWBUBBLE
= 0x0010;
215 // (0x1001) CHUNITS -----------------------------------------------------------
217 const sal_uInt16 EXC_ID_CHUNITS
= 0x1001;
219 const sal_uInt16 EXC_CHUNITS_TWIPS
= 0;
220 const sal_uInt16 EXC_CHUNITS_PIXELS
= 1;
222 // (0x1002) CHCHART -----------------------------------------------------------
224 const sal_uInt16 EXC_ID_CHCHART
= 0x1002;
226 // (0x1003) CHSERIES ----------------------------------------------------------
228 const sal_uInt16 EXC_ID_CHSERIES
= 0x1003;
230 const sal_uInt16 EXC_CHSERIES_DATE
= 0;
231 const sal_uInt16 EXC_CHSERIES_NUMERIC
= 1;
232 const sal_uInt16 EXC_CHSERIES_SEQUENCE
= 2;
233 const sal_uInt16 EXC_CHSERIES_TEXT
= 3;
235 const sal_uInt16 EXC_CHSERIES_MAXSERIES
= 255; /// Maximum valid series index.
236 const sal_uInt16 EXC_CHSERIES_INVALID
= 0xFFFF; /// Invalid series index (for internal use).
238 // (0x1006) CHDATAFORMAT ------------------------------------------------------
240 const sal_uInt16 EXC_ID_CHDATAFORMAT
= 0x1006;
242 const sal_uInt16 EXC_CHDATAFORMAT_MAXPOINTCOUNT
= 32000; /// Maximum number of data points.
243 const sal_uInt16 EXC_CHDATAFORMAT_DEFAULT
= 0xFFFD; /// As format index: global default for an axes set.
244 const sal_uInt16 EXC_CHDATAFORMAT_UNKNOWN
= 0xFFFE; /// As point index: unknown format, don't use.
245 const sal_uInt16 EXC_CHDATAFORMAT_ALLPOINTS
= 0xFFFF; /// As point index: default for a series.
247 const sal_uInt16 EXC_CHDATAFORMAT_OLDCOLORS
= 0x0001;
249 // (0x1007) CHLINEFORMAT ------------------------------------------------------
251 const sal_uInt16 EXC_ID_CHLINEFORMAT
= 0x1007;
253 const sal_uInt16 EXC_CHLINEFORMAT_SOLID
= 0;
254 const sal_uInt16 EXC_CHLINEFORMAT_DASH
= 1;
255 const sal_uInt16 EXC_CHLINEFORMAT_DOT
= 2;
256 const sal_uInt16 EXC_CHLINEFORMAT_DASHDOT
= 3;
257 const sal_uInt16 EXC_CHLINEFORMAT_DASHDOTDOT
= 4;
258 const sal_uInt16 EXC_CHLINEFORMAT_NONE
= 5;
259 const sal_uInt16 EXC_CHLINEFORMAT_DARKTRANS
= 6;
260 const sal_uInt16 EXC_CHLINEFORMAT_MEDTRANS
= 7;
261 const sal_uInt16 EXC_CHLINEFORMAT_LIGHTTRANS
= 8;
263 const sal_Int16 EXC_CHLINEFORMAT_HAIR
= -1;
264 const sal_Int16 EXC_CHLINEFORMAT_SINGLE
= 0;
265 const sal_Int16 EXC_CHLINEFORMAT_DOUBLE
= 1;
266 const sal_Int16 EXC_CHLINEFORMAT_TRIPLE
= 2;
268 const sal_uInt16 EXC_CHLINEFORMAT_AUTO
= 0x0001;
269 const sal_uInt16 EXC_CHLINEFORMAT_SHOWAXIS
= 0x0004;
271 // (0x1009) CHMARKERFORMAT ----------------------------------------------------
273 const sal_uInt16 EXC_ID_CHMARKERFORMAT
= 0x1009;
275 const sal_uInt16 EXC_CHMARKERFORMAT_NOSYMBOL
= 0;
276 const sal_uInt16 EXC_CHMARKERFORMAT_SQUARE
= 1;
277 const sal_uInt16 EXC_CHMARKERFORMAT_DIAMOND
= 2;
278 const sal_uInt16 EXC_CHMARKERFORMAT_TRIANGLE
= 3;
279 const sal_uInt16 EXC_CHMARKERFORMAT_CROSS
= 4;
280 const sal_uInt16 EXC_CHMARKERFORMAT_STAR
= 5;
281 const sal_uInt16 EXC_CHMARKERFORMAT_DOWJ
= 6;
282 const sal_uInt16 EXC_CHMARKERFORMAT_STDDEV
= 7;
283 const sal_uInt16 EXC_CHMARKERFORMAT_CIRCLE
= 8;
284 const sal_uInt16 EXC_CHMARKERFORMAT_PLUS
= 9;
286 const sal_uInt32 EXC_CHMARKERFORMAT_HAIRSIZE
= 60; /// Automatic symbol size for hair lines.
287 const sal_uInt32 EXC_CHMARKERFORMAT_SINGLESIZE
= 100; /// Automatic symbol size for single lines.
288 const sal_uInt32 EXC_CHMARKERFORMAT_DOUBLESIZE
= 140; /// Automatic symbol size for double lines.
289 const sal_uInt32 EXC_CHMARKERFORMAT_TRIPLESIZE
= 180; /// Automatic symbol size for triple lines.
291 const sal_uInt16 EXC_CHMARKERFORMAT_AUTO
= 0x0001;
292 const sal_uInt16 EXC_CHMARKERFORMAT_NOFILL
= 0x0010;
293 const sal_uInt16 EXC_CHMARKERFORMAT_NOLINE
= 0x0020;
295 // (0x100A) CHAREAFORMAT ------------------------------------------------------
297 const sal_uInt16 EXC_ID_CHAREAFORMAT
= 0x100A;
299 const sal_uInt16 EXC_CHAREAFORMAT_AUTO
= 0x0001;
300 const sal_uInt16 EXC_CHAREAFORMAT_INVERTNEG
= 0x0002;
302 // (0x100B) CHPIEFORMAT -------------------------------------------------------
304 const sal_uInt16 EXC_ID_CHPIEFORMAT
= 0x100B;
306 // (0x100C) CHATTACHEDLABEL ---------------------------------------------------
308 const sal_uInt16 EXC_ID_CHATTACHEDLABEL
= 0x100C;
310 const sal_uInt16 EXC_CHATTLABEL_SHOWVALUE
= 0x0001;
311 const sal_uInt16 EXC_CHATTLABEL_SHOWPERCENT
= 0x0002;
312 const sal_uInt16 EXC_CHATTLABEL_SHOWCATEGPERC
= 0x0004;
313 const sal_uInt16 EXC_CHATTLABEL_SMOOTHED
= 0x0008; /// Smoothed line.
314 const sal_uInt16 EXC_CHATTLABEL_SHOWCATEG
= 0x0010;
315 const sal_uInt16 EXC_CHATTLABEL_SHOWBUBBLE
= 0x0020;
317 // (0x100D) CHSTRING ----------------------------------------------------------
319 const sal_uInt16 EXC_ID_CHSTRING
= 0x100D;
321 // (0x1014) CHTYPEGROUP -------------------------------------------------------
323 const sal_uInt16 EXC_ID_CHTYPEGROUP
= 0x1014;
325 const sal_uInt16 EXC_CHTYPEGROUP_VARIEDCOLORS
= 0x0001; /// Varied colors for points.
327 // (0x1015) CHLEGEND ----------------------------------------------------------
329 const sal_uInt16 EXC_ID_CHLEGEND
= 0x1015;
331 const sal_uInt8 EXC_CHLEGEND_BOTTOM
= 0;
332 const sal_uInt8 EXC_CHLEGEND_CORNER
= 1;
333 const sal_uInt8 EXC_CHLEGEND_TOP
= 2;
334 const sal_uInt8 EXC_CHLEGEND_RIGHT
= 3;
335 const sal_uInt8 EXC_CHLEGEND_LEFT
= 4;
336 const sal_uInt8 EXC_CHLEGEND_NOTDOCKED
= 7;
338 const sal_uInt8 EXC_CHLEGEND_CLOSE
= 0;
339 const sal_uInt8 EXC_CHLEGEND_MEDIUM
= 1;
340 const sal_uInt8 EXC_CHLEGEND_OPEN
= 2;
342 const sal_uInt16 EXC_CHLEGEND_DOCKED
= 0x0001;
343 const sal_uInt16 EXC_CHLEGEND_AUTOSERIES
= 0x0002;
344 const sal_uInt16 EXC_CHLEGEND_AUTOPOSX
= 0x0004;
345 const sal_uInt16 EXC_CHLEGEND_AUTOPOSY
= 0x0008;
346 const sal_uInt16 EXC_CHLEGEND_STACKED
= 0x0010;
347 const sal_uInt16 EXC_CHLEGEND_DATATABLE
= 0x0020;
349 // (0x1017) CHBAR, CHCOLUMN ---------------------------------------------------
351 const sal_uInt16 EXC_ID_CHBAR
= 0x1017;
353 const sal_uInt16 EXC_CHBAR_HORIZONTAL
= 0x0001;
354 const sal_uInt16 EXC_CHBAR_STACKED
= 0x0002;
355 const sal_uInt16 EXC_CHBAR_PERCENT
= 0x0004;
356 const sal_uInt16 EXC_CHBAR_SHADOW
= 0x0008;
358 // (0x1018, 0x101A) CHLINE, CHAREA --------------------------------------------
360 const sal_uInt16 EXC_ID_CHLINE
= 0x1018;
361 const sal_uInt16 EXC_ID_CHAREA
= 0x101A;
363 const sal_uInt16 EXC_CHLINE_STACKED
= 0x0001;
364 const sal_uInt16 EXC_CHLINE_PERCENT
= 0x0002;
365 const sal_uInt16 EXC_CHLINE_SHADOW
= 0x0004;
367 // (0x1019) CHPIE -------------------------------------------------------------
369 const sal_uInt16 EXC_ID_CHPIE
= 0x1019;
371 const sal_uInt16 EXC_CHPIE_SHADOW
= 0x0001;
372 const sal_uInt16 EXC_CHPIE_LINES
= 0x0002;
374 // (0x101B) CHSCATTER ---------------------------------------------------------
376 const sal_uInt16 EXC_ID_CHSCATTER
= 0x101B;
378 const sal_uInt16 EXC_CHSCATTER_AREA
= 1; /// Bubble area refers to value.
379 const sal_uInt16 EXC_CHSCATTER_WIDTH
= 2; /// Bubble width refers to value.
381 const sal_uInt16 EXC_CHSCATTER_BUBBLES
= 0x0001;
382 const sal_uInt16 EXC_CHSCATTER_SHOWNEG
= 0x0002;
383 const sal_uInt16 EXC_CHSCATTER_SHADOW
= 0x0004;
385 // (0x001C) CHCHARTLINE -------------------------------------------------------
387 const sal_uInt16 EXC_ID_CHCHARTLINE
= 0x101C;
389 const sal_uInt16 EXC_CHCHARTLINE_DROP
= 0; /// Drop lines.
390 const sal_uInt16 EXC_CHCHARTLINE_HILO
= 1; /// Hi-lo lines.
391 const sal_uInt16 EXC_CHCHARTLINE_CONNECT
= 2; /// Connector lines in stacked bar charts.
393 // (0x101D) CHAXIS ------------------------------------------------------------
395 const sal_uInt16 EXC_ID_CHAXIS
= 0x101D;
397 const sal_uInt16 EXC_CHAXIS_X
= 0;
398 const sal_uInt16 EXC_CHAXIS_Y
= 1;
399 const sal_uInt16 EXC_CHAXIS_Z
= 2;
400 const sal_uInt16 EXC_CHAXIS_NONE
= 0xFFFF; /// For internal use only.
402 // (0x101E) CHTICK ------------------------------------------------------------
404 const sal_uInt16 EXC_ID_CHTICK
= 0x101E;
406 const sal_uInt8 EXC_CHTICK_INSIDE
= 0x01;
407 const sal_uInt8 EXC_CHTICK_OUTSIDE
= 0x02;
409 const sal_uInt8 EXC_CHTICK_NOLABEL
= 0;
410 const sal_uInt8 EXC_CHTICK_LOW
= 1; /// Below diagram/right of diagram.
411 const sal_uInt8 EXC_CHTICK_HIGH
= 2; /// Above diagram/left of diagram.
412 const sal_uInt8 EXC_CHTICK_NEXT
= 3; /// Next to axis.
414 const sal_uInt8 EXC_CHTICK_TRANSPARENT
= 1;
415 const sal_uInt8 EXC_CHTICK_OPAQUE
= 2;
417 const sal_uInt16 EXC_CHTICK_AUTOCOLOR
= 0x0001;
418 const sal_uInt16 EXC_CHTICK_AUTOFILL
= 0x0002;
419 const sal_uInt16 EXC_CHTICK_AUTOROT
= 0x0020;
421 // (0x101F) CHVALUERANGE ------------------------------------------------------
423 const sal_uInt16 EXC_ID_CHVALUERANGE
= 0x101F;
425 const sal_uInt16 EXC_CHVALUERANGE_AUTOMIN
= 0x0001;
426 const sal_uInt16 EXC_CHVALUERANGE_AUTOMAX
= 0x0002;
427 const sal_uInt16 EXC_CHVALUERANGE_AUTOMAJOR
= 0x0004;
428 const sal_uInt16 EXC_CHVALUERANGE_AUTOMINOR
= 0x0008;
429 const sal_uInt16 EXC_CHVALUERANGE_AUTOCROSS
= 0x0010;
430 const sal_uInt16 EXC_CHVALUERANGE_LOGSCALE
= 0x0020;
431 const sal_uInt16 EXC_CHVALUERANGE_REVERSE
= 0x0040; /// Axis direction reversed.
432 const sal_uInt16 EXC_CHVALUERANGE_MAXCROSS
= 0x0080; /// Other axis crosses at own maximum.
433 const sal_uInt16 EXC_CHVALUERANGE_BIT8
= 0x0100; /// This bit is always set in BIFF5+.
435 // (0x1020) CHLABELRANGE -----------------------------------------------------
437 const sal_uInt16 EXC_ID_CHLABELRANGE
= 0x1020;
439 const sal_uInt16 EXC_CHLABELRANGE_BETWEEN
= 0x0001; /// Axis between categories.
440 const sal_uInt16 EXC_CHLABELRANGE_MAXCROSS
= 0x0002; /// Other axis crosses at own maximum.
441 const sal_uInt16 EXC_CHLABELRANGE_REVERSE
= 0x0004; /// Axis direction reversed.
443 // (0x1021) CHAXISLINE --------------------------------------------------------
445 const sal_uInt16 EXC_ID_CHAXISLINE
= 0x1021;
447 const sal_uInt16 EXC_CHAXISLINE_AXISLINE
= 0; /// Axis line itself.
448 const sal_uInt16 EXC_CHAXISLINE_MAJORGRID
= 1; /// Major grid line.
449 const sal_uInt16 EXC_CHAXISLINE_MINORGRID
= 2; /// Minor grid line.
450 const sal_uInt16 EXC_CHAXISLINE_WALLS
= 3; /// Walls (X, Z axis), floor (Y axis).
452 // (0x1024) CHDEFAULTTEXT -----------------------------------------------------
454 const sal_uInt16 EXC_ID_CHDEFAULTTEXT
= 0x1024;
456 const sal_uInt16 EXC_CHDEFTEXT_TEXTLABEL
= 0; /// Default for text data labels (not used?).
457 const sal_uInt16 EXC_CHDEFTEXT_NUMLABEL
= 1; /// Default for numeric data labels (not used?).
458 const sal_uInt16 EXC_CHDEFTEXT_GLOBAL
= 2; /// Default text for all chart objects.
459 const sal_uInt16 EXC_CHDEFTEXT_AXESSET
= 3; /// Default text for axes and data points (BIFF8 only).
460 const sal_uInt16 EXC_CHDEFTEXT_NONE
= 0xFFFF; /// No default text available.
462 // (0x1025) CHTEXT ------------------------------------------------------------
464 const sal_uInt16 EXC_ID_CHTEXT
= 0x1025;
466 const sal_uInt8 EXC_CHTEXT_ALIGN_TOPLEFT
= 1; /// Horizontal: left, vertical: top.
467 const sal_uInt8 EXC_CHTEXT_ALIGN_CENTER
= 2;
468 const sal_uInt8 EXC_CHTEXT_ALIGN_BOTTOMRIGHT
= 3; /// Horizontal: right, vertical: bottom.
469 const sal_uInt8 EXC_CHTEXT_ALIGN_JUSTIFY
= 4;
470 const sal_uInt8 EXC_CHTEXT_ALIGN_DISTRIBUTE
= 5;
472 const sal_uInt16 EXC_CHTEXT_TRANSPARENT
= 1;
473 const sal_uInt16 EXC_CHTEXT_OPAQUE
= 2;
475 const sal_uInt16 EXC_CHTEXT_AUTOCOLOR
= 0x0001; /// Automatic text color.
476 const sal_uInt16 EXC_CHTEXT_SHOWSYMBOL
= 0x0002; /// Legend symbol for data point caption.
477 const sal_uInt16 EXC_CHTEXT_SHOWVALUE
= 0x0004; /// Data point caption is the value.
478 const sal_uInt16 EXC_CHTEXT_VERTICAL
= 0x0008;
479 const sal_uInt16 EXC_CHTEXT_AUTOTEXT
= 0x0010; /// Label text generated from chart data.
480 const sal_uInt16 EXC_CHTEXT_AUTOGEN
= 0x0020; /// Text object is inserted automatically.
481 const sal_uInt16 EXC_CHTEXT_DELETED
= 0x0040; /// Text object is removed.
482 const sal_uInt16 EXC_CHTEXT_AUTOFILL
= 0x0080; /// Automatic text background mode (transparent/opaque).
483 const sal_uInt16 EXC_CHTEXT_SHOWCATEGPERC
= 0x0800; /// Data point caption is category and percent.
484 const sal_uInt16 EXC_CHTEXT_SHOWPERCENT
= 0x1000; /// Data point caption as percent.
485 const sal_uInt16 EXC_CHTEXT_SHOWBUBBLE
= 0x2000; /// Show bubble size.
486 const sal_uInt16 EXC_CHTEXT_SHOWCATEG
= 0x4000; /// Data point caption is category name.
488 const sal_uInt16 EXC_CHTEXT_POS_DEFAULT
= 0;
489 const sal_uInt16 EXC_CHTEXT_POS_OUTSIDE
= 1;
490 const sal_uInt16 EXC_CHTEXT_POS_INSIDE
= 2;
491 const sal_uInt16 EXC_CHTEXT_POS_CENTER
= 3;
492 const sal_uInt16 EXC_CHTEXT_POS_AXIS
= 4;
493 const sal_uInt16 EXC_CHTEXT_POS_ABOVE
= 5;
494 const sal_uInt16 EXC_CHTEXT_POS_BELOW
= 6;
495 const sal_uInt16 EXC_CHTEXT_POS_LEFT
= 7;
496 const sal_uInt16 EXC_CHTEXT_POS_RIGHT
= 8;
497 const sal_uInt16 EXC_CHTEXT_POS_AUTO
= 9;
498 const sal_uInt16 EXC_CHTEXT_POS_MOVED
= 10;
500 // (0x1026) CHFONT ------------------------------------------------------------
502 const sal_uInt16 EXC_ID_CHFONT
= 0x1026;
504 // (0x1027) CHOBJECTLINK ------------------------------------------------------
506 const sal_uInt16 EXC_ID_CHOBJECTLINK
= 0x1027;
509 const sal_uInt16 EXC_CHOBJLINK_NONE
= 0; /// No link target.
510 const sal_uInt16 EXC_CHOBJLINK_TITLE
= 1; /// Chart title.
511 const sal_uInt16 EXC_CHOBJLINK_YAXIS
= 2; /// Value axis (Y axis).
512 const sal_uInt16 EXC_CHOBJLINK_XAXIS
= 3; /// Category axis (X axis).
513 const sal_uInt16 EXC_CHOBJLINK_DATA
= 4; /// Data series/point.
514 const sal_uInt16 EXC_CHOBJLINK_ZAXIS
= 7; /// Series axis (Z axis).
515 const sal_uInt16 EXC_CHOBJLINK_AXISUNIT
= 12; /// Unit name for axis labels.
517 // (0x1032) CHFRAME -----------------------------------------------------------
519 const sal_uInt16 EXC_ID_CHFRAME
= 0x1032;
521 const sal_uInt16 EXC_CHFRAME_STANDARD
= 0;
522 const sal_uInt16 EXC_CHFRAME_SHADOW
= 4;
524 const sal_uInt16 EXC_CHFRAME_AUTOSIZE
= 0x0001;
525 const sal_uInt16 EXC_CHFRAME_AUTOPOS
= 0x0002;
527 // (0x1033, 0x1034) CHBEGIN, CHEND --------------------------------------------
529 const sal_uInt16 EXC_ID_CHBEGIN
= 0x1033;
530 const sal_uInt16 EXC_ID_CHEND
= 0x1034;
532 // (0x1035) CHPLOTFRAME -------------------------------------------------------
534 const sal_uInt16 EXC_ID_CHPLOTFRAME
= 0x1035;
536 // (0x103A) CHCHART3D ---------------------------------------------------------
538 const sal_uInt16 EXC_ID_CHCHART3D
= 0x103A;
540 const sal_uInt16 EXC_CHCHART3D_REAL3D
= 0x0001; /// true = real 3d perspective.
541 const sal_uInt16 EXC_CHCHART3D_CLUSTER
= 0x0002; /// false = Z axis, true = clustered/stacked.
542 const sal_uInt16 EXC_CHCHART3D_AUTOHEIGHT
= 0x0004; /// true = automatic height to width ratio.
543 const sal_uInt16 EXC_CHCHART3D_HASWALLS
= 0x0010; /// true = 3d chart has walls/floor.
544 const sal_uInt16 EXC_CHCHART3D_2DWALLS
= 0x0020; /// true = 2d wall/gridlines, no floor.
546 // (0x103C) CHPICFORMAT -------------------------------------------------------
548 const sal_uInt16 EXC_ID_CHPICFORMAT
= 0x103C;
550 const sal_uInt16 EXC_CHPICFORMAT_NONE
= 0; /// For internal use only.
551 const sal_uInt16 EXC_CHPICFORMAT_STRETCH
= 1; /// Bitmap stretched to area.
552 const sal_uInt16 EXC_CHPICFORMAT_STACK
= 2; /// Bitmap stacked.
553 const sal_uInt16 EXC_CHPICFORMAT_SCALE
= 3; /// Bitmap scaled to axis scale.
555 const sal_uInt16 EXC_CHPICFORMAT_TOPBOTTOM
= 0x0200;
556 const sal_uInt16 EXC_CHPICFORMAT_FRONTBACK
= 0x0400;
557 const sal_uInt16 EXC_CHPICFORMAT_LEFTRIGHT
= 0x0800;
559 // (0x103D) CHDROPBAR ---------------------------------------------------------
561 const sal_uInt16 EXC_ID_CHDROPBAR
= 0x103D;
563 const sal_uInt16 EXC_CHDROPBAR_UP
= 0;
564 const sal_uInt16 EXC_CHDROPBAR_DOWN
= 1;
565 const sal_uInt16 EXC_CHDROPBAR_NONE
= 0xFFFF;
567 // (0x103E, 0x1040) CHRADARLINE, CHRADARAREA ----------------------------------
569 const sal_uInt16 EXC_ID_CHRADARLINE
= 0x103E;
570 const sal_uInt16 EXC_ID_CHRADARAREA
= 0x1040;
572 const sal_uInt16 EXC_CHRADAR_AXISLABELS
= 0x0001;
573 const sal_uInt16 EXC_CHRADAR_SHADOW
= 0x0002;
575 // (0x103F) CHSURFACE ---------------------------------------------------------
577 const sal_uInt16 EXC_ID_CHSURFACE
= 0x103F;
579 const sal_uInt16 EXC_CHSURFACE_FILLED
= 0x0001;
580 const sal_uInt16 EXC_CHSURFACE_SHADING
= 0x0002;
582 // (0x1041) CHAXESSET ---------------------------------------------------------
584 const sal_uInt16 EXC_ID_CHAXESSET
= 0x1041;
586 const sal_uInt16 EXC_CHAXESSET_PRIMARY
= 0;
587 const sal_uInt16 EXC_CHAXESSET_SECONDARY
= 1;
588 const sal_uInt16 EXC_CHAXESSET_NONE
= 0xFFFF; /// For internal use.
590 // (0x1044) CHPROPERTIES ------------------------------------------------------
592 const sal_uInt16 EXC_ID_CHPROPERTIES
= 0x1044;
594 const sal_uInt16 EXC_CHPROPS_MANSERIES
= 0x0001; /// Manual series allocation.
595 const sal_uInt16 EXC_CHPROPS_SHOWVISIBLEONLY
= 0x0002; /// Show visible cells only.
596 const sal_uInt16 EXC_CHPROPS_NORESIZE
= 0x0004; /// Do not resize chart with window.
597 const sal_uInt16 EXC_CHPROPS_MANPLOTAREA
= 0x0008; /// Manual plot area mode.
598 const sal_uInt16 EXC_CHPROPS_USEMANPLOTAREA
= 0x0010; /// Manual plot area layout in CHFRAMEPOS record.
600 const sal_uInt8 EXC_CHPROPS_EMPTY_SKIP
= 0; /// Skip empty values.
601 const sal_uInt8 EXC_CHPROPS_EMPTY_ZERO
= 1; /// Plot empty values as zero.
602 const sal_uInt8 EXC_CHPROPS_EMPTY_INTERPOLATE
= 2; /// Interpolate empty values.
604 // (0x1045) CHSERGROUP --------------------------------------------------------
606 const sal_uInt16 EXC_ID_CHSERGROUP
= 0x1045;
608 const sal_uInt16 EXC_CHSERGROUP_NONE
= 0xFFFF; /// For internal use: no chart type group.
610 // (0x1048, 0x0858) CHPIVOTREF ------------------------------------------------
612 const sal_uInt16 EXC_ID5_CHPIVOTREF
= 0x1048;
613 const sal_uInt16 EXC_ID8_CHPIVOTREF
= 0x0858;
615 // (0x104A) CHSERPARENT -------------------------------------------------------
617 const sal_uInt16 EXC_ID_CHSERPARENT
= 0x104A;
619 // (0x104B) CHSERTRENDLINE ----------------------------------------------------
621 const sal_uInt16 EXC_ID_CHSERTRENDLINE
= 0x104B;
623 const sal_uInt8 EXC_CHSERTREND_POLYNOMIAL
= 0; /// If order is 1, trend line is linear.
624 const sal_uInt8 EXC_CHSERTREND_EXPONENTIAL
= 1;
625 const sal_uInt8 EXC_CHSERTREND_LOGARITHMIC
= 2;
626 const sal_uInt8 EXC_CHSERTREND_POWER
= 3;
627 const sal_uInt8 EXC_CHSERTREND_MOVING_AVG
= 4;
629 // (0x104E) CHFORMAT ----------------------------------------------------------
631 const sal_uInt16 EXC_ID_CHFORMAT
= 0x104E;
633 // (0x104F) CHFRAMEPOS --------------------------------------------------------
635 const sal_uInt16 EXC_ID_CHFRAMEPOS
= 0x104F;
637 const sal_uInt16 EXC_CHFRAMEPOS_POINTS
= 0;
638 const sal_uInt16 EXC_CHFRAMEPOS_ABSSIZE_POINTS
= 1;
639 const sal_uInt16 EXC_CHFRAMEPOS_PARENT
= 2;
640 const sal_uInt16 EXC_CHFRAMEPOS_DEFOFFSET_PLOT
= 3;
641 const sal_uInt16 EXC_CHFRAMEPOS_CHARTSIZE
= 5;
643 // (0x1050) CHFORMATRUNS ------------------------------------------------------
645 const sal_uInt16 EXC_ID_CHFORMATRUNS
= 0x1050;
647 // (0x1051) CHSOURCELINK ------------------------------------------------------
649 const sal_uInt16 EXC_ID_CHSOURCELINK
= 0x1051;
651 const sal_uInt8 EXC_CHSRCLINK_TITLE
= 0;
652 const sal_uInt8 EXC_CHSRCLINK_VALUES
= 1;
653 const sal_uInt8 EXC_CHSRCLINK_CATEGORY
= 2;
654 const sal_uInt8 EXC_CHSRCLINK_BUBBLES
= 3;
656 const sal_uInt8 EXC_CHSRCLINK_DEFAULT
= 0;
657 const sal_uInt8 EXC_CHSRCLINK_DIRECTLY
= 1;
658 const sal_uInt8 EXC_CHSRCLINK_WORKSHEET
= 2;
660 const sal_uInt16 EXC_CHSRCLINK_NUMFMT
= 0x0001;
662 // (0x105B) CHSERERRORBAR -----------------------------------------------------
664 const sal_uInt16 EXC_ID_CHSERERRORBAR
= 0x105B;
666 const sal_uInt8 EXC_CHSERERR_NONE
= 0; /// For internal use only.
667 const sal_uInt8 EXC_CHSERERR_XPLUS
= 1;
668 const sal_uInt8 EXC_CHSERERR_XMINUS
= 2;
669 const sal_uInt8 EXC_CHSERERR_YPLUS
= 3;
670 const sal_uInt8 EXC_CHSERERR_YMINUS
= 4;
672 const sal_uInt8 EXC_CHSERERR_PERCENT
= 1;
673 const sal_uInt8 EXC_CHSERERR_FIXED
= 2;
674 const sal_uInt8 EXC_CHSERERR_STDDEV
= 3;
675 const sal_uInt8 EXC_CHSERERR_CUSTOM
= 4;
676 const sal_uInt8 EXC_CHSERERR_STDERR
= 5;
678 const sal_uInt8 EXC_CHSERERR_END_BLANK
= 0; /// Line end: blank.
679 const sal_uInt8 EXC_CHSERERR_END_TSHAPE
= 1; /// Line end: t-shape.
681 // (0x105D) CHSERIESFORMAT ----------------------------------------------------
683 const sal_uInt16 EXC_ID_CHSERIESFORMAT
= 0x105D;
685 const sal_uInt16 EXC_CHSERIESFORMAT_SMOOTHED
= 0x0001;
686 const sal_uInt16 EXC_CHSERIESFORMAT_BUBBLE3D
= 0x0002;
687 const sal_uInt16 EXC_CHSERIESFORMAT_SHADOW
= 0x0004;
689 // (0x105F) CH3DDATAFORMAT ----------------------------------------------------
691 const sal_uInt16 EXC_ID_CH3DDATAFORMAT
= 0x105F;
693 const sal_uInt8 EXC_CH3DDATAFORMAT_RECT
= 0; /// Rectangular base.
694 const sal_uInt8 EXC_CH3DDATAFORMAT_CIRC
= 1; /// Circular base.
696 const sal_uInt8 EXC_CH3DDATAFORMAT_STRAIGHT
= 0; /// Straight to top.
697 const sal_uInt8 EXC_CH3DDATAFORMAT_SHARP
= 1; /// Sharp top.
698 const sal_uInt8 EXC_CH3DDATAFORMAT_TRUNC
= 2; /// Shart top, truncated.
700 // (0x1061) CHPIEEXT ----------------------------------------------------------
702 const sal_uInt16 EXC_ID_CHPIEEXT
= 0x1061;
704 // (0x1062) CHDATERANGE -------------------------------------------------------
706 const sal_uInt16 EXC_ID_CHDATERANGE
= 0x1062;
708 const sal_uInt16 EXC_CHDATERANGE_AUTOMIN
= 0x0001;
709 const sal_uInt16 EXC_CHDATERANGE_AUTOMAX
= 0x0002;
710 const sal_uInt16 EXC_CHDATERANGE_AUTOMAJOR
= 0x0004;
711 const sal_uInt16 EXC_CHDATERANGE_AUTOMINOR
= 0x0008;
712 const sal_uInt16 EXC_CHDATERANGE_DATEAXIS
= 0x0010;
713 const sal_uInt16 EXC_CHDATERANGE_AUTOBASE
= 0x0020;
714 const sal_uInt16 EXC_CHDATERANGE_AUTOCROSS
= 0x0040; /// Other axis crosses at own maximum.
715 const sal_uInt16 EXC_CHDATERANGE_AUTODATE
= 0x0080; /// Recognize date/text automatically.
717 const sal_uInt16 EXC_CHDATERANGE_DAYS
= 0;
718 const sal_uInt16 EXC_CHDATERANGE_MONTHS
= 1;
719 const sal_uInt16 EXC_CHDATERANGE_YEARS
= 2;
721 // (0x1066) CHESCHERFORMAT ----------------------------------------------------
723 const sal_uInt16 EXC_ID_CHESCHERFORMAT
= 0x1066;
725 // Other record IDs -----------------------------------------------------------
727 const sal_uInt16 EXC_ID_CHWRAPPEDRECORD
= 0x0851;
728 const sal_uInt16 EXC_ID_CHUNITPROPERTIES
= 0x0857;
729 const sal_uInt16 EXC_ID_CHUSEDAXESSETS
= 0x1046;
730 const sal_uInt16 EXC_ID_CHLABELRANGE2
= 0x1062;
731 const sal_uInt16 EXC_ID_CHPLOTGROWTH
= 0x1064;
732 const sal_uInt16 EXC_ID_CHSERINDEX
= 0x1065;
733 const sal_uInt16 EXC_ID_CHUNKNOWN
= 0xFFFF;
735 // Structs and classes
737 // Common =====================================================================
739 struct XclChRectangle
741 sal_Int32 mnX
; /// X position of the object in 1/4000 of chart width.
742 sal_Int32 mnY
; /// Y position of the object in 1/4000 of chart height.
743 sal_Int32 mnWidth
; /// Width of the object in 1/4000 of chart width.
744 sal_Int32 mnHeight
; /// Height of the object in 1/4000 of chart height.
746 explicit XclChRectangle();
749 /** Specifies the position of a data series or data point. */
750 struct XclChDataPointPos
752 sal_uInt16 mnSeriesIdx
; /// Series index of series or a data point.
753 sal_uInt16 mnPointIdx
; /// Index of a data point inside a series.
755 explicit XclChDataPointPos(
756 sal_uInt16 nSeriesIdx
= EXC_CHSERIES_INVALID
,
757 sal_uInt16 nPointIdx
= EXC_CHDATAFORMAT_ALLPOINTS
);
760 bool operator<( const XclChDataPointPos
& rL
, const XclChDataPointPos
& rR
);
762 /** Contains the type and context of a block of future records which are
763 guarded by CHFRBLOCKBEGIN and CHFRBLOCKEND records. */
766 sal_uInt16 mnType
; /// Type of the future record block.
767 sal_uInt16 mnContext
; /// Context dependent on type.
768 sal_uInt16 mnValue1
; /// Optional primary value for current context.
769 sal_uInt16 mnValue2
; /// Optional secondary value for current context.
771 explicit XclChFrBlock( sal_uInt16 nType
);
774 // Frame formatting ===========================================================
778 XclChRectangle maRect
; /// Object dependent position data.
779 sal_uInt16 mnTLMode
; /// Top-left position mode.
780 sal_uInt16 mnBRMode
; /// Bottom-right position mode.
782 explicit XclChFramePos();
785 struct XclChLineFormat
787 Color maColor
; /// Line color.
788 sal_uInt16 mnPattern
; /// Line pattern (solid, dashed, ...).
789 sal_Int16 mnWeight
; /// Line weight (hairline, single, ...).
790 sal_uInt16 mnFlags
; /// Additional flags.
792 explicit XclChLineFormat();
795 struct XclChAreaFormat
797 Color maPattColor
; /// Pattern color.
798 Color maBackColor
; /// Pattern background color.
799 sal_uInt16 mnPattern
; /// Fill pattern.
800 sal_uInt16 mnFlags
; /// Additional flags.
802 explicit XclChAreaFormat();
806 class EscherPropertyContainer
;
808 struct XclChEscherFormat
810 typedef std::shared_ptr
< SfxItemSet
> SfxItemSetRef
;
811 typedef std::shared_ptr
< EscherPropertyContainer
> EscherPropSetRef
;
813 SfxItemSetRef mxItemSet
; /// Item set for Escher properties import.
814 EscherPropSetRef mxEscherSet
; /// Container for Escher properties export.
816 explicit XclChEscherFormat();
817 ~XclChEscherFormat();
820 struct XclChPicFormat
822 sal_uInt16 mnBmpMode
; /// Bitmap mode, e.g. stretched, stacked.
823 sal_uInt16 mnFlags
; /// Additional flags.
824 double mfScale
; /// Picture scaling (units).
826 explicit XclChPicFormat();
831 sal_uInt16 mnFormat
; /// Format type of the frame.
832 sal_uInt16 mnFlags
; /// Additional flags.
834 explicit XclChFrame();
837 // Source links ===============================================================
839 struct XclChSourceLink
841 sal_uInt8 mnDestType
; /// Type of the destination (title, values, ...).
842 sal_uInt8 mnLinkType
; /// Link type (directly, linked to worksheet, ...).
843 sal_uInt16 mnFlags
; /// Additional flags.
844 sal_uInt16 mnNumFmtIdx
; /// Number format index.
846 explicit XclChSourceLink();
849 // Text =======================================================================
851 struct XclChObjectLink
853 XclChDataPointPos maPointPos
; /// Position of the data point.
854 sal_uInt16 mnTarget
; /// Target of the link.
856 explicit XclChObjectLink();
859 struct XclChFrLabelProps
861 OUString maSeparator
; /// Separator between label values.
862 sal_uInt16 mnFlags
; /// Flags indicating which values to be displayed.
864 explicit XclChFrLabelProps();
869 XclChRectangle maRect
; /// Position of the text object.
870 Color maTextColor
; /// Text color.
871 sal_uInt8 mnHAlign
; /// Horizontal alignment.
872 sal_uInt8 mnVAlign
; /// Vertical alignment.
873 sal_uInt16 mnBackMode
; /// Background mode: transparent, opaque.
874 sal_uInt16 mnFlags
; /// Additional flags.
875 sal_uInt16 mnFlags2
; /// Text object placement and text direction (BIFF8+).
876 sal_uInt16 mnRotation
; /// Text object rotation (BIFF8+).
878 explicit XclChText();
881 // Data series ================================================================
883 struct XclChMarkerFormat
885 Color maLineColor
; /// Border line color.
886 Color maFillColor
; /// Fill color.
887 sal_uInt32 mnMarkerSize
; /// Size of a marker
888 sal_uInt16 mnMarkerType
; /// Marker type (none, diamond, ...).
889 sal_uInt16 mnFlags
; /// Additional flags.
891 explicit XclChMarkerFormat();
894 struct XclCh3dDataFormat
896 sal_uInt8 mnBase
; /// Base form.
897 sal_uInt8 mnTop
; /// Top egde mode.
899 explicit XclCh3dDataFormat();
902 struct XclChDataFormat
904 XclChDataPointPos maPointPos
; /// Position of the data point or series.
905 sal_uInt16 mnFormatIdx
; /// Formatting index for automatic colors.
906 sal_uInt16 mnFlags
; /// Additional flags.
908 explicit XclChDataFormat();
911 struct XclChSerTrendLine
913 double mfIntercept
; /// Forced intercept.
914 double mfForecastFor
; /// Counter to forecast forward.
915 double mfForecastBack
; /// Counter to forecast backward.
916 sal_uInt8 mnLineType
; /// Type of the trend line.
917 sal_uInt8 mnOrder
; /// Polynomial order or moving average counter.
918 sal_uInt8 mnShowEquation
; /// 1 = Show equation.
919 sal_uInt8 mnShowRSquared
; /// 1 = Show R-squared.
921 explicit XclChSerTrendLine();
924 struct XclChSerErrorBar
926 double mfValue
; /// Fixed value for several source types.
927 sal_uInt16 mnValueCount
; /// Number of custom error values.
928 sal_uInt8 mnBarType
; /// Type of the error bar (X/Y).
929 sal_uInt8 mnSourceType
; /// Type of source values.
930 sal_uInt8 mnLineEnd
; /// Type of the line ends.
932 explicit XclChSerErrorBar();
937 sal_uInt16 mnCategType
; /// Data type for category entries.
938 sal_uInt16 mnValueType
; /// Data type for value entries.
939 sal_uInt16 mnBubbleType
; /// Data type for bubble entries.
940 sal_uInt16 mnCategCount
; /// Number of category entries.
941 sal_uInt16 mnValueCount
; /// Number of value entries.
942 sal_uInt16 mnBubbleCount
; /// Number of bubble entries.
944 explicit XclChSeries();
947 // Chart type groups ==========================================================
951 sal_Int16 mnOverlap
; /// Bar overlap width (CHBAR).
952 sal_Int16 mnGap
; /// Gap between bars (CHBAR).
953 sal_uInt16 mnRotation
; /// Rotation angle of first pie (CHPIE).
954 sal_uInt16 mnPieHole
; /// Hole size in donut chart (CHPIE).
955 sal_uInt16 mnBubbleSize
; /// Bubble size in bubble chart (CHSCATTER).
956 sal_uInt16 mnBubbleType
; /// Bubble type in bubble chart (CHSCATTER).
957 sal_uInt16 mnFlags
; /// Additional flags (all chart types).
959 explicit XclChType();
964 sal_uInt16 mnRotation
; /// Rotation (0...359deg).
965 sal_Int16 mnElevation
; /// Elevation (-90...+90deg).
966 sal_uInt16 mnEyeDist
; /// Eye distance to chart (0...100).
967 sal_uInt16 mnRelHeight
; /// Height relative to width.
968 sal_uInt16 mnRelDepth
; /// Depth relative to width.
969 sal_uInt16 mnDepthGap
; /// Space between series.
970 sal_uInt16 mnFlags
; /// Additional flags.
972 explicit XclChChart3d();
977 XclChRectangle maRect
; /// Position of the legend.
978 sal_uInt8 mnDockMode
; /// Docking mode.
979 sal_uInt8 mnSpacing
; /// Spacing between elements.
980 sal_uInt16 mnFlags
; /// Additional flags.
982 explicit XclChLegend();
985 struct XclChTypeGroup
987 sal_uInt16 mnFlags
; /// Additional flags.
988 sal_uInt16 mnGroupIdx
; /// Chart type group index.
990 explicit XclChTypeGroup();
993 struct XclChProperties
995 sal_uInt16 mnFlags
; /// Additional flags.
996 sal_uInt8 mnEmptyMode
; /// Plotting mode for empty cells.
998 explicit XclChProperties();
1001 // Axes =======================================================================
1003 struct XclChLabelRange
1005 sal_uInt16 mnCross
; /// Crossing position of other axis.
1006 sal_uInt16 mnLabelFreq
; /// Frequency of labels.
1007 sal_uInt16 mnTickFreq
; /// Frequency of ticks.
1008 sal_uInt16 mnFlags
; /// Additional flags.
1010 explicit XclChLabelRange();
1013 struct XclChDateRange
1015 sal_uInt16 mnMinDate
; /// Minimum value on axis.
1016 sal_uInt16 mnMaxDate
; /// Maximum value on axis.
1017 sal_uInt16 mnMajorStep
; /// Distance for major grid lines.
1018 sal_uInt16 mnMajorUnit
; /// Time unit for major step.
1019 sal_uInt16 mnMinorStep
; /// Distance for minor grid lines.
1020 sal_uInt16 mnMinorUnit
; /// Time unit for minor step.
1021 sal_uInt16 mnBaseUnit
; /// Time unit for axis values.
1022 sal_uInt16 mnCross
; /// Crossing position of other axis.
1023 sal_uInt16 mnFlags
; /// Additional flags.
1025 explicit XclChDateRange();
1028 struct XclChValueRange
1030 double mfMin
; /// Minimum value on axis.
1031 double mfMax
; /// Maximum value on axis.
1032 double mfMajorStep
; /// Distance for major grid lines.
1033 double mfMinorStep
; /// Distance for minor grid lines.
1034 double mfCross
; /// Crossing position of other axis.
1035 sal_uInt16 mnFlags
; /// Additional flags.
1037 explicit XclChValueRange();
1042 Color maTextColor
; /// Tick labels color.
1043 sal_uInt8 mnMajor
; /// Type of tick marks of major grid.
1044 sal_uInt8 mnMinor
; /// Type of tick marks of minor grid.
1045 sal_uInt8 mnLabelPos
; /// Position of labels relative to axis.
1046 sal_uInt8 mnBackMode
; /// Background mode: transparent, opaque.
1047 sal_uInt16 mnFlags
; /// Additional flags.
1048 sal_uInt16 mnRotation
; /// Tick labels angle (BIFF8+).
1050 explicit XclChTick();
1055 sal_uInt16 mnType
; /// Axis type.
1057 explicit XclChAxis();
1059 /** Returns the axis dimension index used by the chart API. */
1060 sal_Int32
GetApiAxisDimension() const;
1065 XclChRectangle maRect
; /// Position of the axes set (inner plot area).
1066 sal_uInt16 mnAxesSetId
; /// Primary/secondary axes set.
1068 explicit XclChAxesSet();
1070 /** Returns the axes set index used by the chart API. */
1071 sal_Int32
GetApiAxesSetIndex() const;
1074 // Property mode ==============================================================
1076 /** Specifies the type of a formatting. This results in different property names. */
1077 enum XclChPropertyMode
1079 EXC_CHPROPMODE_COMMON
, /// Common objects, no special handling.
1080 EXC_CHPROPMODE_LINEARSERIES
, /// Specific to data series drawn as lines.
1081 EXC_CHPROPMODE_FILLEDSERIES
/// Specific to data series drawn as areas.
1084 // Static helper functions ====================================================
1086 /** Contains static helper functions for the chart filters. */
1087 class XclChartHelper
1090 /** Returns a palette index for automatic series line colors. */
1091 static sal_uInt16
GetSeriesLineAutoColorIdx( sal_uInt16 nFormatIdx
);
1092 /** Returns a palette index for automatic series fill colors. */
1093 static sal_uInt16
GetSeriesFillAutoColorIdx( sal_uInt16 nFormatIdx
);
1094 /** Returns a transparency value for automatic series fill colors. */
1095 static sal_uInt8
GetSeriesFillAutoTransp( sal_uInt16 nFormatIdx
);
1096 /** Returns an automatic symbol index for the passed format index. */
1097 static sal_uInt16
GetAutoMarkerType( sal_uInt16 nFormatIdx
);
1098 /** Returns true, if the passed marker type is filled. */
1099 static bool HasMarkerFillColor( sal_uInt16 nMarkerType
);
1100 /** Returns the role name for a manual data source for error bars. */
1101 static OUString
GetErrorBarValuesRole( sal_uInt8 nBarType
);
1104 // Chart formatting info provider =============================================
1106 /** Enumerates different object types for specific automatic formatting behaviour. */
1107 enum XclChObjectType
1109 EXC_CHOBJTYPE_BACKGROUND
, /// Chart background.
1110 EXC_CHOBJTYPE_PLOTFRAME
, /// Wall formatting in 2d charts.
1111 EXC_CHOBJTYPE_WALL3D
, /// Wall formatting in 3d charts.
1112 EXC_CHOBJTYPE_FLOOR3D
, /// Floor formatting in 3d charts.
1113 EXC_CHOBJTYPE_TEXT
, /// Text boxes (titles, data point labels).
1114 EXC_CHOBJTYPE_LEGEND
, /// Chart legend.
1115 EXC_CHOBJTYPE_LINEARSERIES
, /// Series formatting in a chart supporting line formatting only.
1116 EXC_CHOBJTYPE_FILLEDSERIES
, /// Series formatting in a chart supporting area formatting.
1117 EXC_CHOBJTYPE_AXISLINE
, /// Axis line format.
1118 EXC_CHOBJTYPE_GRIDLINE
, /// Axis grid line format.
1119 EXC_CHOBJTYPE_TRENDLINE
, /// Series trend line.
1120 EXC_CHOBJTYPE_ERRORBAR
, /// Series error bar.
1121 EXC_CHOBJTYPE_CONNECTLINE
, /// Data point connector line.
1122 EXC_CHOBJTYPE_HILOLINE
, /// High/low lines in stock charts.
1123 EXC_CHOBJTYPE_WHITEDROPBAR
, /// White-day drop bar in stock charts.
1124 EXC_CHOBJTYPE_BLACKDROPBAR
/// Black-day drop bar in stock charts.
1127 /** Enumerates different types to handle missing frame objects. */
1130 EXC_CHFRAMETYPE_AUTO
, /// Missing frame represents automatic formatting.
1131 EXC_CHFRAMETYPE_INVISIBLE
/// Missing frame represents invisible formatting.
1134 /** Contains information about auto formatting of a specific chart object type. */
1135 struct XclChFormatInfo
1137 XclChObjectType meObjType
; /// Object type for automatic format.
1138 XclChPropertyMode mePropMode
; /// Property mode for property set helper.
1139 sal_uInt16 mnAutoLineColorIdx
; /// Automatic line color index.
1140 sal_Int16 mnAutoLineWeight
; /// Automatic line weight (hairline, single, ...).
1141 sal_uInt16 mnAutoPattColorIdx
; /// Automatic fill pattern color index.
1142 XclChFrameType meDefFrameType
; /// Default format type for missing frame objects.
1143 bool mbCreateDefFrame
; /// true = Create missing frame objects on import.
1144 bool mbDeleteDefFrame
; /// true = Delete default frame formatting on export.
1145 bool mbIsFrame
; /// true = Object is a frame, false = Object is a line.
1148 /** Provides access to chart auto formatting for all available object types. */
1149 class XclChFormatInfoProvider
1152 explicit XclChFormatInfoProvider();
1154 /** Returns an info struct about auto formatting for the passed object type. */
1155 const XclChFormatInfo
& GetFormatInfo( XclChObjectType eObjType
) const;
1158 typedef ::std::map
< XclChObjectType
, const XclChFormatInfo
* > XclFmtInfoMap
;
1159 XclFmtInfoMap maInfoMap
; /// Maps object type to formatting data.
1162 // Chart type info provider ===================================================
1164 /** Enumerates all kinds of different chart types. */
1167 EXC_CHTYPEID_BAR
, /// Vertical bar chart.
1168 EXC_CHTYPEID_HORBAR
, /// Horizontal bar chart.
1169 EXC_CHTYPEID_LINE
, /// Line chart.
1170 EXC_CHTYPEID_AREA
, /// Area chart.
1171 EXC_CHTYPEID_STOCK
, /// Stock chart.
1172 EXC_CHTYPEID_RADARLINE
, /// Linear radar chart.
1173 EXC_CHTYPEID_RADARAREA
, /// Filled radar chart.
1174 EXC_CHTYPEID_PIE
, /// Pie chart.
1175 EXC_CHTYPEID_DONUT
, /// Donut chart.
1176 EXC_CHTYPEID_PIEEXT
, /// Pie-to-pie or pie-to-bar chart.
1177 EXC_CHTYPEID_SCATTER
, /// Scatter (XY) chart.
1178 EXC_CHTYPEID_BUBBLES
, /// Bubble chart.
1179 EXC_CHTYPEID_SURFACE
, /// Surface chart.
1180 EXC_CHTYPEID_UNKNOWN
/// Default for unknown chart types.
1183 /** Enumerates different categories of similar chart types. */
1186 EXC_CHTYPECATEG_BAR
, /// Bar charts (horizontal or vertical).
1187 EXC_CHTYPECATEG_LINE
, /// Line charts (line, area, stock charts).
1188 EXC_CHTYPECATEG_RADAR
, /// Radar charts (linear or filled).
1189 EXC_CHTYPECATEG_PIE
, /// Pie and donut charts.
1190 EXC_CHTYPECATEG_SCATTER
, /// Scatter and bubble charts.
1191 EXC_CHTYPECATEG_SURFACE
/// Surface charts.
1194 /** Enumerates modes for varying point colors in a series. */
1195 enum XclChVarPointMode
1197 EXC_CHVARPOINT_NONE
, /// No varied colors supported.
1198 EXC_CHVARPOINT_SINGLE
, /// Only supported, if type group contains only one series.
1199 EXC_CHVARPOINT_MULTI
/// Supported for multiple series in a chart type group.
1202 /** Contains information for a chart type. */
1203 struct XclChTypeInfo
1205 XclChTypeId meTypeId
; /// Unique chart type identifier.
1206 XclChTypeCateg meTypeCateg
; /// Chart type category this type belongs to.
1207 sal_uInt16 mnRecId
; /// Record identifier written to the file.
1208 const sal_Char
* mpcServiceName
; /// Service name of the type.
1209 XclChVarPointMode meVarPointMode
; /// Mode for varying point colors.
1210 sal_Int32 mnDefaultLabelPos
; /// Default data label position (API constant).
1211 bool mbCombinable2d
; /// true = Types can be combined in one axes set.
1212 bool mbSupports3d
; /// true = 3d type allowed, false = Only 2d type.
1213 bool mbPolarCoordSystem
; /// true = Polar, false = Cartesian.
1214 bool mbSeriesIsFrame2d
; /// true = Series with area formatting (2d charts).
1215 bool mbSeriesIsFrame3d
; /// true = Series with area formatting (3d charts).
1216 bool mbSingleSeriesVis
; /// true = Only first series visible.
1217 bool mbCategoryAxis
; /// true = X axis contains categories.
1218 bool mbSwappedAxesSet
; /// true = X and Y axes are swapped.
1219 bool mbSupportsStacking
; /// true = Series can be stacked on each other.
1220 bool mbReverseSeries
; /// true = Insert unstacked series in reverse order.
1221 bool mbTicksBetweenCateg
; /// true = X axis ticks between categories.
1224 /** Extended chart type information and access functions. */
1225 struct XclChExtTypeInfo
: public XclChTypeInfo
1227 bool mb3dChart
; /// Chart is actually a 3D chart.
1228 bool mbSpline
; /// Series lines are smoothed.
1230 explicit XclChExtTypeInfo( const XclChTypeInfo
& rTypeInfo
);
1232 void Set( const XclChTypeInfo
& rTypeInfo
, bool b3dChart
, bool bSpline
);
1234 /** Returns true, if this chart type supports area formatting for its series. */
1235 inline bool IsSeriesFrameFormat() const
1236 { return mb3dChart
? mbSeriesIsFrame3d
: mbSeriesIsFrame2d
; }
1237 /** Returns the correct object type identifier for series and data points. */
1238 inline XclChObjectType
GetSeriesObjectType() const
1239 { return IsSeriesFrameFormat() ? EXC_CHOBJTYPE_FILLEDSERIES
: EXC_CHOBJTYPE_LINEARSERIES
; }
1242 /** Provides access to chart type info structs for all available chart types. */
1243 class XclChTypeInfoProvider
1246 explicit XclChTypeInfoProvider();
1248 /** Returns chart type info for a unique chart type identifier. */
1249 const XclChTypeInfo
& GetTypeInfo( XclChTypeId eType
) const;
1250 /** Returns the first fitting chart type info for an Excel chart type record identifier. */
1251 const XclChTypeInfo
& GetTypeInfoFromRecId( sal_uInt16 nRecId
) const;
1252 /** Returns the first fitting chart type info for the passed service name. */
1253 const XclChTypeInfo
& GetTypeInfoFromService( const OUString
& rServiceName
) const;
1256 typedef ::std::map
< XclChTypeId
, const XclChTypeInfo
* > XclChTypeInfoMap
;
1257 XclChTypeInfoMap maInfoMap
; /// Maps chart types to type info data.
1260 // Chart text and title object helpers ========================================
1262 /** Enumerates different text box types for default text formatting and title
1266 EXC_CHTEXTTYPE_TITLE
, /// Chart title.
1267 EXC_CHTEXTTYPE_LEGEND
, /// Chart legend.
1268 EXC_CHTEXTTYPE_AXISTITLE
, /// Chart axis titles.
1269 EXC_CHTEXTTYPE_AXISLABEL
, /// Chart axis labels.
1270 EXC_CHTEXTTYPE_DATALABEL
/// Data point labels.
1273 /** A map key for text and title objects. */
1274 struct XclChTextKey
: public ::std::pair
< XclChTextType
, ::std::pair
< sal_uInt16
, sal_uInt16
> >
1276 inline explicit XclChTextKey( XclChTextType eTextType
, sal_uInt16 nMainIdx
= 0, sal_uInt16 nSubIdx
= 0 )
1277 { first
= eTextType
; second
.first
= nMainIdx
; second
.second
= nSubIdx
; }
1280 /** Function prototype receiving a chart document and returning a title shape. */
1281 typedef ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
>
1282 (*XclChGetShapeFunc
)( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart::XChartDocument
>& );
1284 // Property helpers ===========================================================
1286 class XclChObjectTable
1289 typedef ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameContainer
> XNameContainerRef
;
1290 typedef ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
> XServiceFactoryRef
;
1293 explicit XclChObjectTable( XServiceFactoryRef xFactory
,
1294 const OUString
& rServiceName
, const OUString
& rObjNameBase
);
1296 /** Returns a named formatting object from the chart document. */
1297 ::com::sun::star::uno::Any
GetObject( const OUString
& rObjName
);
1298 /** Insertes a named formatting object into the chart document. */
1299 OUString
InsertObject( const ::com::sun::star::uno::Any
& rObj
);
1302 XServiceFactoryRef mxFactory
; /// Factory to create the container.
1303 XNameContainerRef mxContainer
; /// Container for the objects.
1304 OUString maServiceName
; /// Service name to create the container.
1305 OUString maObjNameBase
; /// Base of names for inserted objects.
1306 sal_Int32 mnIndex
; /// Index to create unique identifiers.
1311 /** Helper class for usage of property sets. */
1312 class XclChPropSetHelper
1315 explicit XclChPropSetHelper();
1317 /** Reads all line properties from the passed property set. */
1318 void ReadLineProperties(
1319 XclChLineFormat
& rLineFmt
,
1320 XclChObjectTable
& rDashTable
,
1321 const ScfPropertySet
& rPropSet
,
1322 XclChPropertyMode ePropMode
);
1323 /** Reads solid area properties from the passed property set.
1324 @return true = object contains complex fill properties. */
1325 bool ReadAreaProperties(
1326 XclChAreaFormat
& rAreaFmt
,
1327 const ScfPropertySet
& rPropSet
,
1328 XclChPropertyMode ePropMode
);
1329 /** Reads gradient or bitmap area properties from the passed property set. */
1330 void ReadEscherProperties(
1331 XclChEscherFormat
& rEscherFmt
,
1332 XclChPicFormat
& rPicFmt
,
1333 XclChObjectTable
& rGradientTable
,
1334 XclChObjectTable
& rHatchTable
,
1335 XclChObjectTable
& rBitmapTable
,
1336 const ScfPropertySet
& rPropSet
,
1337 XclChPropertyMode ePropMode
);
1338 /** Reads all marker properties from the passed property set. */
1339 static void ReadMarkerProperties(
1340 XclChMarkerFormat
& rMarkerFmt
,
1341 const ScfPropertySet
& rPropSet
,
1342 sal_uInt16 nFormatIdx
);
1343 /** Reads rotation properties from the passed property set. */
1344 static sal_uInt16
ReadRotationProperties(
1345 const ScfPropertySet
& rPropSet
,
1346 bool bSupportsStacked
);
1348 /** Writes all line properties to the passed property set. */
1349 void WriteLineProperties(
1350 ScfPropertySet
& rPropSet
,
1351 XclChObjectTable
& rDashTable
,
1352 const XclChLineFormat
& rLineFmt
,
1353 XclChPropertyMode ePropMode
);
1354 /** Writes solid area properties to the passed property set. */
1355 void WriteAreaProperties(
1356 ScfPropertySet
& rPropSet
,
1357 const XclChAreaFormat
& rAreaFmt
,
1358 XclChPropertyMode ePropMode
);
1359 /** Writes gradient or bitmap area properties to the passed property set. */
1360 void WriteEscherProperties(
1361 ScfPropertySet
& rPropSet
,
1362 XclChObjectTable
& rGradientTable
,
1363 XclChObjectTable
& rHatchTable
,
1364 XclChObjectTable
& rBitmapTable
,
1365 const XclChEscherFormat
& rEscherFmt
,
1366 const XclChPicFormat
* pPicFmt
,
1367 sal_uInt32 nDffFillType
,
1368 XclChPropertyMode ePropMode
);
1369 /** Writes all marker properties to the passed property set. */
1370 static void WriteMarkerProperties(
1371 ScfPropertySet
& rPropSet
,
1372 const XclChMarkerFormat
& rMarkerFmt
);
1373 /** Writes rotation properties to the passed property set. */
1374 static void WriteRotationProperties(
1375 ScfPropertySet
& rPropSet
,
1376 sal_uInt16 nRotation
,
1377 bool bSupportsStacked
);
1380 /** Returns a line property set helper according to the passed property mode. */
1381 ScfPropSetHelper
& GetLineHelper( XclChPropertyMode ePropMode
);
1382 /** Returns an area property set helper according to the passed property mode. */
1383 ScfPropSetHelper
& GetAreaHelper( XclChPropertyMode ePropMode
);
1384 /** Returns a gradient property set helper according to the passed property mode. */
1385 ScfPropSetHelper
& GetGradientHelper( XclChPropertyMode ePropMode
);
1386 /** Returns a hatch property set helper according to the passed property mode. */
1387 ScfPropSetHelper
& GetHatchHelper( XclChPropertyMode ePropMode
);
1390 ScfPropSetHelper maLineHlpCommon
; /// Properties for lines in common objects.
1391 ScfPropSetHelper maLineHlpLinear
; /// Properties for lines in linear series.
1392 ScfPropSetHelper maLineHlpFilled
; /// Properties for lines in filled series.
1393 ScfPropSetHelper maAreaHlpCommon
; /// Properties for areas in common objects.
1394 ScfPropSetHelper maAreaHlpFilled
; /// Properties for areas in filled series.
1395 ScfPropSetHelper maGradHlpCommon
; /// Properties for gradients in common objects.
1396 ScfPropSetHelper maGradHlpFilled
; /// Properties for gradients in filled series.
1397 ScfPropSetHelper maHatchHlpCommon
; /// Properties for hatches in common objects.
1398 ScfPropSetHelper maHatchHlpFilled
; /// Properties for hatches in filled series.
1399 ScfPropSetHelper maBitmapHlp
; /// Properties for bitmaps.
1402 /** Base struct for internal root data structs for import and export. */
1403 struct XclChRootData
1405 typedef std::shared_ptr
< XclChTypeInfoProvider
> XclChTypeProvRef
;
1406 typedef std::shared_ptr
< XclChFormatInfoProvider
> XclChFmtInfoProvRef
;
1407 typedef std::shared_ptr
< XclChObjectTable
> XclChObjectTableRef
;
1408 typedef ::std::map
< XclChTextKey
, XclChGetShapeFunc
> XclChGetShapeFuncMap
;
1410 ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartDocument
>
1411 mxChartDoc
; /// The chart document.
1412 Rectangle maChartRect
; /// Position and size of the chart shape.
1413 XclChTypeProvRef mxTypeInfoProv
; /// Provides info about chart types.
1414 XclChFmtInfoProvRef mxFmtInfoProv
; /// Provides info about auto formatting.
1415 XclChObjectTableRef mxLineDashTable
; /// Container for line dash styles.
1416 XclChObjectTableRef mxGradientTable
; /// Container for gradient fill styles.
1417 XclChObjectTableRef mxHatchTable
; /// Container for hatch fill styles.
1418 XclChObjectTableRef mxBitmapTable
; /// Container for bitmap fill styles.
1419 XclChGetShapeFuncMap maGetShapeFuncs
; /// Maps title shape getter functions.
1420 sal_Int32 mnBorderGapX
; /// Border gap to chart space in 1/100mm.
1421 sal_Int32 mnBorderGapY
; /// Border gap to chart space in 1/100mm.
1422 double mfUnitSizeX
; /// Size of a chart X unit (1/4000 of chart width) in 1/100 mm.
1423 double mfUnitSizeY
; /// Size of a chart Y unit (1/4000 of chart height) in 1/100 mm.
1425 explicit XclChRootData();
1426 virtual ~XclChRootData();
1428 /** Starts the API chart document conversion. Must be called once before any API access. */
1429 void InitConversion(
1430 const XclRoot
& rRoot
,
1431 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartDocument
>& rxChartDoc
,
1432 const Rectangle
& rChartRect
);
1433 /** Finishes the API chart document conversion. Must be called once before any API access. */
1434 void FinishConversion();
1436 /** Returns the drawing shape interface of the specified title object. */
1437 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
>
1438 GetTitleShape( const XclChTextKey
& rTitleKey
) const;
1443 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */