LCOV - code coverage report
Current view: top level - libreoffice/sc/source/filter/inc - xlchart.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 10 11 90.9 %
Date: 2012-12-27 Functions: 7 8 87.5 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #ifndef SC_XLCHART_HXX
      21             : #define SC_XLCHART_HXX
      22             : 
      23             : // disable/enable support for varied point colors property
      24             : #define EXC_CHART2_VARYCOLORSBY_PROP 0
      25             : // disable/enable restriction to hair lines in 3D bar charts (#i83151#)
      26             : #define EXC_CHART2_3DBAR_HAIRLINES_ONLY 1
      27             : 
      28             : #include <map>
      29             : #include <tools/gen.hxx>
      30             : #include "fapihelper.hxx"
      31             : #include <boost/shared_ptr.hpp>
      32             : 
      33             : namespace com { namespace sun { namespace star {
      34             :     namespace container { class XNameContainer; }
      35             :     namespace lang      { class XMultiServiceFactory; }
      36             :     namespace chart     { class XChartDocument; }
      37             :     namespace chart2    { class XChartDocument; }
      38             :     namespace drawing   { class XShape; }
      39             : } } }
      40             : 
      41             : class XclRoot;
      42             : 
      43             : // Property names =============================================================
      44             : 
      45             : // service names
      46             : #define SERVICE_DRAWING_BITMAPTABLE         "com.sun.star.drawing.BitmapTable"
      47             : #define SERVICE_DRAWING_DASHTABLE           "com.sun.star.drawing.DashTable"
      48             : #define SERVICE_DRAWING_GRADIENTTABLE       "com.sun.star.drawing.GradientTable"
      49             : #define SERVICE_DRAWING_HATCHTABLE          "com.sun.star.drawing.HatchTable"
      50             : 
      51             : #define SERVICE_CHART2_AXIS                 "com.sun.star.chart2.Axis"
      52             : #define SERVICE_CHART2_CARTESIANCOORDSYS2D  "com.sun.star.chart2.CartesianCoordinateSystem2d"
      53             : #define SERVICE_CHART2_CARTESIANCOORDSYS3D  "com.sun.star.chart2.CartesianCoordinateSystem3d"
      54             : #define SERVICE_CHART2_DATAPROVIDER         "com.sun.star.chart2.data.DataProvider"
      55             : #define SERVICE_CHART2_DATASERIES           "com.sun.star.chart2.DataSeries"
      56             : #define SERVICE_CHART2_DIAGRAM              "com.sun.star.chart2.Diagram"
      57             : #define SERVICE_CHART2_ERRORBAR             "com.sun.star.chart2.ErrorBar"
      58             : #define SERVICE_CHART2_EXPREGCURVE          "com.sun.star.chart2.ExponentialRegressionCurve"
      59             : #define SERVICE_CHART2_FORMATTEDSTRING      "com.sun.star.chart2.FormattedString"
      60             : #define SERVICE_CHART2_LABELEDDATASEQ       "com.sun.star.chart2.data.LabeledDataSequence"
      61             : #define SERVICE_CHART2_LEGEND               "com.sun.star.chart2.Legend"
      62             : #define SERVICE_CHART2_LINEARREGCURVE       "com.sun.star.chart2.LinearRegressionCurve"
      63             : #define SERVICE_CHART2_LINEARSCALING        "com.sun.star.chart2.LinearScaling"
      64             : #define SERVICE_CHART2_LOGREGCURVE          "com.sun.star.chart2.LogarithmicRegressionCurve"
      65             : #define SERVICE_CHART2_LOGSCALING           "com.sun.star.chart2.LogarithmicScaling"
      66             : #define SERVICE_CHART2_POLARCOORDSYS2D      "com.sun.star.chart2.PolarCoordinateSystem2d"
      67             : #define SERVICE_CHART2_POLARCOORDSYS3D      "com.sun.star.chart2.PolarCoordinateSystem3d"
      68             : #define SERVICE_CHART2_POTREGCURVE          "com.sun.star.chart2.PotentialRegressionCurve"
      69             : #define SERVICE_CHART2_TITLE                "com.sun.star.chart2.Title"
      70             : 
      71             : // property names
      72             : #define EXC_CHPROP_ADDITIONALSHAPES         "AdditionalShapes"
      73             : #define EXC_CHPROP_ANCHORPOSITION           "AnchorPosition"
      74             : #define EXC_CHPROP_ARRANGEORDER             "ArrangeOrder"
      75             : #define EXC_CHPROP_ATTAXISINDEX             "AttachedAxisIndex"
      76             : #define EXC_CHPROP_ATTRIBDATAPOINTS         "AttributedDataPoints"
      77             : #define EXC_CHPROP_BLACKDAY                 "BlackDay"
      78             : #define EXC_CHPROP_COLOR                    "Color"
      79             : #define EXC_CHPROP_CONNECTBARS              "ConnectBars"
      80             : #define EXC_CHPROP_CROSSOVERPOSITION        "CrossoverPosition"
      81             : #define EXC_CHPROP_CROSSOVERVALUE           "CrossoverValue"
      82             : #define EXC_CHPROP_CURVESTYLE               "CurveStyle"
      83             : #define EXC_CHPROP_D3DSCENEAMBIENTCOLOR     "D3DSceneAmbientColor"
      84             : #define EXC_CHPROP_D3DSCENELIGHTON1         "D3DSceneLightOn1"
      85             : #define EXC_CHPROP_D3DSCENELIGHTCOLOR2      "D3DSceneLightColor2"
      86             : #define EXC_CHPROP_D3DSCENELIGHTDIR2        "D3DSceneLightDirection2"
      87             : #define EXC_CHPROP_D3DSCENELIGHTON2         "D3DSceneLightOn2"
      88             : #define EXC_CHPROP_D3DSCENEPERSPECTIVE      "D3DScenePerspective"
      89             : #define EXC_CHPROP_D3DSCENESHADEMODE        "D3DSceneShadeMode"
      90             : #define EXC_CHPROP_DISPLAYLABELS            "DisplayLabels"
      91             : #define EXC_CHPROP_ERRORBARSTYLE            "ErrorBarStyle"
      92             : #define EXC_CHPROP_ERRORBARX                "ErrorBarX"
      93             : #define EXC_CHPROP_ERRORBARY                "ErrorBarY"
      94             : #define EXC_CHPROP_EXPANSION                "Expansion"
      95             : #define EXC_CHPROP_EXPTIMEINCREMENT         "ExplicitTimeIncrement"
      96             : #define EXC_CHPROP_GAPWIDTHSEQ              "GapwidthSequence"
      97             : #define EXC_CHPROP_GEOMETRY3D               "Geometry3D"
      98             : #define EXC_CHPROP_INCLUDEHIDDENCELLS       "IncludeHiddenCells"
      99             : #define EXC_CHPROP_JAPANESE                 "Japanese"
     100             : #define EXC_CHPROP_LABEL                    "Label"
     101             : #define EXC_CHPROP_LABELPLACEMENT           "LabelPlacement"
     102             : #define EXC_CHPROP_LABELPOSITION            "LabelPosition"
     103             : #define EXC_CHPROP_LABELSEPARATOR           "LabelSeparator"
     104             : #define EXC_CHPROP_MAJORTICKS               "MajorTickmarks"
     105             : #define EXC_CHPROP_MARKPOSITION             "MarkPosition"
     106             : #define EXC_CHPROP_MINORTICKS               "MinorTickmarks"
     107             : #define EXC_CHPROP_MISSINGVALUETREATMENT    "MissingValueTreatment"
     108             : #define EXC_CHPROP_NEGATIVEERROR            "NegativeError"
     109             : #define EXC_CHPROP_NUMBERFORMAT             "NumberFormat"
     110             : #define EXC_CHPROP_OFFSET                   "Offset"
     111             : #define EXC_CHPROP_OVERLAPSEQ               "OverlapSequence"
     112             : #define EXC_CHPROP_PERCENTAGENUMFMT         "PercentageNumberFormat"
     113             : #define EXC_CHPROP_PERCENTDIAGONAL          "PercentDiagonal"
     114             : #define EXC_CHPROP_PERSPECTIVE              "Perspective"
     115             : #define EXC_CHPROP_POSITIVEERROR            "PositiveError"
     116             : #define EXC_CHPROP_RELATIVEPOSITION         "RelativePosition"
     117             : #define EXC_CHPROP_RELATIVESIZE             "RelativeSize"
     118             : #define EXC_CHPROP_RIGHTANGLEDAXES          "RightAngledAxes"
     119             : #define EXC_CHPROP_ROLE                     "Role"
     120             : #define EXC_CHPROP_ROTATIONHORIZONTAL       "RotationHorizontal"
     121             : #define EXC_CHPROP_ROTATIONVERTICAL         "RotationVertical"
     122             : #define EXC_CHPROP_SHOW                     "Show"
     123             : #define EXC_CHPROP_SHOWCORRELATION          "ShowCorrelationCoefficient"
     124             : #define EXC_CHPROP_SHOWEQUATION             "ShowEquation"
     125             : #define EXC_CHPROP_SHOWFIRST                "ShowFirst"
     126             : #define EXC_CHPROP_SHOWHIGHLOW              "ShowHighLow"
     127             : #define EXC_CHPROP_SHOWNEGATIVEERROR        "ShowNegativeError"
     128             : #define EXC_CHPROP_SHOWPOSITIVEERROR        "ShowPositiveError"
     129             : #define EXC_CHPROP_STACKCHARACTERS          "StackCharacters"
     130             : #define EXC_CHPROP_STACKINGDIR              "StackingDirection"
     131             : #define EXC_CHPROP_STARTINGANGLE            "StartingAngle"
     132             : #define EXC_CHPROP_SWAPXANDYAXIS            "SwapXAndYAxis"
     133             : #define EXC_CHPROP_SYMBOL                   "Symbol"
     134             : #define EXC_CHPROP_TEXTBREAK                "TextBreak"
     135             : #define EXC_CHPROP_TEXTOVERLAP              "TextOverlap"
     136             : #define EXC_CHPROP_TEXTROTATION             "TextRotation"
     137             : #define EXC_CHPROP_USERINGS                 "UseRings"
     138             : #define EXC_CHPROP_VARYCOLORSBY             "VaryColorsByPoint"
     139             : #define EXC_CHPROP_WEIGHT                   "Weight"
     140             : #define EXC_CHPROP_WHITEDAY                 "WhiteDay"
     141             : 
     142             : // data series roles
     143             : #define EXC_CHPROP_ROLE_CATEG               "categories"
     144             : #define EXC_CHPROP_ROLE_ERRORBARS_NEGX      "error-bars-x-negative"
     145             : #define EXC_CHPROP_ROLE_ERRORBARS_NEGY      "error-bars-y-negative"
     146             : #define EXC_CHPROP_ROLE_ERRORBARS_POSX      "error-bars-x-positive"
     147             : #define EXC_CHPROP_ROLE_ERRORBARS_POSY      "error-bars-y-positive"
     148             : #define EXC_CHPROP_ROLE_LABEL               "label"
     149             : #define EXC_CHPROP_ROLE_XVALUES             "values-x"
     150             : #define EXC_CHPROP_ROLE_YVALUES             "values-y"
     151             : #define EXC_CHPROP_ROLE_OPENVALUES          "values-first"
     152             : #define EXC_CHPROP_ROLE_CLOSEVALUES         "values-last"
     153             : #define EXC_CHPROP_ROLE_LOWVALUES           "values-min"
     154             : #define EXC_CHPROP_ROLE_HIGHVALUES          "values-max"
     155             : #define EXC_CHPROP_ROLE_SIZEVALUES          "values-size"
     156             : 
     157             : // Constants and Enumerations =================================================
     158             : 
     159             : const sal_Size EXC_CHART_PROGRESS_SIZE          = 10;
     160             : const sal_uInt16 EXC_CHART_AUTOROTATION         = 0xFFFF;   /// Automatic rotation, e.g. axis labels (internal use only).
     161             : 
     162             : const sal_Int32 EXC_CHART_AXIS_NONE             = -1;       /// For internal use only.
     163             : const sal_Int32 EXC_CHART_AXIS_X                = 0;        /// API X axis index.
     164             : const sal_Int32 EXC_CHART_AXIS_Y                = 1;        /// API Y axis index.
     165             : const sal_Int32 EXC_CHART_AXIS_Z                = 2;        /// API Z axis index.
     166             : const sal_Int32 EXC_CHART_AXESSET_NONE          = -1;       /// For internal use only.
     167             : const sal_Int32 EXC_CHART_AXESSET_PRIMARY       = 0;        /// API primary axes set index.
     168             : const sal_Int32 EXC_CHART_AXESSET_SECONDARY     = 1;        /// API secondary axes set index.
     169             : 
     170             : const sal_Int32 EXC_CHART_TOTALUNITS            = 4000;     /// Most chart objects are positioned in 1/4000 of chart area.
     171             : const sal_Int32 EXC_CHART_PLOTAREAUNITS         = 1000;     /// For objects that are positioned in 1/1000 of plot area.
     172             : 
     173             : // (0x0850) CHFRINFO ----------------------------------------------------------
     174             : 
     175             : const sal_uInt16 EXC_ID_CHFRINFO                = 0x0850;
     176             : 
     177             : const sal_uInt8 EXC_CHFRINFO_EXCEL2000          = 9;
     178             : const sal_uInt8 EXC_CHFRINFO_EXCELXP2003        = 10;
     179             : const sal_uInt8 EXC_CHFRINFO_EXCEL2007          = 11;
     180             : 
     181             : // (0x0852, 0x0853) CHFRBLOCKBEGIN, CHFRBLOCKEND ------------------------------
     182             : 
     183             : const sal_uInt16 EXC_ID_CHFRBLOCKBEGIN          = 0x0852;
     184             : const sal_uInt16 EXC_ID_CHFRBLOCKEND            = 0x0853;
     185             : 
     186             : const sal_uInt16 EXC_CHFRBLOCK_TYPE_AXESSET     = 0;
     187             : const sal_uInt16 EXC_CHFRBLOCK_TYPE_TEXT        = 2;
     188             : const sal_uInt16 EXC_CHFRBLOCK_TYPE_AXIS        = 4;
     189             : const sal_uInt16 EXC_CHFRBLOCK_TYPE_TYPEGROUP   = 5;
     190             : const sal_uInt16 EXC_CHFRBLOCK_TYPE_DATATABLE   = 6;
     191             : const sal_uInt16 EXC_CHFRBLOCK_TYPE_FRAME       = 7;
     192             : const sal_uInt16 EXC_CHFRBLOCK_TYPE_LEGEND      = 9;
     193             : const sal_uInt16 EXC_CHFRBLOCK_TYPE_LEGENDEX    = 10;
     194             : const sal_uInt16 EXC_CHFRBLOCK_TYPE_SERIES      = 12;
     195             : const sal_uInt16 EXC_CHFRBLOCK_TYPE_CHART       = 13;
     196             : const sal_uInt16 EXC_CHFRBLOCK_TYPE_DATAFORMAT  = 14;
     197             : const sal_uInt16 EXC_CHFRBLOCK_TYPE_DROPBAR     = 15;
     198             : const sal_uInt16 EXC_CHFRBLOCK_TYPE_UNKNOWN     = 0xFFFF;   /// For internal use only.
     199             : 
     200             : const sal_uInt16 EXC_CHFRBLOCK_TEXT_TITLE       = 0;
     201             : const sal_uInt16 EXC_CHFRBLOCK_TEXT_DEFTEXT     = 2;
     202             : const sal_uInt16 EXC_CHFRBLOCK_TEXT_AXISTITLE   = 4;
     203             : const sal_uInt16 EXC_CHFRBLOCK_TEXT_DATALABEL   = 5;
     204             : 
     205             : const sal_uInt16 EXC_CHFRBLOCK_FRAME_STANDARD   = 0;
     206             : const sal_uInt16 EXC_CHFRBLOCK_FRAME_PLOTFRAME  = 1;
     207             : const sal_uInt16 EXC_CHFRBLOCK_FRAME_BACKGROUND = 2;
     208             : 
     209             : // (0x086B) CHFRLABELPROPS ----------------------------------------------------
     210             : 
     211             : const sal_uInt16 EXC_ID_CHFRLABELPROPS          = 0x086B;
     212             : 
     213             : const sal_uInt16 EXC_CHFRLABELPROPS_SHOWSERIES  = 0x0001;
     214             : const sal_uInt16 EXC_CHFRLABELPROPS_SHOWCATEG   = 0x0002;
     215             : const sal_uInt16 EXC_CHFRLABELPROPS_SHOWVALUE   = 0x0004;
     216             : const sal_uInt16 EXC_CHFRLABELPROPS_SHOWPERCENT = 0x0008;
     217             : const sal_uInt16 EXC_CHFRLABELPROPS_SHOWBUBBLE  = 0x0010;
     218             : 
     219             : // (0x1001) CHUNITS -----------------------------------------------------------
     220             : 
     221             : const sal_uInt16 EXC_ID_CHUNITS                 = 0x1001;
     222             : 
     223             : const sal_uInt16 EXC_CHUNITS_TWIPS              = 0;
     224             : const sal_uInt16 EXC_CHUNITS_PIXELS             = 1;
     225             : 
     226             : // (0x1002) CHCHART -----------------------------------------------------------
     227             : 
     228             : const sal_uInt16 EXC_ID_CHCHART                 = 0x1002;
     229             : 
     230             : // (0x1003) CHSERIES ----------------------------------------------------------
     231             : 
     232             : const sal_uInt16 EXC_ID_CHSERIES                = 0x1003;
     233             : 
     234             : const sal_uInt16 EXC_CHSERIES_DATE              = 0;
     235             : const sal_uInt16 EXC_CHSERIES_NUMERIC           = 1;
     236             : const sal_uInt16 EXC_CHSERIES_SEQUENCE          = 2;
     237             : const sal_uInt16 EXC_CHSERIES_TEXT              = 3;
     238             : 
     239             : const sal_uInt16 EXC_CHSERIES_MAXSERIES         = 255;      /// Maximum valid series index.
     240             : const sal_uInt16 EXC_CHSERIES_INVALID           = 0xFFFF;   /// Invalid series index (for internal use).
     241             : 
     242             : // (0x1006) CHDATAFORMAT ------------------------------------------------------
     243             : 
     244             : const sal_uInt16 EXC_ID_CHDATAFORMAT            = 0x1006;
     245             : 
     246             : const sal_uInt16 EXC_CHDATAFORMAT_MAXPOINTCOUNT = 32000;    /// Maximum number of data points.
     247             : const sal_uInt16 EXC_CHDATAFORMAT_DEFAULT       = 0xFFFD;   /// As format index: global default for an axes set.
     248             : const sal_uInt16 EXC_CHDATAFORMAT_UNKNOWN       = 0xFFFE;   /// As point index: unknown format, don't use.
     249             : const sal_uInt16 EXC_CHDATAFORMAT_ALLPOINTS     = 0xFFFF;   /// As point index: default for a series.
     250             : 
     251             : const sal_uInt16 EXC_CHDATAFORMAT_OLDCOLORS     = 0x0001;
     252             : 
     253             : // (0x1007) CHLINEFORMAT ------------------------------------------------------
     254             : 
     255             : const sal_uInt16 EXC_ID_CHLINEFORMAT            = 0x1007;
     256             : 
     257             : const sal_uInt16 EXC_CHLINEFORMAT_SOLID         = 0;
     258             : const sal_uInt16 EXC_CHLINEFORMAT_DASH          = 1;
     259             : const sal_uInt16 EXC_CHLINEFORMAT_DOT           = 2;
     260             : const sal_uInt16 EXC_CHLINEFORMAT_DASHDOT       = 3;
     261             : const sal_uInt16 EXC_CHLINEFORMAT_DASHDOTDOT    = 4;
     262             : const sal_uInt16 EXC_CHLINEFORMAT_NONE          = 5;
     263             : const sal_uInt16 EXC_CHLINEFORMAT_DARKTRANS     = 6;
     264             : const sal_uInt16 EXC_CHLINEFORMAT_MEDTRANS      = 7;
     265             : const sal_uInt16 EXC_CHLINEFORMAT_LIGHTTRANS    = 8;
     266             : 
     267             : const sal_Int16 EXC_CHLINEFORMAT_HAIR           = -1;
     268             : const sal_Int16 EXC_CHLINEFORMAT_SINGLE         = 0;
     269             : const sal_Int16 EXC_CHLINEFORMAT_DOUBLE         = 1;
     270             : const sal_Int16 EXC_CHLINEFORMAT_TRIPLE         = 2;
     271             : 
     272             : const sal_uInt16 EXC_CHLINEFORMAT_AUTO          = 0x0001;
     273             : const sal_uInt16 EXC_CHLINEFORMAT_SHOWAXIS      = 0x0004;
     274             : 
     275             : // (0x1009) CHMARKERFORMAT ----------------------------------------------------
     276             : 
     277             : const sal_uInt16 EXC_ID_CHMARKERFORMAT          = 0x1009;
     278             : 
     279             : const sal_uInt16 EXC_CHMARKERFORMAT_NOSYMBOL    = 0;
     280             : const sal_uInt16 EXC_CHMARKERFORMAT_SQUARE      = 1;
     281             : const sal_uInt16 EXC_CHMARKERFORMAT_DIAMOND     = 2;
     282             : const sal_uInt16 EXC_CHMARKERFORMAT_TRIANGLE    = 3;
     283             : const sal_uInt16 EXC_CHMARKERFORMAT_CROSS       = 4;
     284             : const sal_uInt16 EXC_CHMARKERFORMAT_STAR        = 5;
     285             : const sal_uInt16 EXC_CHMARKERFORMAT_DOWJ        = 6;
     286             : const sal_uInt16 EXC_CHMARKERFORMAT_STDDEV      = 7;
     287             : const sal_uInt16 EXC_CHMARKERFORMAT_CIRCLE      = 8;
     288             : const sal_uInt16 EXC_CHMARKERFORMAT_PLUS        = 9;
     289             : 
     290             : const sal_uInt32 EXC_CHMARKERFORMAT_HAIRSIZE    = 60;       /// Automatic symbol size for hair lines.
     291             : const sal_uInt32 EXC_CHMARKERFORMAT_SINGLESIZE  = 100;      /// Automatic symbol size for single lines.
     292             : const sal_uInt32 EXC_CHMARKERFORMAT_DOUBLESIZE  = 140;      /// Automatic symbol size for double lines.
     293             : const sal_uInt32 EXC_CHMARKERFORMAT_TRIPLESIZE  = 180;      /// Automatic symbol size for triple lines.
     294             : 
     295             : const sal_uInt16 EXC_CHMARKERFORMAT_AUTO        = 0x0001;
     296             : const sal_uInt16 EXC_CHMARKERFORMAT_NOFILL      = 0x0010;
     297             : const sal_uInt16 EXC_CHMARKERFORMAT_NOLINE      = 0x0020;
     298             : 
     299             : // (0x100A) CHAREAFORMAT ------------------------------------------------------
     300             : 
     301             : const sal_uInt16 EXC_ID_CHAREAFORMAT            = 0x100A;
     302             : 
     303             : const sal_uInt16 EXC_CHAREAFORMAT_AUTO          = 0x0001;
     304             : const sal_uInt16 EXC_CHAREAFORMAT_INVERTNEG     = 0x0002;
     305             : 
     306             : // (0x100B) CHPIEFORMAT -------------------------------------------------------
     307             : 
     308             : const sal_uInt16 EXC_ID_CHPIEFORMAT             = 0x100B;
     309             : 
     310             : // (0x100C) CHATTACHEDLABEL ---------------------------------------------------
     311             : 
     312             : const sal_uInt16 EXC_ID_CHATTACHEDLABEL         = 0x100C;
     313             : 
     314             : const sal_uInt16 EXC_CHATTLABEL_SHOWVALUE       = 0x0001;
     315             : const sal_uInt16 EXC_CHATTLABEL_SHOWPERCENT     = 0x0002;
     316             : const sal_uInt16 EXC_CHATTLABEL_SHOWCATEGPERC   = 0x0004;
     317             : const sal_uInt16 EXC_CHATTLABEL_SMOOTHED        = 0x0008;   /// Smoothed line.
     318             : const sal_uInt16 EXC_CHATTLABEL_SHOWCATEG       = 0x0010;
     319             : const sal_uInt16 EXC_CHATTLABEL_SHOWBUBBLE      = 0x0020;
     320             : 
     321             : // (0x100D) CHSTRING ----------------------------------------------------------
     322             : 
     323             : const sal_uInt16 EXC_ID_CHSTRING                = 0x100D;
     324             : 
     325             : // (0x1014) CHTYPEGROUP -------------------------------------------------------
     326             : 
     327             : const sal_uInt16 EXC_ID_CHTYPEGROUP             = 0x1014;
     328             : 
     329             : const sal_uInt16 EXC_CHTYPEGROUP_VARIEDCOLORS   = 0x0001;   /// Varied colors for points.
     330             : 
     331             : // (0x1015) CHLEGEND ----------------------------------------------------------
     332             : 
     333             : const sal_uInt16 EXC_ID_CHLEGEND                = 0x1015;
     334             : 
     335             : const sal_uInt8 EXC_CHLEGEND_BOTTOM             = 0;
     336             : const sal_uInt8 EXC_CHLEGEND_CORNER             = 1;
     337             : const sal_uInt8 EXC_CHLEGEND_TOP                = 2;
     338             : const sal_uInt8 EXC_CHLEGEND_RIGHT              = 3;
     339             : const sal_uInt8 EXC_CHLEGEND_LEFT               = 4;
     340             : const sal_uInt8 EXC_CHLEGEND_NOTDOCKED          = 7;
     341             : 
     342             : const sal_uInt8 EXC_CHLEGEND_CLOSE              = 0;
     343             : const sal_uInt8 EXC_CHLEGEND_MEDIUM             = 1;
     344             : const sal_uInt8 EXC_CHLEGEND_OPEN               = 2;
     345             : 
     346             : const sal_uInt16 EXC_CHLEGEND_DOCKED            = 0x0001;
     347             : const sal_uInt16 EXC_CHLEGEND_AUTOSERIES        = 0x0002;
     348             : const sal_uInt16 EXC_CHLEGEND_AUTOPOSX          = 0x0004;
     349             : const sal_uInt16 EXC_CHLEGEND_AUTOPOSY          = 0x0008;
     350             : const sal_uInt16 EXC_CHLEGEND_STACKED           = 0x0010;
     351             : const sal_uInt16 EXC_CHLEGEND_DATATABLE         = 0x0020;
     352             : 
     353             : // (0x1017) CHBAR, CHCOLUMN ---------------------------------------------------
     354             : 
     355             : const sal_uInt16 EXC_ID_CHBAR                   = 0x1017;
     356             : 
     357             : const sal_uInt16 EXC_CHBAR_HORIZONTAL           = 0x0001;
     358             : const sal_uInt16 EXC_CHBAR_STACKED              = 0x0002;
     359             : const sal_uInt16 EXC_CHBAR_PERCENT              = 0x0004;
     360             : const sal_uInt16 EXC_CHBAR_SHADOW               = 0x0008;
     361             : 
     362             : // (0x1018, 0x101A) CHLINE, CHAREA --------------------------------------------
     363             : 
     364             : const sal_uInt16 EXC_ID_CHLINE                  = 0x1018;
     365             : const sal_uInt16 EXC_ID_CHAREA                  = 0x101A;
     366             : 
     367             : const sal_uInt16 EXC_CHLINE_STACKED             = 0x0001;
     368             : const sal_uInt16 EXC_CHLINE_PERCENT             = 0x0002;
     369             : const sal_uInt16 EXC_CHLINE_SHADOW              = 0x0004;
     370             : 
     371             : // (0x1019) CHPIE -------------------------------------------------------------
     372             : 
     373             : const sal_uInt16 EXC_ID_CHPIE                   = 0x1019;
     374             : 
     375             : const sal_uInt16 EXC_CHPIE_SHADOW               = 0x0001;
     376             : const sal_uInt16 EXC_CHPIE_LINES                = 0x0002;
     377             : 
     378             : // (0x101B) CHSCATTER ---------------------------------------------------------
     379             : 
     380             : const sal_uInt16 EXC_ID_CHSCATTER               = 0x101B;
     381             : 
     382             : const sal_uInt16 EXC_CHSCATTER_AREA             = 1;        /// Bubble area refers to value.
     383             : const sal_uInt16 EXC_CHSCATTER_WIDTH            = 2;        /// Bubble width refers to value.
     384             : 
     385             : const sal_uInt16 EXC_CHSCATTER_BUBBLES          = 0x0001;
     386             : const sal_uInt16 EXC_CHSCATTER_SHOWNEG          = 0x0002;
     387             : const sal_uInt16 EXC_CHSCATTER_SHADOW           = 0x0004;
     388             : 
     389             : // (0x001C) CHCHARTLINE -------------------------------------------------------
     390             : 
     391             : const sal_uInt16 EXC_ID_CHCHARTLINE             = 0x101C;
     392             : 
     393             : const sal_uInt16 EXC_CHCHARTLINE_DROP           = 0;        /// Drop lines.
     394             : const sal_uInt16 EXC_CHCHARTLINE_HILO           = 1;        /// Hi-lo lines.
     395             : const sal_uInt16 EXC_CHCHARTLINE_CONNECT        = 2;        /// Connector lines in stacked bar charts.
     396             : 
     397             : // (0x101D) CHAXIS ------------------------------------------------------------
     398             : 
     399             : const sal_uInt16 EXC_ID_CHAXIS                  = 0x101D;
     400             : 
     401             : const sal_uInt16 EXC_CHAXIS_X                   = 0;
     402             : const sal_uInt16 EXC_CHAXIS_Y                   = 1;
     403             : const sal_uInt16 EXC_CHAXIS_Z                   = 2;
     404             : const sal_uInt16 EXC_CHAXIS_NONE                = 0xFFFF;   /// For internal use only.
     405             : 
     406             : // (0x101E) CHTICK ------------------------------------------------------------
     407             : 
     408             : const sal_uInt16 EXC_ID_CHTICK                  = 0x101E;
     409             : 
     410             : const sal_uInt8 EXC_CHTICK_INSIDE               = 0x01;
     411             : const sal_uInt8 EXC_CHTICK_OUTSIDE              = 0x02;
     412             : 
     413             : const sal_uInt8 EXC_CHTICK_NOLABEL              = 0;
     414             : const sal_uInt8 EXC_CHTICK_LOW                  = 1;        /// Below diagram/right of diagram.
     415             : const sal_uInt8 EXC_CHTICK_HIGH                 = 2;        /// Above diagram/left of diagram.
     416             : const sal_uInt8 EXC_CHTICK_NEXT                 = 3;        /// Next to axis.
     417             : 
     418             : const sal_uInt8 EXC_CHTICK_TRANSPARENT          = 1;
     419             : const sal_uInt8 EXC_CHTICK_OPAQUE               = 2;
     420             : 
     421             : const sal_uInt16 EXC_CHTICK_AUTOCOLOR           = 0x0001;
     422             : const sal_uInt16 EXC_CHTICK_AUTOFILL            = 0x0002;
     423             : const sal_uInt16 EXC_CHTICK_AUTOROT             = 0x0020;
     424             : 
     425             : // (0x101F) CHVALUERANGE ------------------------------------------------------
     426             : 
     427             : const sal_uInt16 EXC_ID_CHVALUERANGE            = 0x101F;
     428             : 
     429             : const sal_uInt16 EXC_CHVALUERANGE_AUTOMIN       = 0x0001;
     430             : const sal_uInt16 EXC_CHVALUERANGE_AUTOMAX       = 0x0002;
     431             : const sal_uInt16 EXC_CHVALUERANGE_AUTOMAJOR     = 0x0004;
     432             : const sal_uInt16 EXC_CHVALUERANGE_AUTOMINOR     = 0x0008;
     433             : const sal_uInt16 EXC_CHVALUERANGE_AUTOCROSS     = 0x0010;
     434             : const sal_uInt16 EXC_CHVALUERANGE_LOGSCALE      = 0x0020;
     435             : const sal_uInt16 EXC_CHVALUERANGE_REVERSE       = 0x0040;   /// Axis direction reversed.
     436             : const sal_uInt16 EXC_CHVALUERANGE_MAXCROSS      = 0x0080;   /// Other axis crosses at own maximum.
     437             : const sal_uInt16 EXC_CHVALUERANGE_BIT8          = 0x0100;   /// This bit is always set in BIFF5+.
     438             : 
     439             : // (0x1020) CHLABELRANGE -----------------------------------------------------
     440             : 
     441             : const sal_uInt16 EXC_ID_CHLABELRANGE            = 0x1020;
     442             : 
     443             : const sal_uInt16 EXC_CHLABELRANGE_BETWEEN       = 0x0001;   /// Axis between categories.
     444             : const sal_uInt16 EXC_CHLABELRANGE_MAXCROSS      = 0x0002;   /// Other axis crosses at own maximum.
     445             : const sal_uInt16 EXC_CHLABELRANGE_REVERSE       = 0x0004;   /// Axis direction reversed.
     446             : 
     447             : // (0x1021) CHAXISLINE --------------------------------------------------------
     448             : 
     449             : const sal_uInt16 EXC_ID_CHAXISLINE              = 0x1021;
     450             : 
     451             : const sal_uInt16 EXC_CHAXISLINE_AXISLINE        = 0;        /// Axis line itself.
     452             : const sal_uInt16 EXC_CHAXISLINE_MAJORGRID       = 1;        /// Major grid line.
     453             : const sal_uInt16 EXC_CHAXISLINE_MINORGRID       = 2;        /// Minor grid line.
     454             : const sal_uInt16 EXC_CHAXISLINE_WALLS           = 3;        /// Walls (X, Z axis), floor (Y axis).
     455             : 
     456             : // (0x1024) CHDEFAULTTEXT -----------------------------------------------------
     457             : 
     458             : const sal_uInt16 EXC_ID_CHDEFAULTTEXT           = 0x1024;
     459             : 
     460             : const sal_uInt16 EXC_CHDEFTEXT_TEXTLABEL        = 0;        /// Default for text data labels (not used?).
     461             : const sal_uInt16 EXC_CHDEFTEXT_NUMLABEL         = 1;        /// Default for numeric data labels (not used?).
     462             : const sal_uInt16 EXC_CHDEFTEXT_GLOBAL           = 2;        /// Default text for all chart objects.
     463             : const sal_uInt16 EXC_CHDEFTEXT_AXESSET          = 3;        /// Default text for axes and data points (BIFF8 only).
     464             : const sal_uInt16 EXC_CHDEFTEXT_NONE             = 0xFFFF;   /// No default text available.
     465             : 
     466             : // (0x1025) CHTEXT ------------------------------------------------------------
     467             : 
     468             : const sal_uInt16 EXC_ID_CHTEXT                  = 0x1025;
     469             : 
     470             : const sal_uInt8 EXC_CHTEXT_ALIGN_TOPLEFT        = 1;        /// Horizontal: left, vertical: top.
     471             : const sal_uInt8 EXC_CHTEXT_ALIGN_CENTER         = 2;
     472             : const sal_uInt8 EXC_CHTEXT_ALIGN_BOTTOMRIGHT    = 3;        /// Horizontal: right, vertical: bottom.
     473             : const sal_uInt8 EXC_CHTEXT_ALIGN_JUSTIFY        = 4;
     474             : const sal_uInt8 EXC_CHTEXT_ALIGN_DISTRIBUTE     = 5;
     475             : 
     476             : const sal_uInt16 EXC_CHTEXT_TRANSPARENT         = 1;
     477             : const sal_uInt16 EXC_CHTEXT_OPAQUE              = 2;
     478             : 
     479             : const sal_uInt16 EXC_CHTEXT_AUTOCOLOR           = 0x0001;   /// Automatic text color.
     480             : const sal_uInt16 EXC_CHTEXT_SHOWSYMBOL          = 0x0002;   /// Legend symbol for data point caption.
     481             : const sal_uInt16 EXC_CHTEXT_SHOWVALUE           = 0x0004;   /// Data point caption is the value.
     482             : const sal_uInt16 EXC_CHTEXT_VERTICAL            = 0x0008;
     483             : const sal_uInt16 EXC_CHTEXT_AUTOTEXT            = 0x0010;   /// Label text generated from chart data.
     484             : const sal_uInt16 EXC_CHTEXT_AUTOGEN             = 0x0020;   /// Text object is inserted automatically.
     485             : const sal_uInt16 EXC_CHTEXT_DELETED             = 0x0040;   /// Text object is removed.
     486             : const sal_uInt16 EXC_CHTEXT_AUTOFILL            = 0x0080;   /// Automatic text background mode (transparent/opaque).
     487             : const sal_uInt16 EXC_CHTEXT_SHOWCATEGPERC       = 0x0800;   /// Data point caption is category and percent.
     488             : const sal_uInt16 EXC_CHTEXT_SHOWPERCENT         = 0x1000;   /// Data point caption as percent.
     489             : const sal_uInt16 EXC_CHTEXT_SHOWBUBBLE          = 0x2000;   /// Show bubble size.
     490             : const sal_uInt16 EXC_CHTEXT_SHOWCATEG           = 0x4000;   /// Data point caption is category name.
     491             : 
     492             : const sal_uInt16 EXC_CHTEXT_POS_DEFAULT         = 0;
     493             : const sal_uInt16 EXC_CHTEXT_POS_OUTSIDE         = 1;
     494             : const sal_uInt16 EXC_CHTEXT_POS_INSIDE          = 2;
     495             : const sal_uInt16 EXC_CHTEXT_POS_CENTER          = 3;
     496             : const sal_uInt16 EXC_CHTEXT_POS_AXIS            = 4;
     497             : const sal_uInt16 EXC_CHTEXT_POS_ABOVE           = 5;
     498             : const sal_uInt16 EXC_CHTEXT_POS_BELOW           = 6;
     499             : const sal_uInt16 EXC_CHTEXT_POS_LEFT            = 7;
     500             : const sal_uInt16 EXC_CHTEXT_POS_RIGHT           = 8;
     501             : const sal_uInt16 EXC_CHTEXT_POS_AUTO            = 9;
     502             : const sal_uInt16 EXC_CHTEXT_POS_MOVED           = 10;
     503             : 
     504             : // (0x1026) CHFONT ------------------------------------------------------------
     505             : 
     506             : const sal_uInt16 EXC_ID_CHFONT                  = 0x1026;
     507             : 
     508             : // (0x1027) CHOBJECTLINK ------------------------------------------------------
     509             : 
     510             : const sal_uInt16 EXC_ID_CHOBJECTLINK            = 0x1027;
     511             : 
     512             : // link targets
     513             : const sal_uInt16 EXC_CHOBJLINK_NONE             = 0;        /// No link target.
     514             : const sal_uInt16 EXC_CHOBJLINK_TITLE            = 1;        /// Chart title.
     515             : const sal_uInt16 EXC_CHOBJLINK_YAXIS            = 2;        /// Value axis (Y axis).
     516             : const sal_uInt16 EXC_CHOBJLINK_XAXIS            = 3;        /// Category axis (X axis).
     517             : const sal_uInt16 EXC_CHOBJLINK_DATA             = 4;        /// Data series/point.
     518             : const sal_uInt16 EXC_CHOBJLINK_ZAXIS            = 7;        /// Series axis (Z axis).
     519             : const sal_uInt16 EXC_CHOBJLINK_AXISUNIT         = 12;       /// Unit name for axis labels.
     520             : 
     521             : // (0x1032) CHFRAME -----------------------------------------------------------
     522             : 
     523             : const sal_uInt16 EXC_ID_CHFRAME                 = 0x1032;
     524             : 
     525             : const sal_uInt16 EXC_CHFRAME_STANDARD           = 0;
     526             : const sal_uInt16 EXC_CHFRAME_SHADOW             = 4;
     527             : 
     528             : const sal_uInt16 EXC_CHFRAME_AUTOSIZE           = 0x0001;
     529             : const sal_uInt16 EXC_CHFRAME_AUTOPOS            = 0x0002;
     530             : 
     531             : // (0x1033, 0x1034) CHBEGIN, CHEND --------------------------------------------
     532             : 
     533             : const sal_uInt16 EXC_ID_CHBEGIN                 = 0x1033;
     534             : const sal_uInt16 EXC_ID_CHEND                   = 0x1034;
     535             : 
     536             : // (0x1035) CHPLOTFRAME -------------------------------------------------------
     537             : 
     538             : const sal_uInt16 EXC_ID_CHPLOTFRAME             = 0x1035;
     539             : 
     540             : // (0x103A) CHCHART3D ---------------------------------------------------------
     541             : 
     542             : const sal_uInt16 EXC_ID_CHCHART3D               = 0x103A;
     543             : 
     544             : const sal_uInt16 EXC_CHCHART3D_REAL3D           = 0x0001;   /// true = real 3d perspective.
     545             : const sal_uInt16 EXC_CHCHART3D_CLUSTER          = 0x0002;   /// false = Z axis, true = clustered/stacked.
     546             : const sal_uInt16 EXC_CHCHART3D_AUTOHEIGHT       = 0x0004;   /// true = automatic height to width ratio.
     547             : const sal_uInt16 EXC_CHCHART3D_HASWALLS         = 0x0010;   /// true = 3d chart has walls/floor.
     548             : const sal_uInt16 EXC_CHCHART3D_2DWALLS          = 0x0020;   /// true = 2d wall/gridlines, no floor.
     549             : 
     550             : // (0x103C) CHPICFORMAT -------------------------------------------------------
     551             : 
     552             : const sal_uInt16 EXC_ID_CHPICFORMAT             = 0x103C;
     553             : 
     554             : const sal_uInt16 EXC_CHPICFORMAT_NONE           = 0;        /// For internal use only.
     555             : const sal_uInt16 EXC_CHPICFORMAT_STRETCH        = 1;        /// Bitmap stretched to area.
     556             : const sal_uInt16 EXC_CHPICFORMAT_STACK          = 2;        /// Bitmap stacked.
     557             : const sal_uInt16 EXC_CHPICFORMAT_SCALE          = 3;        /// Bitmap scaled to axis scale.
     558             : 
     559             : const sal_uInt16 EXC_CHPICFORMAT_TOPBOTTOM      = 0x0200;
     560             : const sal_uInt16 EXC_CHPICFORMAT_FRONTBACK      = 0x0400;
     561             : const sal_uInt16 EXC_CHPICFORMAT_LEFTRIGHT      = 0x0800;
     562             : 
     563             : // (0x103D) CHDROPBAR ---------------------------------------------------------
     564             : 
     565             : const sal_uInt16 EXC_ID_CHDROPBAR               = 0x103D;
     566             : 
     567             : const sal_uInt16 EXC_CHDROPBAR_UP               = 0;
     568             : const sal_uInt16 EXC_CHDROPBAR_DOWN             = 1;
     569             : const sal_uInt16 EXC_CHDROPBAR_NONE             = 0xFFFF;
     570             : 
     571             : // (0x103E, 0x1040) CHRADARLINE, CHRADARAREA ----------------------------------
     572             : 
     573             : const sal_uInt16 EXC_ID_CHRADARLINE             = 0x103E;
     574             : const sal_uInt16 EXC_ID_CHRADARAREA             = 0x1040;
     575             : 
     576             : const sal_uInt16 EXC_CHRADAR_AXISLABELS         = 0x0001;
     577             : const sal_uInt16 EXC_CHRADAR_SHADOW             = 0x0002;
     578             : 
     579             : // (0x103F) CHSURFACE ---------------------------------------------------------
     580             : 
     581             : const sal_uInt16 EXC_ID_CHSURFACE               = 0x103F;
     582             : 
     583             : const sal_uInt16 EXC_CHSURFACE_FILLED           = 0x0001;
     584             : const sal_uInt16 EXC_CHSURFACE_SHADING          = 0x0002;
     585             : 
     586             : // (0x1041) CHAXESSET ---------------------------------------------------------
     587             : 
     588             : const sal_uInt16 EXC_ID_CHAXESSET               = 0x1041;
     589             : 
     590             : const sal_uInt16 EXC_CHAXESSET_PRIMARY          = 0;
     591             : const sal_uInt16 EXC_CHAXESSET_SECONDARY        = 1;
     592             : const sal_uInt16 EXC_CHAXESSET_NONE             = 0xFFFF;   /// For internal use.
     593             : 
     594             : // (0x1044) CHPROPERTIES ------------------------------------------------------
     595             : 
     596             : const sal_uInt16 EXC_ID_CHPROPERTIES            = 0x1044;
     597             : 
     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.
     603             : 
     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.
     607             : 
     608             : // (0x1045) CHSERGROUP --------------------------------------------------------
     609             : 
     610             : const sal_uInt16 EXC_ID_CHSERGROUP              = 0x1045;
     611             : 
     612             : const sal_uInt16 EXC_CHSERGROUP_NONE            = 0xFFFF;   /// For internal use: no chart type group.
     613             : 
     614             : // (0x1048, 0x0858) CHPIVOTREF ------------------------------------------------
     615             : 
     616             : const sal_uInt16 EXC_ID5_CHPIVOTREF             = 0x1048;
     617             : const sal_uInt16 EXC_ID8_CHPIVOTREF             = 0x0858;
     618             : 
     619             : // (0x104A) CHSERPARENT -------------------------------------------------------
     620             : 
     621             : const sal_uInt16 EXC_ID_CHSERPARENT             = 0x104A;
     622             : 
     623             : // (0x104B) CHSERTRENDLINE ----------------------------------------------------
     624             : 
     625             : const sal_uInt16 EXC_ID_CHSERTRENDLINE          = 0x104B;
     626             : 
     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;
     632             : 
     633             : // (0x104E) CHFORMAT ----------------------------------------------------------
     634             : 
     635             : const sal_uInt16 EXC_ID_CHFORMAT                = 0x104E;
     636             : 
     637             : // (0x104F) CHFRAMEPOS --------------------------------------------------------
     638             : 
     639             : const sal_uInt16 EXC_ID_CHFRAMEPOS              = 0x104F;
     640             : 
     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;
     646             : 
     647             : // (0x1050) CHFORMATRUNS ------------------------------------------------------
     648             : 
     649             : const sal_uInt16 EXC_ID_CHFORMATRUNS            = 0x1050;
     650             : 
     651             : // (0x1051) CHSOURCELINK ------------------------------------------------------
     652             : 
     653             : const sal_uInt16 EXC_ID_CHSOURCELINK            = 0x1051;
     654             : 
     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;
     659             : 
     660             : const sal_uInt8 EXC_CHSRCLINK_DEFAULT           = 0;
     661             : const sal_uInt8 EXC_CHSRCLINK_DIRECTLY          = 1;
     662             : const sal_uInt8 EXC_CHSRCLINK_WORKSHEET         = 2;
     663             : 
     664             : const sal_uInt16 EXC_CHSRCLINK_NUMFMT           = 0x0001;
     665             : 
     666             : // (0x105B) CHSERERRORBAR -----------------------------------------------------
     667             : 
     668             : const sal_uInt16 EXC_ID_CHSERERRORBAR           = 0x105B;
     669             : 
     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;
     675             : 
     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;
     681             : 
     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.
     684             : 
     685             : // (0x105D) CHSERIESFORMAT ----------------------------------------------------
     686             : 
     687             : const sal_uInt16 EXC_ID_CHSERIESFORMAT          = 0x105D;
     688             : 
     689             : const sal_uInt16 EXC_CHSERIESFORMAT_SMOOTHED    = 0x0001;
     690             : const sal_uInt16 EXC_CHSERIESFORMAT_BUBBLE3D    = 0x0002;
     691             : const sal_uInt16 EXC_CHSERIESFORMAT_SHADOW      = 0x0004;
     692             : 
     693             : // (0x105F) CH3DDATAFORMAT ----------------------------------------------------
     694             : 
     695             : const sal_uInt16 EXC_ID_CH3DDATAFORMAT          = 0x105F;
     696             : 
     697             : const sal_uInt8 EXC_CH3DDATAFORMAT_RECT         = 0;        /// Rectangular base.
     698             : const sal_uInt8 EXC_CH3DDATAFORMAT_CIRC         = 1;        /// Circular base.
     699             : 
     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;        /// Shart top, truncated.
     703             : 
     704             : // (0x1061) CHPIEEXT ----------------------------------------------------------
     705             : 
     706             : const sal_uInt16 EXC_ID_CHPIEEXT                = 0x1061;
     707             : 
     708             : // (0x1062) CHDATERANGE -------------------------------------------------------
     709             : 
     710             : const sal_uInt16 EXC_ID_CHDATERANGE             = 0x1062;
     711             : 
     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.
     720             : 
     721             : const sal_uInt16 EXC_CHDATERANGE_DAYS           = 0;
     722             : const sal_uInt16 EXC_CHDATERANGE_MONTHS         = 1;
     723             : const sal_uInt16 EXC_CHDATERANGE_YEARS          = 2;
     724             : 
     725             : // (0x1066) CHESCHERFORMAT ----------------------------------------------------
     726             : 
     727             : const sal_uInt16 EXC_ID_CHESCHERFORMAT          = 0x1066;
     728             : 
     729             : // Other record IDs -----------------------------------------------------------
     730             : 
     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;
     738             : 
     739             : // ============================================================================
     740             : // Structs and classes
     741             : // ============================================================================
     742             : 
     743             : // Common =====================================================================
     744             : 
     745             : struct XclChRectangle
     746             : {
     747             :     sal_Int32           mnX;                /// X position of the object in 1/4000 of chart width.
     748             :     sal_Int32           mnY;                /// Y position of the object in 1/4000 of chart height.
     749             :     sal_Int32           mnWidth;            /// Width of the object in 1/4000 of chart width.
     750             :     sal_Int32           mnHeight;           /// Height of the object in 1/4000 of chart height.
     751             : 
     752             :     explicit            XclChRectangle();
     753             : };
     754             : 
     755             : // ----------------------------------------------------------------------------
     756             : 
     757             : /** Specifies the position of a data series or data point. */
     758             : struct XclChDataPointPos
     759             : {
     760             :     sal_uInt16          mnSeriesIdx;        /// Series index of series or a data point.
     761             :     sal_uInt16          mnPointIdx;         /// Index of a data point inside a series.
     762             : 
     763             :     explicit            XclChDataPointPos(
     764             :                             sal_uInt16 nSeriesIdx = EXC_CHSERIES_INVALID,
     765             :                             sal_uInt16 nPointIdx = EXC_CHDATAFORMAT_ALLPOINTS );
     766             : };
     767             : 
     768             : bool operator<( const XclChDataPointPos& rL, const XclChDataPointPos& rR );
     769             : 
     770             : // ----------------------------------------------------------------------------
     771             : 
     772             : /** Contains the type and context of a block of future records which are
     773             :     guarded by CHFRBLOCKBEGIN and CHFRBLOCKEND records. */
     774             : struct XclChFrBlock
     775             : {
     776             :     sal_uInt16          mnType;             /// Type of the future record block.
     777             :     sal_uInt16          mnContext;          /// Context dependent on type.
     778             :     sal_uInt16          mnValue1;           /// Optional primary value for current context.
     779             :     sal_uInt16          mnValue2;           /// Optional secondary value for current context.
     780             : 
     781             :     explicit            XclChFrBlock( sal_uInt16 nType );
     782             : };
     783             : 
     784             : // Frame formatting ===========================================================
     785             : 
     786             : struct XclChFramePos
     787             : {
     788             :     XclChRectangle      maRect;             /// Object dependent position data.
     789             :     sal_uInt16          mnTLMode;           /// Top-left position mode.
     790             :     sal_uInt16          mnBRMode;           /// Bottom-right position mode.
     791             : 
     792             :     explicit            XclChFramePos();
     793             : };
     794             : 
     795             : // ----------------------------------------------------------------------------
     796             : 
     797             : struct XclChLineFormat
     798             : {
     799             :     Color               maColor;            /// Line color.
     800             :     sal_uInt16          mnPattern;          /// Line pattern (solid, dashed, ...).
     801             :     sal_Int16           mnWeight;           /// Line weight (hairline, single, ...).
     802             :     sal_uInt16          mnFlags;            /// Additional flags.
     803             : 
     804             :     explicit            XclChLineFormat();
     805             : };
     806             : 
     807             : // ----------------------------------------------------------------------------
     808             : 
     809             : struct XclChAreaFormat
     810             : {
     811             :     Color               maPattColor;        /// Pattern color.
     812             :     Color               maBackColor;        /// Pattern background color.
     813             :     sal_uInt16          mnPattern;          /// Fill pattern.
     814             :     sal_uInt16          mnFlags;            /// Additional flags.
     815             : 
     816             :     explicit            XclChAreaFormat();
     817             : };
     818             : 
     819             : // ----------------------------------------------------------------------------
     820             : 
     821             : class SfxItemSet;
     822             : class EscherPropertyContainer;
     823             : 
     824             : struct XclChEscherFormat
     825             : {
     826             :     typedef boost::shared_ptr< SfxItemSet >                SfxItemSetRef;
     827             :     typedef boost::shared_ptr< EscherPropertyContainer >   EscherPropSetRef;
     828             : 
     829             :     SfxItemSetRef       mxItemSet;          /// Item set for Escher properties import.
     830             :     EscherPropSetRef    mxEscherSet;        /// Container for Escher properties export.
     831             : 
     832             :     explicit            XclChEscherFormat();
     833             :                         ~XclChEscherFormat();
     834             : };
     835             : 
     836             : // ----------------------------------------------------------------------------
     837             : 
     838             : struct XclChPicFormat
     839             : {
     840             :     sal_uInt16          mnBmpMode;          /// Bitmap mode, e.g. stretched, stacked.
     841             :     sal_uInt16          mnFlags;            /// Additional flags.
     842             :     double              mfScale;            /// Picture scaling (units).
     843             : 
     844             :     explicit            XclChPicFormat();
     845             : };
     846             : 
     847             : // ----------------------------------------------------------------------------
     848             : 
     849             : struct XclChFrame
     850             : {
     851             :     sal_uInt16          mnFormat;           /// Format type of the frame.
     852             :     sal_uInt16          mnFlags;            /// Additional flags.
     853             : 
     854             :     explicit            XclChFrame();
     855             : };
     856             : 
     857             : // Source links ===============================================================
     858             : 
     859             : struct XclChSourceLink
     860             : {
     861             :     sal_uInt8           mnDestType;         /// Type of the destination (title, values, ...).
     862             :     sal_uInt8           mnLinkType;         /// Link type (directly, linked to worksheet, ...).
     863             :     sal_uInt16          mnFlags;            /// Additional flags.
     864             :     sal_uInt16          mnNumFmtIdx;        /// Number format index.
     865             : 
     866             :     explicit            XclChSourceLink();
     867             : };
     868             : 
     869             : // Text =======================================================================
     870             : 
     871             : struct XclChObjectLink
     872             : {
     873             :     XclChDataPointPos   maPointPos;         /// Position of the data point.
     874             :     sal_uInt16          mnTarget;           /// Target of the link.
     875             : 
     876             :     explicit            XclChObjectLink();
     877             : };
     878             : 
     879             : // ----------------------------------------------------------------------------
     880             : 
     881           0 : struct XclChFrLabelProps
     882             : {
     883             :     rtl::OUString       maSeparator;        /// Separator between label values.
     884             :     sal_uInt16          mnFlags;            /// Flags indicating which values to be displayed.
     885             : 
     886             :     explicit            XclChFrLabelProps();
     887             : };
     888             : 
     889             : // ----------------------------------------------------------------------------
     890             : 
     891             : struct XclChText
     892             : {
     893             :     XclChRectangle      maRect;             /// Position of the text object.
     894             :     Color               maTextColor;        /// Text color.
     895             :     sal_uInt8           mnHAlign;           /// Horizontal alignment.
     896             :     sal_uInt8           mnVAlign;           /// Vertical alignment.
     897             :     sal_uInt16          mnBackMode;         /// Background mode: transparent, opaque.
     898             :     sal_uInt16          mnFlags;            /// Additional flags.
     899             :     sal_uInt16          mnFlags2;           /// Text object placement and text direction (BIFF8+).
     900             :     sal_uInt16          mnRotation;         /// Text object rotation (BIFF8+).
     901             : 
     902             :     explicit            XclChText();
     903             : };
     904             : 
     905             : // Data series ================================================================
     906             : 
     907             : struct XclChMarkerFormat
     908             : {
     909             :     Color               maLineColor;        /// Border line color.
     910             :     Color               maFillColor;        /// Fill color.
     911             :     sal_uInt32          mnMarkerSize;       /// Size of a marker
     912             :     sal_uInt16          mnMarkerType;       /// Marker type (none, diamond, ...).
     913             :     sal_uInt16          mnFlags;            /// Additional flags.
     914             : 
     915             :     explicit            XclChMarkerFormat();
     916             : };
     917             : 
     918             : // ----------------------------------------------------------------------------
     919             : 
     920             : struct XclCh3dDataFormat
     921             : {
     922             :     sal_uInt8           mnBase;             /// Base form.
     923             :     sal_uInt8           mnTop;              /// Top egde mode.
     924             : 
     925             :     explicit            XclCh3dDataFormat();
     926             : };
     927             : 
     928             : // ----------------------------------------------------------------------------
     929             : 
     930             : struct XclChDataFormat
     931             : {
     932             :     XclChDataPointPos   maPointPos;         /// Position of the data point or series.
     933             :     sal_uInt16          mnFormatIdx;        /// Formatting index for automatic colors.
     934             :     sal_uInt16          mnFlags;            /// Additional flags.
     935             : 
     936             :     explicit            XclChDataFormat();
     937             : };
     938             : 
     939             : // ----------------------------------------------------------------------------
     940             : 
     941             : struct XclChSerTrendLine
     942             : {
     943             :     double              mfIntercept;        /// Forced intercept.
     944             :     double              mfForecastFor;      /// Counter to forecast forward.
     945             :     double              mfForecastBack;     /// Counter to forecast backward.
     946             :     sal_uInt8           mnLineType;         /// Type of the trend line.
     947             :     sal_uInt8           mnOrder;            /// Polynomial order or moving average counter.
     948             :     sal_uInt8           mnShowEquation;     /// 1 = Show equation.
     949             :     sal_uInt8           mnShowRSquared;     /// 1 = Show R-squared.
     950             : 
     951             :     explicit            XclChSerTrendLine();
     952             : };
     953             : 
     954             : // ----------------------------------------------------------------------------
     955             : 
     956             : struct XclChSerErrorBar
     957             : {
     958             :     double              mfValue;            /// Fixed value for several source types.
     959             :     sal_uInt16          mnValueCount;       /// Number of custom error values.
     960             :     sal_uInt8           mnBarType;          /// Type of the error bar (X/Y).
     961             :     sal_uInt8           mnSourceType;       /// Type of source values.
     962             :     sal_uInt8           mnLineEnd;          /// Type of the line ends.
     963             : 
     964             :     explicit            XclChSerErrorBar();
     965             : };
     966             : 
     967             : // ----------------------------------------------------------------------------
     968             : 
     969             : struct XclChSeries
     970             : {
     971             :     sal_uInt16          mnCategType;        /// Data type for category entries.
     972             :     sal_uInt16          mnValueType;        /// Data type for value entries.
     973             :     sal_uInt16          mnBubbleType;       /// Data type for bubble entries.
     974             :     sal_uInt16          mnCategCount;       /// Number of category entries.
     975             :     sal_uInt16          mnValueCount;       /// Number of value entries.
     976             :     sal_uInt16          mnBubbleCount;      /// Number of bubble entries.
     977             : 
     978             :     explicit            XclChSeries();
     979             : };
     980             : 
     981             : // Chart type groups ==========================================================
     982             : 
     983             : struct XclChType
     984             : {
     985             :     sal_Int16           mnOverlap;          /// Bar overlap width (CHBAR).
     986             :     sal_Int16           mnGap;              /// Gap between bars (CHBAR).
     987             :     sal_uInt16          mnRotation;         /// Rotation angle of first pie (CHPIE).
     988             :     sal_uInt16          mnPieHole;          /// Hole size in donut chart (CHPIE).
     989             :     sal_uInt16          mnBubbleSize;       /// Bubble size in bubble chart (CHSCATTER).
     990             :     sal_uInt16          mnBubbleType;       /// Bubble type in bubble chart (CHSCATTER).
     991             :     sal_uInt16          mnFlags;            /// Additional flags (all chart types).
     992             : 
     993             :     explicit            XclChType();
     994             : };
     995             : 
     996             : // ----------------------------------------------------------------------------
     997             : 
     998             : struct XclChChart3d
     999             : {
    1000             :     sal_uInt16          mnRotation;         /// Rotation (0...359deg).
    1001             :     sal_Int16           mnElevation;        /// Elevation (-90...+90deg).
    1002             :     sal_uInt16          mnEyeDist;          /// Eye distance to chart (0...100).
    1003             :     sal_uInt16          mnRelHeight;        /// Height relative to width.
    1004             :     sal_uInt16          mnRelDepth;         /// Depth relative to width.
    1005             :     sal_uInt16          mnDepthGap;         /// Space between series.
    1006             :     sal_uInt16          mnFlags;            /// Additional flags.
    1007             : 
    1008             :     explicit            XclChChart3d();
    1009             : };
    1010             : 
    1011             : // ----------------------------------------------------------------------------
    1012             : 
    1013             : struct XclChLegend
    1014             : {
    1015             :     XclChRectangle      maRect;             /// Position of the legend.
    1016             :     sal_uInt8           mnDockMode;         /// Docking mode.
    1017             :     sal_uInt8           mnSpacing;          /// Spacing between elements.
    1018             :     sal_uInt16          mnFlags;            /// Additional flags.
    1019             : 
    1020             :     explicit            XclChLegend();
    1021             : };
    1022             : 
    1023             : // ----------------------------------------------------------------------------
    1024             : 
    1025             : struct XclChTypeGroup
    1026             : {
    1027             :     sal_uInt16          mnFlags;            /// Additional flags.
    1028             :     sal_uInt16          mnGroupIdx;         /// Chart type group index.
    1029             : 
    1030             :     explicit            XclChTypeGroup();
    1031             : };
    1032             : 
    1033             : // ----------------------------------------------------------------------------
    1034             : 
    1035             : struct XclChProperties
    1036             : {
    1037             :     sal_uInt16          mnFlags;            /// Additional flags.
    1038             :     sal_uInt8           mnEmptyMode;        /// Plotting mode for empty cells.
    1039             : 
    1040             :     explicit            XclChProperties();
    1041             : };
    1042             : 
    1043             : // Axes =======================================================================
    1044             : 
    1045             : struct XclChLabelRange
    1046             : {
    1047             :     sal_uInt16          mnCross;            /// Crossing position of other axis.
    1048             :     sal_uInt16          mnLabelFreq;        /// Frequency of labels.
    1049             :     sal_uInt16          mnTickFreq;         /// Frequency of ticks.
    1050             :     sal_uInt16          mnFlags;            /// Additional flags.
    1051             : 
    1052             :     explicit            XclChLabelRange();
    1053             : };
    1054             : 
    1055             : // ----------------------------------------------------------------------------
    1056             : 
    1057             : struct XclChDateRange
    1058             : {
    1059             :     sal_uInt16          mnMinDate;          /// Minimum value on axis.
    1060             :     sal_uInt16          mnMaxDate;          /// Maximum value on axis.
    1061             :     sal_uInt16          mnMajorStep;        /// Distance for major grid lines.
    1062             :     sal_uInt16          mnMajorUnit;        /// Time unit for major step.
    1063             :     sal_uInt16          mnMinorStep;        /// Distance for minor grid lines.
    1064             :     sal_uInt16          mnMinorUnit;        /// Time unit for minor step.
    1065             :     sal_uInt16          mnBaseUnit;         /// Time unit for axis values.
    1066             :     sal_uInt16          mnCross;            /// Crossing position of other axis.
    1067             :     sal_uInt16          mnFlags;            /// Additional flags.
    1068             : 
    1069             :     explicit            XclChDateRange();
    1070             : };
    1071             : 
    1072             : // ----------------------------------------------------------------------------
    1073             : 
    1074             : struct XclChValueRange
    1075             : {
    1076             :     double              mfMin;              /// Minimum value on axis.
    1077             :     double              mfMax;              /// Maximum value on axis.
    1078             :     double              mfMajorStep;        /// Distance for major grid lines.
    1079             :     double              mfMinorStep;        /// Distance for minor grid lines.
    1080             :     double              mfCross;            /// Crossing position of other axis.
    1081             :     sal_uInt16          mnFlags;            /// Additional flags.
    1082             : 
    1083             :     explicit            XclChValueRange();
    1084             : };
    1085             : 
    1086             : // ----------------------------------------------------------------------------
    1087             : 
    1088             : struct XclChTick
    1089             : {
    1090             :     Color               maTextColor;        /// Tick labels color.
    1091             :     sal_uInt8           mnMajor;            /// Type of tick marks of major grid.
    1092             :     sal_uInt8           mnMinor;            /// Type of tick marks of minor grid.
    1093             :     sal_uInt8           mnLabelPos;         /// Position of labels relative to axis.
    1094             :     sal_uInt8           mnBackMode;         /// Background mode: transparent, opaque.
    1095             :     sal_uInt16          mnFlags;            /// Additional flags.
    1096             :     sal_uInt16          mnRotation;         /// Tick labels angle (BIFF8+).
    1097             : 
    1098             :     explicit            XclChTick();
    1099             : };
    1100             : 
    1101             : // ----------------------------------------------------------------------------
    1102             : 
    1103             : struct XclChAxis
    1104             : {
    1105             :     sal_uInt16          mnType;             /// Axis type.
    1106             : 
    1107             :     explicit            XclChAxis();
    1108             : 
    1109             :     /** Returns the axis dimension index used by the chart API. */
    1110             :     sal_Int32           GetApiAxisDimension() const;
    1111             : };
    1112             : 
    1113             : // ----------------------------------------------------------------------------
    1114             : 
    1115             : struct XclChAxesSet
    1116             : {
    1117             :     XclChRectangle      maRect;             /// Position of the axes set (inner plot area).
    1118             :     sal_uInt16          mnAxesSetId;        /// Primary/secondary axes set.
    1119             : 
    1120             :     explicit            XclChAxesSet();
    1121             : 
    1122             :     /** Returns the axes set index used by the chart API. */
    1123             :     sal_Int32           GetApiAxesSetIndex() const;
    1124             : };
    1125             : 
    1126             : // Property mode ==============================================================
    1127             : 
    1128             : /** Specifies the type of a formatting. This results in different property names. */
    1129             : enum XclChPropertyMode
    1130             : {
    1131             :     EXC_CHPROPMODE_COMMON,          /// Common objects, no special handling.
    1132             :     EXC_CHPROPMODE_LINEARSERIES,    /// Specific to data series drawn as lines.
    1133             :     EXC_CHPROPMODE_FILLEDSERIES     /// Specific to data series drawn as areas.
    1134             : };
    1135             : 
    1136             : // Static helper functions ====================================================
    1137             : 
    1138             : /** Contains static helper functions for the chart filters. */
    1139             : class XclChartHelper
    1140             : {
    1141             : public:
    1142             :     /** Returns a palette index for automatic series line colors. */
    1143             :     static sal_uInt16   GetSeriesLineAutoColorIdx( sal_uInt16 nFormatIdx );
    1144             :     /** Returns a palette index for automatic series fill colors. */
    1145             :     static sal_uInt16   GetSeriesFillAutoColorIdx( sal_uInt16 nFormatIdx );
    1146             :     /** Returns a transparency value for automatic series fill colors. */
    1147             :     static sal_uInt8    GetSeriesFillAutoTransp( sal_uInt16 nFormatIdx );
    1148             :     /** Returns an automatic symbol index for the passed format index. */
    1149             :     static sal_uInt16   GetAutoMarkerType( sal_uInt16 nFormatIdx );
    1150             :     /** Returns true, if the passed marker type is filled. */
    1151             :     static bool         HasMarkerFillColor( sal_uInt16 nMarkerType );
    1152             :     /** Returns the role name for a manual data source for error bars. */
    1153             :     static ::rtl::OUString GetErrorBarValuesRole( sal_uInt8 nBarType );
    1154             : };
    1155             : 
    1156             : // Chart formatting info provider =============================================
    1157             : 
    1158             : /** Enumerates different object types for specific automatic formatting behaviour. */
    1159             : enum XclChObjectType
    1160             : {
    1161             :     EXC_CHOBJTYPE_BACKGROUND,       /// Chart background.
    1162             :     EXC_CHOBJTYPE_PLOTFRAME,        /// Wall formatting in 2d charts.
    1163             :     EXC_CHOBJTYPE_WALL3D,           /// Wall formatting in 3d charts.
    1164             :     EXC_CHOBJTYPE_FLOOR3D,          /// Floor formatting in 3d charts.
    1165             :     EXC_CHOBJTYPE_TEXT,             /// Text boxes (titles, data point labels).
    1166             :     EXC_CHOBJTYPE_LEGEND,           /// Chart legend.
    1167             :     EXC_CHOBJTYPE_LINEARSERIES,     /// Series formatting in a chart supporting line formatting only.
    1168             :     EXC_CHOBJTYPE_FILLEDSERIES,     /// Series formatting in a chart supporting area formatting.
    1169             :     EXC_CHOBJTYPE_AXISLINE,         /// Axis line format.
    1170             :     EXC_CHOBJTYPE_GRIDLINE,         /// Axis grid line format.
    1171             :     EXC_CHOBJTYPE_TRENDLINE,        /// Series trend line.
    1172             :     EXC_CHOBJTYPE_ERRORBAR,         /// Series error bar.
    1173             :     EXC_CHOBJTYPE_CONNECTLINE,      /// Data point connector line.
    1174             :     EXC_CHOBJTYPE_HILOLINE,         /// High/low lines in stock charts.
    1175             :     EXC_CHOBJTYPE_WHITEDROPBAR,     /// White-day drop bar in stock charts.
    1176             :     EXC_CHOBJTYPE_BLACKDROPBAR      /// Black-day drop bar in stock charts.
    1177             : };
    1178             : 
    1179             : /** Enumerates different types to handle missing frame objects. */
    1180             : enum XclChFrameType
    1181             : {
    1182             :      EXC_CHFRAMETYPE_AUTO,          /// Missing frame represents automatic formatting.
    1183             :      EXC_CHFRAMETYPE_INVISIBLE      /// Missing frame represents invisible formatting.
    1184             : };
    1185             : 
    1186             : /** Contains information about auto formatting of a specific chart object type. */
    1187             : struct XclChFormatInfo
    1188             : {
    1189             :     XclChObjectType     meObjType;          /// Object type for automatic format.
    1190             :     XclChPropertyMode   mePropMode;         /// Property mode for property set helper.
    1191             :     sal_uInt16          mnAutoLineColorIdx; /// Automatic line color index.
    1192             :     sal_Int16           mnAutoLineWeight;   /// Automatic line weight (hairline, single, ...).
    1193             :     sal_uInt16          mnAutoPattColorIdx; /// Automatic fill pattern color index.
    1194             :     XclChFrameType      meDefFrameType;     /// Default format type for missing frame objects.
    1195             :     bool                mbCreateDefFrame;   /// true = Create missing frame objects on import.
    1196             :     bool                mbDeleteDefFrame;   /// true = Delete default frame formatting on export.
    1197             :     bool                mbIsFrame;          /// true = Object is a frame, false = Object is a line.
    1198             : };
    1199             : 
    1200             : // ----------------------------------------------------------------------------
    1201             : 
    1202             : /** Provides access to chart auto formatting for all available object types. */
    1203          40 : class XclChFormatInfoProvider
    1204             : {
    1205             : public:
    1206             :     explicit            XclChFormatInfoProvider();
    1207             : 
    1208             :     /** Returns an info struct about auto formatting for the passed object type. */
    1209             :     const XclChFormatInfo& GetFormatInfo( XclChObjectType eObjType ) const;
    1210             : 
    1211             : private:
    1212             :     typedef ::std::map< XclChObjectType, const XclChFormatInfo* > XclFmtInfoMap;
    1213             :     XclFmtInfoMap       maInfoMap;          /// Maps object type to formatting data.
    1214             : };
    1215             : 
    1216             : // Chart type info provider ===================================================
    1217             : 
    1218             : /** Enumerates all kinds of different chart types. */
    1219             : enum XclChTypeId
    1220             : {
    1221             :     EXC_CHTYPEID_BAR,               /// Vertical bar chart.
    1222             :     EXC_CHTYPEID_HORBAR,            /// Horizontal bar chart.
    1223             :     EXC_CHTYPEID_LINE,              /// Line chart.
    1224             :     EXC_CHTYPEID_AREA,              /// Area chart.
    1225             :     EXC_CHTYPEID_STOCK,             /// Stock chart.
    1226             :     EXC_CHTYPEID_RADARLINE,         /// Linear radar chart.
    1227             :     EXC_CHTYPEID_RADARAREA,         /// Filled radar chart.
    1228             :     EXC_CHTYPEID_PIE,               /// Pie chart.
    1229             :     EXC_CHTYPEID_DONUT,             /// Donut chart.
    1230             :     EXC_CHTYPEID_PIEEXT,            /// Pie-to-pie or pie-to-bar chart.
    1231             :     EXC_CHTYPEID_SCATTER,           /// Scatter (XY) chart.
    1232             :     EXC_CHTYPEID_BUBBLES,           /// Bubble chart.
    1233             :     EXC_CHTYPEID_SURFACE,           /// Surface chart.
    1234             :     EXC_CHTYPEID_UNKNOWN            /// Default for unknown chart types.
    1235             : };
    1236             : 
    1237             : /** Enumerates different categories of similar chart types. */
    1238             : enum XclChTypeCateg
    1239             : {
    1240             :     EXC_CHTYPECATEG_BAR,            /// Bar charts (horizontal or vertical).
    1241             :     EXC_CHTYPECATEG_LINE,           /// Line charts (line, area, stock charts).
    1242             :     EXC_CHTYPECATEG_RADAR,          /// Radar charts (linear or filled).
    1243             :     EXC_CHTYPECATEG_PIE,            /// Pie and donut charts.
    1244             :     EXC_CHTYPECATEG_SCATTER,        /// Scatter and bubble charts.
    1245             :     EXC_CHTYPECATEG_SURFACE         /// Surface charts.
    1246             : };
    1247             : 
    1248             : /** Enumerates modes for varying point colors in a series. */
    1249             : enum XclChVarPointMode
    1250             : {
    1251             :     EXC_CHVARPOINT_NONE,            /// No varied colors supported.
    1252             :     EXC_CHVARPOINT_SINGLE,          /// Only supported, if type group contains only one series.
    1253             :     EXC_CHVARPOINT_MULTI            /// Supported for multiple series in a chart type group.
    1254             : };
    1255             : 
    1256             : /** Contains information for a chart type. */
    1257             : struct XclChTypeInfo
    1258             : {
    1259             :     XclChTypeId         meTypeId;               /// Unique chart type identifier.
    1260             :     XclChTypeCateg      meTypeCateg;            /// Chart type category this type belongs to.
    1261             :     sal_uInt16          mnRecId;                /// Record identifier written to the file.
    1262             :     const sal_Char*     mpcServiceName;         /// Service name of the type.
    1263             :     XclChVarPointMode   meVarPointMode;         /// Mode for varying point colors.
    1264             :     sal_Int32           mnDefaultLabelPos;      /// Default data label position (API constant).
    1265             :     bool                mbCombinable2d;         /// true = Types can be combined in one axes set.
    1266             :     bool                mbSupports3d;           /// true = 3d type allowed, false = Only 2d type.
    1267             :     bool                mbPolarCoordSystem;     /// true = Polar, false = Cartesian.
    1268             :     bool                mbSeriesIsFrame2d;      /// true = Series with area formatting (2d charts).
    1269             :     bool                mbSeriesIsFrame3d;      /// true = Series with area formatting (3d charts).
    1270             :     bool                mbSingleSeriesVis;      /// true = Only first series visible.
    1271             :     bool                mbCategoryAxis;         /// true = X axis contains categories.
    1272             :     bool                mbSwappedAxesSet;       /// true = X and Y axes are swapped.
    1273             :     bool                mbSupportsStacking;     /// true = Series can be stacked on each other.
    1274             :     bool                mbReverseSeries;        /// true = Insert unstacked series in reverse order.
    1275             :     bool                mbTicksBetweenCateg;    /// true = X axis ticks between categories.
    1276             : };
    1277             : 
    1278             : /** Extended chart type information and access functions. */
    1279             : struct XclChExtTypeInfo : public XclChTypeInfo
    1280             : {
    1281             :     bool                mb3dChart;              /// Chart is actually a 3D chart.
    1282             :     bool                mbSpline;               /// Series lines are smoothed.
    1283             : 
    1284             :     explicit            XclChExtTypeInfo( const XclChTypeInfo& rTypeInfo );
    1285             : 
    1286             :     void                Set( const XclChTypeInfo& rTypeInfo, bool b3dChart, bool bSpline );
    1287             : 
    1288             :     /** Returns true, if this chart type supports area formatting for its series. */
    1289         405 :     inline bool         IsSeriesFrameFormat() const
    1290         405 :                             { return mb3dChart ? mbSeriesIsFrame3d : mbSeriesIsFrame2d; }
    1291             :     /** Returns the correct object type identifier for series and data points. */
    1292          97 :     inline XclChObjectType GetSeriesObjectType() const
    1293          97 :                             { return IsSeriesFrameFormat() ? EXC_CHOBJTYPE_FILLEDSERIES : EXC_CHOBJTYPE_LINEARSERIES; }
    1294             : };
    1295             : 
    1296             : // ----------------------------------------------------------------------------
    1297             : 
    1298             : /** Provides access to chart type info structs for all available chart types. */
    1299          40 : class XclChTypeInfoProvider
    1300             : {
    1301             : public:
    1302             :     explicit            XclChTypeInfoProvider();
    1303             : 
    1304             :     /** Returns chart type info for a unique chart type identifier. */
    1305             :     const XclChTypeInfo& GetTypeInfo( XclChTypeId eType ) const;
    1306             :     /** Returns the first fitting chart type info for an Excel chart type record identifier. */
    1307             :     const XclChTypeInfo& GetTypeInfoFromRecId( sal_uInt16 nRecId ) const;
    1308             :     /** Returns the first fitting chart type info for the passed service name. */
    1309             :     const XclChTypeInfo& GetTypeInfoFromService( const ::rtl::OUString& rServiceName ) const;
    1310             : 
    1311             : private:
    1312             :     typedef ::std::map< XclChTypeId, const XclChTypeInfo* > XclChTypeInfoMap;
    1313             :     XclChTypeInfoMap    maInfoMap;          /// Maps chart types to type info data.
    1314             : };
    1315             : 
    1316             : // Chart text and title object helpers ========================================
    1317             : 
    1318             : /** Enumerates different text box types for default text formatting and title
    1319             :     positioning. */
    1320             : enum XclChTextType
    1321             : {
    1322             :     EXC_CHTEXTTYPE_TITLE,           /// Chart title.
    1323             :     EXC_CHTEXTTYPE_LEGEND,          /// Chart legend.
    1324             :     EXC_CHTEXTTYPE_AXISTITLE,       /// Chart axis titles.
    1325             :     EXC_CHTEXTTYPE_AXISLABEL,       /// Chart axis labels.
    1326             :     EXC_CHTEXTTYPE_DATALABEL        /// Data point labels.
    1327             : };
    1328             : 
    1329             : /** A map key for text and title objects. */
    1330             : struct XclChTextKey : public ::std::pair< XclChTextType, ::std::pair< sal_uInt16, sal_uInt16 > >
    1331             : {
    1332         261 :     inline explicit     XclChTextKey( XclChTextType eTextType, sal_uInt16 nMainIdx = 0, sal_uInt16 nSubIdx = 0 )
    1333         261 :                             { first = eTextType; second.first = nMainIdx; second.second = nSubIdx; }
    1334             : };
    1335             : 
    1336             : /** Function prototype receiving a chart document and returning a title shape. */
    1337             : typedef ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
    1338             :     (*XclChGetShapeFunc)( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDocument >& );
    1339             : 
    1340             : // Property helpers ===========================================================
    1341             : 
    1342         160 : class XclChObjectTable
    1343             : {
    1344             : public:
    1345             :     typedef ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >     XNameContainerRef;
    1346             :     typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >    XServiceFactoryRef;
    1347             : 
    1348             : public:
    1349             :     explicit            XclChObjectTable( XServiceFactoryRef xFactory,
    1350             :                             const ::rtl::OUString& rServiceName, const ::rtl::OUString& rObjNameBase );
    1351             : 
    1352             :     /** Returns a named formatting object from the chart document. */
    1353             :     ::com::sun::star::uno::Any GetObject( const ::rtl::OUString& rObjName );
    1354             :     /** Insertes a named formatting object into the chart document. */
    1355             :     ::rtl::OUString     InsertObject( const ::com::sun::star::uno::Any& rObj );
    1356             : 
    1357             : private:
    1358             :     XServiceFactoryRef  mxFactory;              /// Factory to create the container.
    1359             :     XNameContainerRef   mxContainer;            /// Container for the objects.
    1360             :     ::rtl::OUString     maServiceName;          /// Service name to create the container.
    1361             :     ::rtl::OUString     maObjNameBase;          /// Base of names for inserted objects.
    1362             :     sal_Int32           mnIndex;                /// Index to create unique identifiers.
    1363             : };
    1364             : 
    1365             : // ----------------------------------------------------------------------------
    1366             : 
    1367             : struct XclFontData;
    1368             : 
    1369             : /** Helper class for usage of property sets. */
    1370          21 : class XclChPropSetHelper
    1371             : {
    1372             : public:
    1373             :     explicit            XclChPropSetHelper();
    1374             : 
    1375             :     /** Reads all line properties from the passed property set. */
    1376             :     void                ReadLineProperties(
    1377             :                             XclChLineFormat& rLineFmt,
    1378             :                             XclChObjectTable& rDashTable,
    1379             :                             const ScfPropertySet& rPropSet,
    1380             :                             XclChPropertyMode ePropMode );
    1381             :     /** Reads solid area properties from the passed property set.
    1382             :         @return  true = object contains complex fill properties. */
    1383             :     bool                ReadAreaProperties(
    1384             :                             XclChAreaFormat& rAreaFmt,
    1385             :                             const ScfPropertySet& rPropSet,
    1386             :                             XclChPropertyMode ePropMode );
    1387             :     /** Reads gradient or bitmap area properties from the passed property set. */
    1388             :     void                ReadEscherProperties(
    1389             :                             XclChEscherFormat& rEscherFmt,
    1390             :                             XclChPicFormat& rPicFmt,
    1391             :                             XclChObjectTable& rGradientTable,
    1392             :                             XclChObjectTable& rHatchTable,
    1393             :                             XclChObjectTable& rBitmapTable,
    1394             :                             const ScfPropertySet& rPropSet,
    1395             :                             XclChPropertyMode ePropMode );
    1396             :     /** Reads all marker properties from the passed property set. */
    1397             :     void                ReadMarkerProperties(
    1398             :                             XclChMarkerFormat& rMarkerFmt,
    1399             :                             const ScfPropertySet& rPropSet,
    1400             :                             sal_uInt16 nFormatIdx );
    1401             :     /** Reads rotation properties from the passed property set. */
    1402             :     sal_uInt16          ReadRotationProperties(
    1403             :                             const ScfPropertySet& rPropSet,
    1404             :                             bool bSupportsStacked );
    1405             : 
    1406             :     /** Writes all line properties to the passed property set. */
    1407             :     void                WriteLineProperties(
    1408             :                             ScfPropertySet& rPropSet,
    1409             :                             XclChObjectTable& rDashTable,
    1410             :                             const XclChLineFormat& rLineFmt,
    1411             :                             XclChPropertyMode ePropMode );
    1412             :     /** Writes solid area properties to the passed property set. */
    1413             :     void                WriteAreaProperties(
    1414             :                             ScfPropertySet& rPropSet,
    1415             :                             const XclChAreaFormat& rAreaFmt,
    1416             :                             XclChPropertyMode ePropMode );
    1417             :     /** Writes gradient or bitmap area properties to the passed property set. */
    1418             :     void                WriteEscherProperties(
    1419             :                             ScfPropertySet& rPropSet,
    1420             :                             XclChObjectTable& rGradientTable,
    1421             :                             XclChObjectTable& rHatchTable,
    1422             :                             XclChObjectTable& rBitmapTable,
    1423             :                             const XclChEscherFormat& rEscherFmt,
    1424             :                             const XclChPicFormat* pPicFmt,
    1425             :                             sal_uInt32 nDffFillType,
    1426             :                             XclChPropertyMode ePropMode );
    1427             :     /** Writes all marker properties to the passed property set. */
    1428             :     void                WriteMarkerProperties(
    1429             :                             ScfPropertySet& rPropSet,
    1430             :                             const XclChMarkerFormat& rMarkerFmt );
    1431             :     /** Writes rotation properties to the passed property set. */
    1432             :     void                WriteRotationProperties(
    1433             :                             ScfPropertySet& rPropSet,
    1434             :                             sal_uInt16 nRotation,
    1435             :                             bool bSupportsStacked );
    1436             : 
    1437             : private:
    1438             :     /** Returns a line property set helper according to the passed property mode. */
    1439             :     ScfPropSetHelper&   GetLineHelper( XclChPropertyMode ePropMode );
    1440             :     /** Returns an area property set helper according to the passed property mode. */
    1441             :     ScfPropSetHelper&   GetAreaHelper( XclChPropertyMode ePropMode );
    1442             :     /** Returns a gradient property set helper according to the passed property mode. */
    1443             :     ScfPropSetHelper&   GetGradientHelper( XclChPropertyMode ePropMode );
    1444             :     /** Returns a hatch property set helper according to the passed property mode. */
    1445             :     ScfPropSetHelper&   GetHatchHelper( XclChPropertyMode ePropMode );
    1446             : 
    1447             : private:
    1448             :     ScfPropSetHelper    maLineHlpCommon;    /// Properties for lines in common objects.
    1449             :     ScfPropSetHelper    maLineHlpLinear;    /// Properties for lines in linear series.
    1450             :     ScfPropSetHelper    maLineHlpFilled;    /// Properties for lines in filled series.
    1451             :     ScfPropSetHelper    maAreaHlpCommon;    /// Properties for areas in common objects.
    1452             :     ScfPropSetHelper    maAreaHlpFilled;    /// Properties for areas in filled series.
    1453             :     ScfPropSetHelper    maGradHlpCommon;    /// Properties for gradients in common objects.
    1454             :     ScfPropSetHelper    maGradHlpFilled;    /// Properties for gradients in filled series.
    1455             :     ScfPropSetHelper    maHatchHlpCommon;   /// Properties for hatches in common objects.
    1456             :     ScfPropSetHelper    maHatchHlpFilled;   /// Properties for hatches in filled series.
    1457             :     ScfPropSetHelper    maBitmapHlp;        /// Properties for bitmaps.
    1458             : };
    1459             : 
    1460             : // ============================================================================
    1461             : 
    1462             : /** Base struct for internal root data structs for import and export. */
    1463             : struct XclChRootData
    1464             : {
    1465             :     typedef boost::shared_ptr< XclChTypeInfoProvider >      XclChTypeProvRef;
    1466             :     typedef boost::shared_ptr< XclChFormatInfoProvider >    XclChFmtInfoProvRef;
    1467             :     typedef boost::shared_ptr< XclChObjectTable >           XclChObjectTableRef;
    1468             :     typedef ::std::map< XclChTextKey, XclChGetShapeFunc >   XclChGetShapeFuncMap;
    1469             : 
    1470             :     ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >
    1471             :                         mxChartDoc;             /// The chart document.
    1472             :     Rectangle           maChartRect;            /// Position and size of the chart shape.
    1473             :     XclChTypeProvRef    mxTypeInfoProv;         /// Provides info about chart types.
    1474             :     XclChFmtInfoProvRef mxFmtInfoProv;          /// Provides info about auto formatting.
    1475             :     XclChObjectTableRef mxLineDashTable;        /// Container for line dash styles.
    1476             :     XclChObjectTableRef mxGradientTable;        /// Container for gradient fill styles.
    1477             :     XclChObjectTableRef mxHatchTable;           /// Container for hatch fill styles.
    1478             :     XclChObjectTableRef mxBitmapTable;          /// Container for bitmap fill styles.
    1479             :     XclChGetShapeFuncMap maGetShapeFuncs;       /// Maps title shape getter functions.
    1480             :     sal_Int32           mnBorderGapX;           /// Border gap to chart space in 1/100mm.
    1481             :     sal_Int32           mnBorderGapY;           /// Border gap to chart space in 1/100mm.
    1482             :     double              mfUnitSizeX;            /// Size of a chart X unit (1/4000 of chart width) in 1/100 mm.
    1483             :     double              mfUnitSizeY;            /// Size of a chart Y unit (1/4000 of chart height) in 1/100 mm.
    1484             : 
    1485             :     explicit            XclChRootData();
    1486             :     virtual             ~XclChRootData();
    1487             : 
    1488             :     /** Starts the API chart document conversion. Must be called once before any API access. */
    1489             :     void                InitConversion(
    1490             :                             const XclRoot& rRoot,
    1491             :                             const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& rxChartDoc,
    1492             :                             const Rectangle& rChartRect );
    1493             :     /** Finishes the API chart document conversion. Must be called once before any API access. */
    1494             :     void                FinishConversion();
    1495             : 
    1496             :     /** Returns the drawing shape interface of the specified title object. */
    1497             :     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
    1498             :                         GetTitleShape( const XclChTextKey& rTitleKey ) const;
    1499             : };
    1500             : 
    1501             : // ============================================================================
    1502             : 
    1503             : #endif
    1504             : 
    1505             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10