LCOV - code coverage report
Current view: top level - filter/source/graphicfilter/icgm - cgm.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 2 0.0 %
Date: 2012-08-25 Functions: 0 2 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           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 CGM_HXX_
      30                 :            : #define CGM_HXX_
      31                 :            : 
      32                 :            : #include <com/sun/star/frame/XModel.hpp>
      33                 :            : 
      34                 :            : // ---------------------------------------------------------------
      35                 :            : #undef CGM_USER_BREAKPOINT
      36                 :            : 
      37                 :            : #define CGM_IMPORT_CGM      0x00000001
      38                 :            : 
      39                 :            : #define CGM_EXPORT_IMPRESS  0x00000100
      40                 :            : #define CGM_EXPORT_META     0x00000200
      41                 :            : 
      42                 :            : // ---------------------------------------------------------------
      43                 :            : 
      44                 :            : #include <tools/solar.h>
      45                 :            : #include <rtl/ustring.hxx>
      46                 :            : #include <vector>
      47                 :            : #include "cgmtypes.hxx"
      48                 :            : 
      49                 :            : // ---------------------------------------------------------------
      50                 :            : 
      51                 :            : class   Graphic;
      52                 :            : class   SvStream;
      53                 :            : class   CGMChart;
      54                 :            : class   CGMBitmap;
      55                 :            : class   CGMOutAct;
      56                 :            : class   CGMElements;
      57                 :            : class   GDIMetaFile;
      58                 :            : class   VirtualDevice;
      59                 :            : 
      60                 :            : class CGM
      61                 :            : {
      62                 :            :         friend class CGMChart;
      63                 :            :         friend class CGMBitmap;
      64                 :            :         friend class CGMElements;
      65                 :            :         friend class CGMOutAct;
      66                 :            :         friend class CGMImpressOutAct;
      67                 :            : 
      68                 :            :         double              mnOutdx;                // Ausgabe Groesse in 1/100TH mm
      69                 :            :         double              mnOutdy;                // auf das gemappt wird
      70                 :            :         double              mnVDCXadd;
      71                 :            :         double              mnVDCYadd;
      72                 :            :         double              mnVDCXmul;
      73                 :            :         double              mnVDCYmul;
      74                 :            :         double              mnVDCdx;
      75                 :            :         double              mnVDCdy;
      76                 :            :         double              mnXFraction;
      77                 :            :         double              mnYFraction;
      78                 :            :         sal_Bool                mbAngReverse;           // AngularDirection
      79                 :            : 
      80                 :            :         Graphic*            mpGraphic;              // ifdef CGM_EXPORT_META
      81                 :            : 
      82                 :            :         sal_Bool                mbStatus;
      83                 :            :         sal_Bool                mbMetaFile;
      84                 :            :         sal_Bool                mbIsFinished;
      85                 :            :         sal_Bool                mbPicture;
      86                 :            :         sal_Bool                mbPictureBody;
      87                 :            :         sal_Bool                mbFigure;
      88                 :            :         sal_Bool                mbFirstOutPut;
      89                 :            :         sal_uInt32              mnAct4PostReset;
      90                 :            :         CGMBitmap*          mpBitmapInUse;
      91                 :            :         CGMChart*           mpChart;                // if sal_True->"SHWSLIDEREC"
      92                 :            :                                                     //  otherwise "BEGINPIC" commands
      93                 :            :                                                     // controlls page inserting
      94                 :            :         CGMElements*        pElement;
      95                 :            :         CGMElements*        pCopyOfE;
      96                 :            :         CGMOutAct*          mpOutAct;
      97                 :            :         ::std::vector< sal_uInt8 * > maDefRepList;
      98                 :            :         ::std::vector< sal_uInt32  > maDefRepSizeList;
      99                 :            : 
     100                 :            :         sal_uInt8*              mpSource;       // source buffer that is not increased
     101                 :            :                                             // ( instead use mnParaCount to index )
     102                 :            :         sal_uInt32              mnParaSize;     // actual parameter size which has been done so far
     103                 :            :         sal_uInt32              mnActCount;     // increased by each action
     104                 :            :         sal_uInt8*              mpBuf;          // source stream operation -> then this is allocated for
     105                 :            :                                             //                            the temp input buffer
     106                 :            : 
     107                 :            :         sal_uInt32              mnMode;         // source description
     108                 :            :         sal_uInt32              mnEscape;       //
     109                 :            :         sal_uInt32              mnElementClass; //
     110                 :            :         sal_uInt32              mnElementID;    //
     111                 :            :         sal_uInt32              mnElementSize;  // full parameter size for the latest action
     112                 :            : 
     113                 :            :         void                ImplCGMInit();
     114                 :            :         sal_uInt32          ImplGetUI16( sal_uInt32 nAlign = 0 );
     115                 :            :         sal_uInt8           ImplGetByte( sal_uInt32 nSource, sal_uInt32 nPrecision );
     116                 :            :         long                ImplGetI( sal_uInt32 nPrecision );
     117                 :            :         sal_uInt32          ImplGetUI( sal_uInt32 nPrecision );
     118                 :            :         void                ImplGetSwitch4( sal_uInt8* pSource, sal_uInt8* pDest );
     119                 :            :         void                ImplGetSwitch8( sal_uInt8* pSource, sal_uInt8* pDest );
     120                 :            :         double              ImplGetFloat( RealPrecision, sal_uInt32 nRealSize );
     121                 :            :         sal_uInt32          ImplGetBitmapColor( sal_Bool bDirectColor = sal_False );
     122                 :            :         void                ImplSetMapMode();
     123                 :            :         void                ImplMapDouble( double& );
     124                 :            :         void                ImplMapX( double& );
     125                 :            :         void                ImplMapY( double& );
     126                 :            :         void                ImplMapPoint( FloatPoint& );
     127                 :            :         inline double       ImplGetIY();
     128                 :            :         inline double       ImplGetFY();
     129                 :            :         inline double       ImplGetIX();
     130                 :            :         inline double       ImplGetFX();
     131                 :            :         sal_uInt32              ImplGetPointSize();
     132                 :            :         void                ImplGetPoint( FloatPoint& rFloatPoint, sal_Bool bMap = sal_False );
     133                 :            :         void                ImplGetRectangle( FloatRect&, sal_Bool bMap = sal_False );
     134                 :            :         void                ImplGetRectangleNS( FloatRect& );
     135                 :            :         void                ImplGetVector( double* );
     136                 :            :         double              ImplGetOrientation( FloatPoint& rCenter, FloatPoint& rPoint );
     137                 :            :         void                ImplSwitchStartEndAngle( double& rStartAngle, double& rEndAngle );
     138                 :            :         sal_Bool                ImplGetEllipse( FloatPoint& rCenter, FloatPoint& rRadius, double& rOrientation );
     139                 :            : 
     140                 :            :         void                ImplDefaultReplacement();
     141                 :            :         void                ImplDoClass();
     142                 :            :         void                ImplDoClass0();
     143                 :            :         void                ImplDoClass1();
     144                 :            :         void                ImplDoClass2();
     145                 :            :         void                ImplDoClass3();
     146                 :            :         void                ImplDoClass4();
     147                 :            :         void                ImplDoClass5();
     148                 :            :         void                ImplDoClass6();
     149                 :            :         void                ImplDoClass7();
     150                 :            :         void                ImplDoClass8();
     151                 :            :         void                ImplDoClass9();
     152                 :            :         void                ImplDoClass15();
     153                 :            : 
     154                 :            :     public:
     155                 :            : 
     156                 :            :                             ~CGM();
     157                 :            : 
     158                 :            :                             CGM( sal_uInt32 nMode, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rModel );
     159                 :            : #ifdef CGM_EXPORT_META
     160                 :            :         VirtualDevice*      mpVirDev;
     161                 :            :         GDIMetaFile*        mpGDIMetaFile;
     162                 :            : #endif
     163                 :            :         sal_uInt32              GetBackGroundColor();
     164                 :          0 :         sal_Bool                IsValid() const { return mbStatus; };
     165                 :          0 :         sal_Bool                IsFinished() const { return mbIsFinished; };
     166                 :            :         sal_Bool                Write( SvStream& rIStm );
     167                 :            : 
     168                 :            :         friend SvStream& operator>>( SvStream& rOStm, CGM& rCGM );
     169                 :            : 
     170                 :            : };
     171                 :            : #endif
     172                 :            : 
     173                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10