LCOV - code coverage report
Current view: top level - filter/source/graphicfilter/icgm - cgm.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 2 2 100.0 %
Date: 2015-06-13 12:38:46 Functions: 2 2 100.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_CGM_HXX
      21             : #define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_CGM_HXX
      22             : 
      23             : #include <com/sun/star/frame/XModel.hpp>
      24             : 
      25             : #define CGM_IMPORT_CGM      0x00000001
      26             : #define CGM_EXPORT_IMPRESS  0x00000100
      27             : #define CGM_EXPORT_META     0x00000200
      28             : 
      29             : #include <rtl/ustring.hxx>
      30             : #include <vector>
      31             : #include <vcl/vclptr.hxx>
      32             : #include "cgmtypes.hxx"
      33             : 
      34             : class   Graphic;
      35             : class   SvStream;
      36             : class   CGMChart;
      37             : class   CGMBitmap;
      38             : class   CGMOutAct;
      39             : class   CGMElements;
      40             : class   GDIMetaFile;
      41             : class   VirtualDevice;
      42             : 
      43             : class CGM
      44             : {
      45             :         friend class CGMChart;
      46             :         friend class CGMBitmap;
      47             :         friend class CGMElements;
      48             :         friend class CGMOutAct;
      49             :         friend class CGMImpressOutAct;
      50             : 
      51             :         double              mnOutdx;                // Ausgabe Groesse in 1/100TH mm
      52             :         double              mnOutdy;                // auf das gemappt wird
      53             :         double              mnVDCXadd;
      54             :         double              mnVDCYadd;
      55             :         double              mnVDCXmul;
      56             :         double              mnVDCYmul;
      57             :         double              mnVDCdx;
      58             :         double              mnVDCdy;
      59             :         double              mnXFraction;
      60             :         double              mnYFraction;
      61             :         bool                mbAngReverse;           // AngularDirection
      62             : 
      63             :         Graphic*            mpGraphic;
      64             : 
      65             :         bool                mbStatus;
      66             :         bool                mbMetaFile;
      67             :         bool                mbIsFinished;
      68             :         bool                mbPicture;
      69             :         bool                mbPictureBody;
      70             :         bool                mbFigure;
      71             :         bool                mbFirstOutPut;
      72             :         sal_uInt32              mnAct4PostReset;
      73             :         CGMBitmap*          mpBitmapInUse;
      74             :         CGMChart*           mpChart;                // if sal_True->"SHWSLIDEREC"
      75             :                                                     //  otherwise "BEGINPIC" commands
      76             :                                                     // controls page inserting
      77             :         CGMElements*        pElement;
      78             :         CGMElements*        pCopyOfE;
      79             :         CGMOutAct*          mpOutAct;
      80             :         ::std::vector< sal_uInt8 * > maDefRepList;
      81             :         ::std::vector< sal_uInt32  > maDefRepSizeList;
      82             : 
      83             :         sal_uInt8*              mpSource;         // start of source buffer that is not increased
      84             :                                                   // ( instead use mnParaCount to index )
      85             :         sal_uInt8*              mpEndValidSource; // end position in source buffer of last valid data
      86             :         sal_uInt32              mnParaSize;     // actual parameter size which has been done so far
      87             :         sal_uInt32              mnActCount;     // increased by each action
      88             :         sal_uInt8*              mpBuf;          // source stream operation -> then this is allocated for
      89             :                                             //                            the temp input buffer
      90             : 
      91             :         sal_uInt32              mnMode;         // source description
      92             :         sal_uInt32              mnEscape;
      93             :         sal_uInt32              mnElementClass;
      94             :         sal_uInt32              mnElementID;
      95             :         sal_uInt32              mnElementSize;  // full parameter size for the latest action
      96             : 
      97             :         sal_uInt32          ImplGetUI16( sal_uInt32 nAlign = 0 );
      98             :         static sal_uInt8    ImplGetByte( sal_uInt32 nSource, sal_uInt32 nPrecision );
      99             :         sal_Int32           ImplGetI( sal_uInt32 nPrecision );
     100             :         sal_uInt32          ImplGetUI( sal_uInt32 nPrecision );
     101             :         static void         ImplGetSwitch4( sal_uInt8* pSource, sal_uInt8* pDest );
     102             :         static void         ImplGetSwitch8( sal_uInt8* pSource, sal_uInt8* pDest );
     103             :         double              ImplGetFloat( RealPrecision, sal_uInt32 nRealSize );
     104             :         sal_uInt32          ImplGetBitmapColor( bool bDirectColor = false );
     105             :         void                ImplSetMapMode();
     106             :         void                ImplMapDouble( double& );
     107             :         void                ImplMapX( double& );
     108             :         void                ImplMapY( double& );
     109             :         void                ImplMapPoint( FloatPoint& );
     110             :         inline double       ImplGetIY();
     111             :         inline double       ImplGetFY();
     112             :         inline double       ImplGetIX();
     113             :         inline double       ImplGetFX();
     114             :         sal_uInt32              ImplGetPointSize();
     115             :         void                ImplGetPoint( FloatPoint& rFloatPoint, bool bMap = false );
     116             :         void                ImplGetRectangle( FloatRect&, bool bMap = false );
     117             :         void                ImplGetRectangleNS( FloatRect& );
     118             :         void                ImplGetVector( double* );
     119             :         static double       ImplGetOrientation( FloatPoint& rCenter, FloatPoint& rPoint );
     120             :         static void         ImplSwitchStartEndAngle( double& rStartAngle, double& rEndAngle );
     121             :         bool                ImplGetEllipse( FloatPoint& rCenter, FloatPoint& rRadius, double& rOrientation );
     122             : 
     123             :         void                ImplDefaultReplacement();
     124             :         void                ImplDoClass();
     125             :         void                ImplDoClass0();
     126             :         void                ImplDoClass1();
     127             :         void                ImplDoClass2();
     128             :         void                ImplDoClass3();
     129             :         void                ImplDoClass4();
     130             :         void                ImplDoClass5();
     131             :         void                ImplDoClass6();
     132             :         void                ImplDoClass7();
     133             :         void                ImplDoClass8();
     134             :         void                ImplDoClass9();
     135             :         void                ImplDoClass15();
     136             : 
     137             :     public:
     138             : 
     139             :                             ~CGM();
     140             : 
     141             :                             CGM( sal_uInt32 nMode, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > const & rModel );
     142             :         GDIMetaFile*        mpGDIMetaFile;
     143             :         sal_uInt32              GetBackGroundColor();
     144         244 :         bool                IsValid() const { return mbStatus; };
     145         241 :         bool                IsFinished() const { return mbIsFinished; };
     146             :         bool                Write( SvStream& rIStm );
     147             : 
     148             :         friend SvStream& ReadCGM( SvStream& rOStm, CGM& rCGM );
     149             : 
     150             : };
     151             : #endif
     152             : 
     153             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11