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