LCOV - code coverage report
Current view: top level - filter/source/graphicfilter/icgm - class0.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 30 68 44.1 %
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             : #include <main.hxx>
      21             : #include <outact.hxx>
      22             : 
      23             : 
      24             : 
      25          44 : void CGM::ImplDoClass0()
      26             : {
      27          44 :     switch ( mnElementID )
      28             :     {
      29             :         case 0x01 : /*Begin Metafile*/
      30             :         {
      31           1 :             ImplSetMapMode();
      32           1 :             mbMetaFile = true;
      33             :         }
      34           1 :         break;
      35             :         case 0x02 : /*End MetaFile*/
      36             :         {
      37           1 :             if ( mpBitmapInUse )                            // process existend graphic
      38             :             {
      39           0 :                 CGMBitmapDescriptor* pBmpDesc = mpBitmapInUse->GetBitmap();
      40             :                 // do anything with the bitmap
      41           0 :                 mpOutAct->DrawBitmap( pBmpDesc );
      42           0 :                 delete mpBitmapInUse;
      43           0 :                 mpBitmapInUse = NULL;
      44             :             }
      45           1 :             mbIsFinished = true;
      46           1 :             mbPictureBody = false;
      47           1 :             mbMetaFile = false;
      48             :         }
      49           1 :         break;
      50             :         case 0x03 : /*Begin Picture*/
      51             :         {
      52          14 :             ImplDefaultReplacement();
      53          14 :             ImplSetMapMode();
      54          14 :             if ( mbPicture )
      55           0 :                 mbStatus = false;
      56             :             else
      57             :             {
      58          14 :                 *pCopyOfE = *pElement;
      59          14 :                 mbPicture = mbFirstOutPut = true;
      60          14 :                 mbFigure = false;
      61          14 :                 mnAct4PostReset = 0;
      62          14 :                 if ( mpChart == NULL )      // normal CGM Files determines "BeginPic"
      63          14 :                     mpOutAct->InsertPage();     // as the next slide
      64             :             }
      65             :         }
      66          14 :         break;
      67             :         case 0x04 : /*Begin Picture Body*/
      68          14 :             mbPictureBody = true;
      69          14 :         break;
      70             :         case 0x05 : /*  End Picture*/
      71             :         {
      72          14 :             if ( mbPicture )
      73             :             {
      74          14 :                 if ( mpBitmapInUse )                            // process existend graphic
      75             :                 {
      76           0 :                     CGMBitmapDescriptor* pBmpDesc = mpBitmapInUse->GetBitmap();
      77             :                     // do anything with the bitmap
      78           0 :                     mpOutAct->DrawBitmap( pBmpDesc );
      79           0 :                     delete mpBitmapInUse;
      80           0 :                     mpBitmapInUse = NULL;
      81             :                 }
      82          14 :                 mpOutAct->EndFigure();                          // close potential figures
      83          14 :                 mpOutAct->EndGrouping();                        // finish potential groups
      84          14 :                 *pElement = *pCopyOfE;
      85          14 :                 mbFigure = mbFirstOutPut = mbPicture = mbPictureBody = false;
      86             :             }
      87             :             else
      88           0 :                 mbStatus = false;
      89             :         }
      90          14 :         break;
      91             :         case 0x06 : /*Begin Segment*/
      92           0 :             pElement->bSegmentCount = true;
      93           0 :         break;
      94             :         case 0x07 : /*End Segment*/
      95           0 :             pElement->bSegmentCount = true;
      96           0 :         break;
      97             :         case 0x08 : /*Begin Figure*/
      98           0 :             mbFigure = true;
      99           0 :             mpOutAct->BeginFigure();
     100           0 :         break;
     101             :         case 0x09 : /*End Figure*/
     102           0 :             mpOutAct->EndFigure();
     103           0 :             mbFigure = false;
     104           0 :         break;
     105           0 :         case 0x0d : /*Begin Protection vcl::Region */break;
     106           0 :         case 0x0e : /*End Protection vcl::Region */break;
     107           0 :         case 0x0f : /*Begin Compound Line */break;
     108           0 :         case 0x10 : /*End Compound Line */break;
     109           0 :         case 0x11 : /*Begin Compound Text Path */break;
     110           0 :         case 0x12 : /*End Compound Text Path */break;
     111           0 :         case 0x13 : /*Begin Tile Array */break;                 // NS
     112           0 :         case 0x14 : /*End Tile Array */break;                   // NS
     113           0 :         case 0xff : /*Filter Setup */break;
     114           0 :         case 0xfe : /*Begin Block Text vcl::Region */break;
     115           0 :         case 0xfd : /*End Block Text vcl::Region */break;
     116             :         case 0xfc : /*Begin Group*/
     117           0 :             mpOutAct->BeginGroup();
     118           0 :         break;
     119             :         case 0xfb : /*End Group*/
     120           0 :             mpOutAct->EndGroup();
     121           0 :         break;
     122           0 :         case 0xfa : /*Begin Patch */break;
     123           0 :         case 0xf9 : /*Begin Patch */break;
     124           0 :         default: break;
     125             :     }
     126          44 : };
     127             : 
     128             : 
     129             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11