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

Generated by: LCOV version 1.10