LCOV - code coverage report
Current view: top level - filter/source/graphicfilter/icgm - chart.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 23 0.0 %
Date: 2014-11-03 Functions: 0 8 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             : struct BulDef
     147             : {
     148             :     char            btype;
     149             :     char            bsize;
     150             :     char            bcolor;
     151             :     char            bnumber;
     152           0 :     BulDef()
     153             :         : btype(0)
     154             :         , bsize(0)
     155             :         , bcolor(0)
     156           0 :         , bnumber(0)
     157             :     {
     158           0 :     }
     159             : };
     160             : 
     161           0 : typedef struct BulletLines
     162             : {
     163             :     BulDef          nBulDef[ 48 ];
     164             : } BulletLines;
     165             : 
     166             : struct IntSettings
     167             : {
     168             :     sal_uInt16          nCountry;
     169             :     sal_uInt16          nDateFormat;
     170             :     sal_uInt16          nDateSep;
     171             :     sal_uInt16          nTimeFormat;
     172             :     sal_uInt16          nTimeSep;
     173             :     sal_uInt16          nNumSeps;
     174             :     sal_uInt16          nCurrencyFormat;
     175             :     char            nCurrencySymbol[ 5 ];
     176           0 :     IntSettings()
     177             :         : nCountry(0)
     178             :         , nDateFormat(0)
     179             :         , nDateSep(0)
     180             :         , nTimeFormat(0)
     181             :         , nTimeSep(0)
     182             :         , nNumSeps(0)
     183           0 :         , nCurrencyFormat(0)
     184             :     {
     185           0 :         memset (nCurrencySymbol, 0, sizeof(nCurrencySymbol));
     186           0 :     }
     187             : };
     188             : 
     189             : struct PageOrientDim
     190             : {
     191             :     char            nOrientation;
     192             :     char            nDimension;
     193             :     float           nPageX;
     194             :     float           nPageY;
     195           0 :     PageOrientDim()
     196             :         : nOrientation(0)
     197             :         , nDimension(0)
     198             :         , nPageX(0.0)
     199           0 :         , nPageY(0.0)
     200             :     {
     201           0 :     }
     202             : };
     203             : 
     204             : struct DataNode
     205             : {
     206             :     sal_Int16           nBoxX1;
     207             :     sal_Int16           nBoxY1;
     208             :     sal_Int16           nBoxX2;
     209             :     sal_Int16           nBoxY2;
     210             :     sal_Int8            nZoneEnum;
     211           0 :     DataNode()
     212             :         : nBoxX1(0)
     213             :         , nBoxY1(0)
     214             :         , nBoxX2(0)
     215             :         , nBoxY2(0)
     216           0 :         , nZoneEnum(0)
     217             :     {
     218           0 :     }
     219             : };
     220             : 
     221             : struct ChartZone
     222             : {
     223             :     sal_Int16           nMinX;
     224             :     sal_Int16           nMinY;
     225             :     sal_Int16           nMaxX;
     226             :     sal_Int16           nMaxY;
     227             :     char            nUserDef;
     228             :     char            nPad1;
     229           0 :     ChartZone()
     230             :         : nMinX(0)
     231             :         , nMinY(0)
     232             :         , nMaxX(0)
     233             :         , nMaxY(0)
     234             :         , nUserDef(0)
     235           0 :         , nPad1(0)
     236             :     {
     237           0 :     }
     238             : };
     239             : 
     240             : class CGM;
     241             : class CGMImpressOutAct;
     242             : class CGMChart
     243             : {
     244             :     friend class CGM;
     245             :     friend class CGMImpressOutAct;
     246             : 
     247             :     protected:
     248             :         CGM*                    mpCGM;
     249             :         sal_Int8                mnCurrentFileType;
     250             :         ::std::vector< TextEntry* > maTextEntryList;
     251             :         DataNode                mDataNode[ 7 ];
     252             :         ChartZone               mChartZone;
     253             :         PageOrientDim           mPageOrientDim;
     254             :         BulletOption            mBulletOption;
     255             :         BulletLines             mBulletLines;
     256             :         ZoneOption              mZoneOption;
     257             :         IntSettings             mIntSettings;
     258             : 
     259             :     public:
     260             :                                 CGMChart( CGM& rCGM );
     261             :                                 ~CGMChart();
     262             : 
     263             :         void                    DeleteTextEntry( TextEntry* );
     264             :         void                    InsertTextEntry( TextEntry* );
     265             : 
     266             :         void                    ResetAnnotation();
     267             :         bool                    IsAnnotation();
     268             : };
     269             : 
     270             : #endif
     271             : 
     272             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10