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