LCOV - code coverage report
Current view: top level - sc/source/filter/inc - xlchart.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 11 12 91.7 %
Date: 2012-08-25 Functions: 8 9 88.9 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 12 22 54.5 %

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

Generated by: LCOV version 1.10