LCOV - code coverage report
Current view: top level - filter/source/graphicfilter/icgm - chart.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 10 0.0 %
Date: 2014-04-14 Functions: 0 3 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_CHART_HXX
      21             : #define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_CHART_HXX
      22             : 
      23             : /* FILE TYPE CONSTANTS: */
      24             : #define NOCHART         0       /* Undefined chart.         */
      25             : #define XYCHART         1       /* Standard XY chart.       */
      26             : #define PIECHART        21      /* Standard pie chart file. */
      27             : #define ORGCHART        26      /* Standard org chart file. */
      28             : #define TTLCHART        31      /* Title chart file.        */
      29             : #define BULCHART        32      /* Bullet chart file.       */
      30             : #define TABCHART        33      /* Table chart file.        */
      31             : #define DRWCHART        41      /* Chart with drawings only.*/
      32             : #define MLTCHART        42      /* Multiple chart file.     */
      33             : #define LASTCHART       45      /* The largest chart type.  */
      34             : #define SHWFILE         46      /* Slide show file.         */
      35             : #define SYMFILE         47      /* Symbol file.             */
      36             : /* the following were added although SPC doesn't have a #define */
      37             : /* for them...                                                  */
      38             : #define AUTOTTLCHT      95      /* Autobuild TTL CHT        */
      39             : #define AUTOBULCHT      96      /* Autobuild BUL CHT        */
      40             : #define AUTOTABCHT      97      /* Autobuild TAB CHT        */
      41             : 
      42             : /* FNC 10/11/93: for the chart stream, ALLCHART was added.  */
      43             : /* It is used specifically by PPT in its Template to let    */
      44             : /* us know that the template applies to all charts, not to  */
      45             : /* one specific chart type.                                 */
      46             : #define ALLCHART       127      /* Applies to all chart types */
      47             : #define ALLCHART_TPL   255      /* Applies to all chart types */
      48             : 
      49             : #define IOC_CHTTITLE        1       /* Title for any chart.                  */
      50             : #define IOC_CHTFOOTNOTE     2       /* ::com::sun::star::text::Footnote for any chart.               */
      51             : #define IOC_XYAXIS          3       /* Axis title for XY charts.             */
      52             : #define IOC_XYSERIESLEGEND  4       /* Series legend titles for XY charts.   */
      53             : #define IOC_PIETITLE        5       /* Title for pie charts.                 */
      54             : #define IOC_TABLEBODY       6       /* Table chart text element.             */
      55             : #define IOC_TITLEBODY       7       /* Title chart text element.             */
      56             : #define IOC_BULLETBODY      8       /* Bullet chart text element.            */
      57             : #define IOC_XYLEGENDTITLE   9       /* Legend title for XY charts.           */
      58             : #define IOC_PIELEGENDTITLE  10      /* Legend title for pie charts.          */
      59             : #define IOC_TABLEGENDTITLE  11      /* Legend title for table charts.        */
      60             : 
      61             : typedef struct TextAttribute
      62             : {
      63             :     sal_uInt16          nTextAttribCount;
      64             :     sal_Int8            nTextColorIndex;
      65             :     sal_Int8            nTextColorRed;
      66             :     sal_Int8            nTextColorGreen;
      67             :     sal_Int8            nTextColorBlue;
      68             :     sal_Int8            nShadowColorIndex;
      69             :     sal_Int8            nShadowColorRed;
      70             :     sal_Int8            nShadowColorGreen;
      71             :     sal_Int8            nShadowColorBlue;
      72             :     float           nTextAttribSize;
      73             :     sal_uInt16          nTextAttribBits;
      74             :     sal_Int8            nTextFontType;      // font identifiers
      75             :     sal_Int8            nTextCharPage;
      76             :     sal_uInt16          nTextFontFamily;
      77             :     sal_Int8            nTextFontMemberID;
      78             :     sal_Int8            nTextFontVendorID;
      79             :     TextAttribute*  pNextAttribute;     // zero or pointer to next TextAttribute
      80             : } TextAttribute;
      81             : 
      82             : typedef struct TextEntry
      83             : {
      84             :     sal_uInt16          nTypeOfText;
      85             :     sal_uInt16          nRowOrLineNum;
      86             :     sal_uInt16          nColumnNum;
      87             :     sal_uInt16          nZoneSize;          // textzone attributes
      88             :     sal_uInt16          nLineType;
      89             :     sal_uInt16          nAttributes;
      90             :     char*           pText;              // null terminated text
      91             :     TextAttribute*  pAttribute;
      92             : } TextEntry;
      93             : 
      94             : struct ZoneOption
      95             : {
      96             :     char            nOverTitle;
      97             :     char            nOverBody;
      98             :     char            nOverFoot;
      99             :     char            nFStyle_Title;
     100             :     char            nFStyle_Body;
     101             :     char            nFStyle_Foot;
     102             :     char            nFOutc_Title;
     103             :     char            nFOutc_Body;
     104             :     char            nFOutc_Foot;
     105             :     char            nFFillc_Title;
     106             :     char            nFFillc_Body;
     107             :     char            nFFillc_Foot;
     108           0 :     ZoneOption()
     109             :         : nOverTitle(0)
     110             :         , nOverBody(0)
     111             :         , nOverFoot(0)
     112             :         , nFStyle_Title(0)
     113             :         , nFStyle_Body(0)
     114             :         , nFStyle_Foot(0)
     115             :         , nFOutc_Title(0)
     116             :         , nFOutc_Body(0)
     117             :         , nFOutc_Foot(0)
     118             :         , nFFillc_Title(0)
     119             :         , nFFillc_Body(0)
     120           0 :         , nFFillc_Foot(0)
     121             :     {
     122           0 :     }
     123             : };
     124             : 
     125             : struct BulletOption
     126             : {
     127             :     char            nBType;
     128             :     char            nBSize;
     129             :     char            nBColor;
     130             :     sal_Int16       nBStart;
     131             :     double          nTMargin;
     132             :     double          nBSpace;
     133             :     char            nCPlace;
     134           0 :     BulletOption()
     135             :         : nBType(0)
     136             :         , nBSize(0)
     137             :         , nBColor(0)
     138             :         , nBStart(0)
     139             :         , nTMargin(0)
     140             :         , nBSpace(0)
     141           0 :         , nCPlace(0)
     142             :     {
     143           0 :     }
     144             : };
     145             : 
     146             : typedef struct BulDef
     147             : {
     148             :     char            btype;
     149             :     char            bsize;
     150             :     char            bcolor;
     151             :     char            bnumber;
     152             : } BulDef;
     153             : 
     154             : typedef struct BulletLines
     155             : {
     156             :     BulDef          nBulDef[ 48 ];
     157             : } BulletLines;
     158             : 
     159             : struct IntSettings
     160             : {
     161             :     sal_uInt16          nCountry;
     162             :     sal_uInt16          nDateFormat;
     163             :     sal_uInt16          nDateSep;
     164             :     sal_uInt16          nTimeFormat;
     165             :     sal_uInt16          nTimeSep;
     166             :     sal_uInt16          nNumSeps;
     167             :     sal_uInt16          nCurrencyFormat;
     168             :     char            nCurrencySymbol[ 5 ];
     169           0 :     IntSettings()
     170             :         : nCountry(0)
     171             :         , nDateFormat(0)
     172             :         , nDateSep(0)
     173             :         , nTimeFormat(0)
     174             :         , nTimeSep(0)
     175             :         , nNumSeps(0)
     176           0 :         , nCurrencyFormat(0)
     177             :     {
     178           0 :         memset (nCurrencySymbol, 0, sizeof(nCurrencySymbol));
     179           0 :     }
     180             : };
     181             : 
     182             : typedef struct PageOrientDim
     183             : {
     184             :     char            nOrientation;
     185             :     char            nDimension;
     186             :     float           nPageX;
     187             :     float           nPageY;
     188             : } PageOrientDim;
     189             : 
     190             : typedef struct DataNode
     191             : {
     192             :     sal_Int16           nBoxX1;
     193             :     sal_Int16           nBoxY1;
     194             :     sal_Int16           nBoxX2;
     195             :     sal_Int16           nBoxY2;
     196             :     sal_Int8            nZoneEnum;
     197             : } DataNode;
     198             : 
     199             : typedef struct ChartZone
     200             : {
     201             :     sal_Int16           nMinX;
     202             :     sal_Int16           nMinY;
     203             :     sal_Int16           nMaxX;
     204             :     sal_Int16           nMaxY;
     205             :     char            nUserDef;
     206             :     char            nPad1;
     207             : } ChartZone;
     208             : 
     209             : class CGM;
     210             : class CGMImpressOutAct;
     211             : class CGMChart
     212             : {
     213             :     friend class CGM;
     214             :     friend class CGMImpressOutAct;
     215             : 
     216             :     protected:
     217             :         CGM*                    mpCGM;
     218             :         sal_Int8                mnCurrentFileType;
     219             :         ::std::vector< TextEntry* > maTextEntryList;
     220             :         DataNode                mDataNode[ 7 ];
     221             :         ChartZone               mChartZone;
     222             :         PageOrientDim           mPageOrientDim;
     223             :         BulletOption            mBulletOption;
     224             :         BulletLines             mBulletLines;
     225             :         ZoneOption              mZoneOption;
     226             :         IntSettings             mIntSettings;
     227             : 
     228             :     public:
     229             :                                 CGMChart( CGM& rCGM );
     230             :                                 ~CGMChart();
     231             : 
     232             :         void                    DeleteTextEntry( TextEntry* );
     233             :         void                    InsertTextEntry( TextEntry* );
     234             : 
     235             :         void                    ResetAnnotation();
     236             :         sal_Bool                    IsAnnotation();
     237             : };
     238             : 
     239             : #endif
     240             : 
     241             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10