LCOV - code coverage report
Current view: top level - filter/source/graphicfilter/icgm - class3.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 20 67 29.9 %
Date: 2015-06-13 12:38:46 Functions: 1 1 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             : 
      21             : #include <main.hxx>
      22             : #include <outact.hxx>
      23             : 
      24             : 
      25             : 
      26          30 : void CGM::ImplDoClass3()
      27             : {
      28             :     sal_uInt32  nUInteger;
      29          30 :     switch ( mnElementID )
      30             :     {
      31             :         case 0x01 : /*VDC Integer Precision*/
      32             :         {
      33           0 :             switch( ImplGetI( pElement->nIntegerPrecision ) )
      34             :             {
      35           0 :                 case 16 : pElement->nVDCIntegerPrecision = 2; break;
      36           0 :                 case 32 : pElement->nVDCIntegerPrecision = 4; break;
      37           0 :                 default : mbStatus = false; break;
      38             :             }
      39             :         }
      40           0 :         break;
      41             :         case 0x02 : /*VDC Real Precision*/
      42             :         {
      43          14 :             nUInteger = ImplGetUI16();
      44          14 :             const long nI0 = ImplGetI( pElement->nIntegerPrecision );  // exponent
      45          14 :             const long nI1 = ImplGetI( pElement->nIntegerPrecision );  // mantisse
      46          14 :             switch( nUInteger )
      47             :             {
      48             :                 case 0 :
      49           0 :                     pElement->eVDCRealPrecision = RP_FLOAT;
      50           0 :                     switch ( nI0 )
      51             :                     {
      52             :                         case 9 :
      53           0 :                             if ( nI1 != 23 )
      54           0 :                                 mbStatus = false;
      55           0 :                             pElement->nVDCRealSize = 4;
      56           0 :                             break;
      57             :                         case 12 :
      58           0 :                             if ( nI1 != 52 )
      59           0 :                                 mbStatus =false;
      60           0 :                             pElement->nVDCRealSize = 8;
      61           0 :                             break;
      62             :                         default:
      63           0 :                             mbStatus = false;
      64           0 :                             break;
      65             :                     }
      66           0 :                     break;
      67             :                 case 1 :
      68          14 :                     pElement->eVDCRealPrecision = RP_FIXED;
      69          14 :                     if ( nI0 != nI1 )
      70           0 :                         mbStatus = false;
      71          14 :                     if ( nI0 == 16 )
      72          14 :                         pElement->nVDCRealSize = 4;
      73           0 :                     else if ( nI0 == 32 )
      74           0 :                         pElement->nVDCRealSize = 8;
      75             :                     else
      76           0 :                         mbStatus = false;
      77          14 :                     break;
      78             :                 default :
      79           0 :                     mbStatus = false; break;
      80             :             }
      81             :         }
      82          14 :         break;
      83             :         case 0x03 : /*Auxiliary Colour*/
      84             :         {
      85           0 :             pElement->nAuxiliaryColor = ImplGetBitmapColor();
      86             :         }
      87           0 :         break;
      88             :         case 0x04 : /*Transparency*/
      89             :         {
      90           2 :             switch( ImplGetUI16() )
      91             :             {
      92           1 :                 case 0 : pElement->eTransparency = T_OFF; break;
      93           1 :                 case 1 : pElement->eTransparency = T_ON; break;
      94           0 :                 default : mbStatus = false; break;
      95             :             }
      96             :         }
      97           2 :         break;
      98             :         case 0x05 : /*Clip Rectangle*/
      99           0 :             ImplGetRectangle( pElement->aClipRect );
     100           0 :         break;
     101             :         case 0x06 : /*Clip Indicator*/
     102             :         {
     103          14 :             switch( ImplGetUI16() )
     104             :             {
     105          14 :                 case 0 : pElement->eClipIndicator = CI_OFF; break;
     106           0 :                 case 1 : pElement->eClipIndicator = CI_ON; break;
     107           0 :                 default : mbStatus = false; break;
     108             :             }
     109             :         }
     110          14 :         break;
     111           0 :         case 0x07 : /*Line Clipping Mode */break;               // NS
     112           0 :         case 0x08 : /*Marker Clipping Mode */break;             // NS
     113           0 :         case 0x09 : /*Edge Clipping Mode */break;               // NS
     114             :         case 0x0a : /*New Region*/
     115           0 :             mpOutAct->NewRegion();
     116           0 :         break;
     117           0 :         case 0x0b : /*Save Primitive Context */break;           // NS
     118           0 :         case 0x0c : /*Restore Primitive Context */break;        // NS
     119           0 :         case 0x11 : /*Protection vcl::Region Indicator */break;
     120           0 :         case 0x12 : /*Generalized Text Path Mode */break;       // NS
     121             :         case 0x13 : /*Mitre Limit*/
     122           0 :             pElement->nMitreLimit = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
     123           0 :         break;                                                                      // NS
     124           0 :         case 0x14 : /*Transparent Cell Color */break;           // NS
     125           0 :         case 0xfc : /*Text Path Alignment Modes */break;
     126           0 :         case 0xfd : /*Pop Transformation Stack */break;
     127           0 :         case 0xfe : /*Push Transformation Stack */break;
     128           0 :         case 0xff : /*Set Patch ID */break;
     129           0 :         default: break;
     130             :     }
     131          30 : };
     132             : 
     133             : 
     134             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11