LCOV - code coverage report
Current view: top level - filter/source/graphicfilter/icgm - class2.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 121 0.0 %
Date: 2012-08-25 Functions: 0 1 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                 :            : 
      30                 :            : #include <main.hxx>
      31                 :            : 
      32                 :            : // ---------------------------------------------------------------
      33                 :            : 
      34                 :          0 : void CGM::ImplDoClass2()
      35                 :            : {
      36                 :            :     sal_uInt32  nUInteger;
      37                 :          0 :     switch ( mnElementID )
      38                 :            :     {
      39                 :            :         case 0x01 : /*Scaling Mode*/
      40                 :            :         {
      41                 :          0 :             if ( mnElementSize )    // HACK (NASA.CGM)
      42                 :            :             {
      43                 :          0 :                 switch( ImplGetUI16() )
      44                 :            :                 {
      45                 :          0 :                     case 0 : pElement->eScalingMode = SM_ABSTRACT; break;
      46                 :          0 :                     case 1 : pElement->eScalingMode = SM_METRIC; break;
      47                 :          0 :                     default : mbStatus = sal_False; break;
      48                 :            :                 }
      49                 :          0 :                 pElement->nScalingFactor = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
      50                 :          0 :                 ImplSetMapMode();
      51                 :            :             }
      52                 :            :         }
      53                 :          0 :         break;
      54                 :            :         case 0x02 : /*Color Selection Mode*/
      55                 :            :         {
      56                 :          0 :             nUInteger = ImplGetUI16();
      57                 :          0 :             switch( nUInteger )
      58                 :            :             {
      59                 :          0 :                 case 0 : pElement->eColorSelectionMode = CSM_INDEXED; break;
      60                 :          0 :                 case 1 : pElement->eColorSelectionMode = CSM_DIRECT; break;
      61                 :          0 :                 default : mbStatus = sal_False; break;
      62                 :            :             }
      63                 :            :         }
      64                 :          0 :         break;
      65                 :            :         case 0x03 : /*Line Width Specification Mode*/
      66                 :            :         {
      67                 :          0 :             nUInteger = ImplGetUI16();
      68                 :          0 :             switch( nUInteger )
      69                 :            :             {
      70                 :          0 :                 case 0 : pElement->eLineWidthSpecMode = SM_ABSOLUTE; break;
      71                 :          0 :                 case 1 : pElement->eLineWidthSpecMode = SM_SCALED; break;
      72                 :          0 :                 default : mbStatus = sal_False; break;
      73                 :            :             }
      74                 :            :         }
      75                 :          0 :         break;
      76                 :            :         case 0x04 : /*Marker Size Specification Mode*/
      77                 :            :         {
      78                 :          0 :             nUInteger = ImplGetUI16();
      79                 :          0 :             switch( nUInteger )
      80                 :            :             {
      81                 :          0 :                 case 0 : pElement->eMarkerSizeSpecMode = SM_ABSOLUTE; break;
      82                 :          0 :                 case 1 : pElement->eMarkerSizeSpecMode = SM_SCALED; break;
      83                 :          0 :                 default : mbStatus = sal_False; break;
      84                 :            :             }
      85                 :            :         }
      86                 :          0 :         break;
      87                 :            :         case 0x05 : /*Edge Width Specification Mode*/
      88                 :            :         {
      89                 :          0 :             nUInteger = ImplGetUI16();
      90                 :          0 :             switch( nUInteger )
      91                 :            :             {
      92                 :          0 :                 case 0 : pElement->eEdgeWidthSpecMode = SM_ABSOLUTE; break;
      93                 :          0 :                 case 1 : pElement->eEdgeWidthSpecMode = SM_SCALED; break;
      94                 :          0 :                 default : mbStatus = sal_False; break;
      95                 :            :             }
      96                 :            :         }
      97                 :          0 :         break;
      98                 :            :         case 0x06 : /*VDC Extent*/
      99                 :            :         {
     100                 :          0 :             ImplGetRectangleNS( pElement->aVDCExtent );
     101                 :          0 :             ImplSetMapMode();
     102                 :            :         }
     103                 :          0 :         break;
     104                 :            :         case 0x07 : /*Background Color*/
     105                 :          0 :             pElement->nBackGroundColor = ImplGetBitmapColor( sal_True );
     106                 :          0 :         break;
     107                 :            :         case 0x08 : /*Device Viewport*/
     108                 :            :         {
     109                 :          0 :             if ( pElement->eVDCType == VDC_INTEGER )
     110                 :          0 :                 ImplGetRectangle( pElement->aDeviceViewPort );
     111                 :          0 :                 ImplSetMapMode();
     112                 :            :         }
     113                 :          0 :         break;
     114                 :            :         case 0x09 : /*Device Viewport Specification Mode*/
     115                 :            :         {
     116                 :          0 :             nUInteger = ImplGetUI16( 8 );
     117                 :          0 :             switch( nUInteger )
     118                 :            :             {
     119                 :          0 :                 case 0 : pElement->eDeviceViewPortMode = DVPM_FRACTION; break;
     120                 :          0 :                 case 1 : pElement->eDeviceViewPortMode = DVPM_METRIC; break;
     121                 :          0 :                 case 2 : pElement->eDeviceViewPortMode = DVPM_DEVICE; break;
     122                 :          0 :                 default : mbStatus = sal_False; break;
     123                 :            :             }
     124                 :          0 :             pElement->nDeviceViewPortScale = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
     125                 :          0 :             ImplSetMapMode();
     126                 :            :         }
     127                 :          0 :         break;
     128                 :            :         case 0x0a : /*Device Viewport Mapping*/
     129                 :            :         {
     130                 :          0 :             switch( ImplGetUI16() )
     131                 :            :             {
     132                 :          0 :                 case 0 : pElement->eDeviceViewPortMap = DVPM_NOT_FORCED; break;
     133                 :          0 :                 case 1 : pElement->eDeviceViewPortMap = DVPM_FORCED; break;
     134                 :          0 :                 default : mbStatus = sal_False; break;
     135                 :            :             }
     136                 :          0 :             switch( ImplGetUI16() )
     137                 :            :             {
     138                 :          0 :                 case 0 : pElement->eDeviceViewPortMapH = DVPMH_LEFT; break;
     139                 :          0 :                 case 1 : pElement->eDeviceViewPortMapH = DVPMH_CENTER; break;
     140                 :          0 :                 case 2 : pElement->eDeviceViewPortMapH = CVPMH_RIGHT; break;
     141                 :          0 :                 default : mbStatus = sal_False; break;
     142                 :            :             }
     143                 :          0 :             switch( ImplGetUI16() )
     144                 :            :             {
     145                 :          0 :                 case 0 : pElement->eDeviceViewPortMapV = DVPMV_BOTTOM; break;
     146                 :          0 :                 case 1 : pElement->eDeviceViewPortMapV = DVPMV_CENTER; break;
     147                 :          0 :                 case 2 : pElement->eDeviceViewPortMapV = DVPMV_TOP; break;
     148                 :          0 :                 default : mbStatus = sal_False; break;
     149                 :            :             }
     150                 :          0 :             ImplSetMapMode();
     151                 :            :         }
     152                 :          0 :         break;
     153                 :            :         case 0x0b : /*Line Representation*/
     154                 :            :         {
     155                 :          0 :             LineBundle  aTempLineBundle;
     156                 :          0 :             aTempLineBundle.SetIndex( ImplGetI( pElement->nIndexPrecision ) );
     157                 :          0 :             aTempLineBundle.eLineType = (LineType)ImplGetI( pElement->nIndexPrecision );
     158                 :          0 :             aTempLineBundle.nLineWidth = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
     159                 :          0 :             aTempLineBundle.SetColor( ImplGetBitmapColor() );
     160                 :          0 :             pElement->InsertBundle( pElement->aLineList, aTempLineBundle );
     161                 :            :         }
     162                 :          0 :         break;
     163                 :            :         case 0x0c : /*Marker Representation*/
     164                 :            :         {
     165                 :          0 :             MarkerBundle aTempMarkerBundle;
     166                 :          0 :             aTempMarkerBundle.SetIndex( ImplGetI( pElement->nIndexPrecision ) );
     167                 :          0 :             aTempMarkerBundle.eMarkerType = (MarkerType)ImplGetI( pElement->nIndexPrecision );
     168                 :          0 :             aTempMarkerBundle.nMarkerSize = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
     169                 :          0 :             aTempMarkerBundle.SetColor( ImplGetBitmapColor() );
     170                 :          0 :             pElement->InsertBundle( pElement->aMarkerList, aTempMarkerBundle );
     171                 :            :         }
     172                 :          0 :         break;
     173                 :            :         case 0x0d : /*Text Representation*/
     174                 :            :         {
     175                 :          0 :             TextBundle aTempTextBundle;
     176                 :          0 :             aTempTextBundle.SetIndex( ImplGetI( pElement->nIndexPrecision ) );
     177                 :          0 :             aTempTextBundle.nTextFontIndex = ImplGetI( pElement->nIndexPrecision );
     178                 :          0 :             aTempTextBundle.eTextPrecision = (TextPrecision)ImplGetI( pElement->nIndexPrecision );
     179                 :          0 :             aTempTextBundle.nCharacterSpacing = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
     180                 :          0 :             aTempTextBundle.nCharacterExpansion = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
     181                 :          0 :             aTempTextBundle.SetColor( ImplGetBitmapColor() );
     182                 :          0 :             pElement->InsertBundle( pElement->aTextList, aTempTextBundle );
     183                 :            :         }
     184                 :          0 :         break;
     185                 :            :         case 0x0e : /*Fill Representation*/
     186                 :            :         {
     187                 :          0 :             FillBundle aTempFillBundle;
     188                 :          0 :             aTempFillBundle.SetIndex( ImplGetI( pElement->nIndexPrecision ) );
     189                 :          0 :             aTempFillBundle.eFillInteriorStyle = (FillInteriorStyle)ImplGetI( pElement->nIndexPrecision );
     190                 :          0 :             aTempFillBundle.SetColor( ImplGetBitmapColor() );
     191                 :          0 :             aTempFillBundle.nFillPatternIndex = ImplGetI( pElement->nIndexPrecision );
     192                 :          0 :             aTempFillBundle.nFillHatchIndex = ImplGetI( pElement->nIndexPrecision );
     193                 :          0 :             pElement->InsertBundle( pElement->aFillList, aTempFillBundle );
     194                 :            :         }
     195                 :          0 :         break;
     196                 :            :         case 0x0f : /*Edge Representation*/
     197                 :            :         {
     198                 :          0 :             EdgeBundle aTempEdgeBundle;
     199                 :          0 :             aTempEdgeBundle.SetIndex( ImplGetI( pElement->nIndexPrecision ) );
     200                 :          0 :             aTempEdgeBundle.eEdgeType = (EdgeType)ImplGetI( pElement->nIndexPrecision );
     201                 :          0 :             aTempEdgeBundle.nEdgeWidth = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
     202                 :          0 :             aTempEdgeBundle.SetColor( ImplGetBitmapColor() );
     203                 :          0 :             pElement->InsertBundle( pElement->aEdgeList, aTempEdgeBundle );
     204                 :            :         }
     205                 :          0 :         break;
     206                 :          0 :         case 0x10 : /*Interior Style Specification Mode */break;    // NS
     207                 :          0 :         case 0x11 : /*Line and Edge Type Definition */break;
     208                 :          0 :         case 0x12 : /*Hatch Style Definition */break;               // NS
     209                 :          0 :         case 0x13 : /*Geometric Pattern Definition */break;         // NS
     210                 :          0 :         case 0xff : /*inquire VDC EXTENT */break;
     211                 :          0 :         case 0xfe : /*inquire Background Color */break;
     212                 :          0 :         case 0xfd : /*inquire Device Viewport */break;
     213                 :          0 :         case 0xfc : /*set Font Selection Mode */break;
     214                 :          0 :         case 0xfb : /*inquire Color Selection Mode */break;
     215                 :          0 :         case 0xfa : /*inquire Font Selection Mode */break;
     216                 :            :         case 0xf9 : /*set Char Height Spec Mode*/
     217                 :            :         {
     218                 :          0 :             ImplGetUI16(); // -Wall is this really needed?
     219                 :            :         }
     220                 :          0 :         break;
     221                 :          0 :         case 0xf8 : /*set Background Style */break;
     222                 :          0 :         default: break;
     223                 :            :     }
     224                 :          0 : };
     225                 :            : 
     226                 :            : 
     227                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10