LCOV - code coverage report
Current view: top level - filter/source/graphicfilter/icgm - class5.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 27 294 9.2 %
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             : //#define VCL_NEED_BASETSD
      21             : 
      22             : #include <main.hxx>
      23             : #include <outact.hxx>
      24             : 
      25             : 
      26             : 
      27             : 
      28         112 : void CGM::ImplDoClass5()
      29             : {
      30         112 :     switch ( mnElementID )
      31             :     {
      32             :         case 0x01 : /*Line Bundle Index*/
      33           0 :             pElement->pLineBundle = static_cast<LineBundle*>(CGMElements::GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aLineList, pElement->aLineBundle ));
      34           0 :         break;
      35             :         case 0x02 : /*Line Type*/
      36             :         {
      37          42 :             if ( pElement->nAspectSourceFlags & ASF_LINETYPE )
      38           0 :                 pElement->pLineBundle->eLineType = (LineType)ImplGetI( pElement->nIndexPrecision );
      39             :             else
      40          42 :                 pElement->aLineBundle.eLineType = (LineType)ImplGetI( pElement->nIndexPrecision );
      41             :         }
      42          42 :         break;
      43             :         case 0x03 : /*Line Width*/
      44             :         {
      45             :             double nWidth;
      46           0 :             if ( pElement->eLineWidthSpecMode == SM_ABSOLUTE )
      47             :             {
      48           0 :                 if ( pElement->eVDCType == VDC_REAL )
      49           0 :                     nWidth = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize );
      50             :                 else
      51           0 :                     nWidth = (double)ImplGetI( pElement->nVDCIntegerPrecision );
      52             : 
      53           0 :                 ImplMapDouble( nWidth );
      54             :             }
      55             :             else
      56           0 :                 nWidth = (sal_uInt32)ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ) * 25; // scaling in 1/4 mm
      57             : 
      58           0 :             ( pElement->nAspectSourceFlags & ASF_LINEWIDTH )
      59             :                 ? pElement->pLineBundle->nLineWidth = nWidth
      60           0 :                     : pElement->aLineBundle.nLineWidth = nWidth;
      61             :         }
      62           0 :         break;
      63             :         case 0x04 : /*Line Color*/
      64             :         {
      65           0 :             if ( pElement->nAspectSourceFlags & ASF_LINECOLOR )
      66           0 :                 pElement->pLineBundle->SetColor( ImplGetBitmapColor() );
      67             :             else
      68           0 :                 pElement->aLineBundle.SetColor( ImplGetBitmapColor() );
      69             :         }
      70           0 :         break;
      71             :         case 0x05 : /*Marker Bundle Index*/
      72           0 :             pElement->pMarkerBundle = static_cast<MarkerBundle*>(CGMElements::GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aMarkerList, pElement->aMarkerBundle ));
      73           0 :         break;
      74             :         case 0x06 : /*Marker Type*/
      75             :         {
      76           0 :             if ( pElement->nAspectSourceFlags & ASF_MARKERTYPE )
      77           0 :                 pElement->pMarkerBundle->eMarkerType = (MarkerType)ImplGetI( pElement->nIndexPrecision );
      78             :             else
      79           0 :                 pElement->aMarkerBundle.eMarkerType = (MarkerType)ImplGetI( pElement->nIndexPrecision );
      80             :         }
      81           0 :         break;
      82             :         case 0x07 : /*Marker Size*/
      83             :         {
      84             :             double nWidth;
      85           0 :             if ( pElement->eMarkerSizeSpecMode == SM_ABSOLUTE )
      86             :             {
      87           0 :                 if ( pElement->eVDCType == VDC_REAL )
      88           0 :                     nWidth = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize );
      89             :                 else
      90           0 :                     nWidth = (double)ImplGetI( pElement->nVDCIntegerPrecision );
      91           0 :                 ImplMapDouble( nWidth );
      92             :             }
      93             :             else
      94           0 :                 nWidth = (sal_uInt32)ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ) * 25;
      95           0 :             ( pElement->nAspectSourceFlags & ASF_MARKERSIZE )
      96             :                 ? pElement->pMarkerBundle->nMarkerSize = nWidth
      97           0 :                     : pElement->aMarkerBundle.nMarkerSize = nWidth;
      98             :         }
      99           0 :         break;
     100             :         case 0x08 : /*Marker Color*/
     101             :         {
     102           0 :             if ( pElement->nAspectSourceFlags & ASF_MARKERCOLOR )
     103           0 :                 pElement->pMarkerBundle->SetColor( ImplGetBitmapColor() );
     104             :             else
     105           0 :                 pElement->aMarkerBundle.SetColor( ImplGetBitmapColor() );
     106             :         }
     107           0 :         break;
     108             :         case 0x09 : /*Text Bundle Index*/
     109           0 :             pElement->pTextBundle = static_cast<TextBundle*>(CGMElements::GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aTextList, pElement->aTextBundle ));
     110           0 :         break;
     111             :         case 0x0a : /*Text Font Index*/
     112             :         {
     113           0 :             if ( pElement->nAspectSourceFlags & ASF_TEXTFONTINDEX )
     114           0 :                 pElement->pTextBundle->nTextFontIndex = ImplGetI( pElement->nIndexPrecision );
     115             :             else
     116           0 :                 pElement->aTextBundle.nTextFontIndex = ImplGetI( pElement->nIndexPrecision );
     117             :         }
     118           0 :         break;
     119             :         case 0x0b : /*Text Precision*/
     120             :         {
     121             :             TextBundle* pBundle;
     122           0 :             if ( pElement->nAspectSourceFlags & ASF_TEXTPRECISION )
     123           0 :                 pBundle = pElement->pTextBundle;
     124             :             else
     125           0 :                 pBundle = &pElement->aTextBundle;
     126           0 :             switch( ImplGetUI16() )
     127             :             {
     128           0 :                 case 0 : pBundle->eTextPrecision = TPR_STRING; break;
     129           0 :                 case 1 : pBundle->eTextPrecision = TPR_CHARACTER; break;
     130           0 :                 case 2 : pBundle->eTextPrecision = TPR_STROKE; break;
     131           0 :                 default : pBundle->eTextPrecision = TPR_UNDEFINED; break;
     132             :             }
     133             :         }
     134           0 :         break;
     135             :         case 0x0c : /*Character Expansion Factor*/
     136             :         {
     137           0 :             if ( pElement->nAspectSourceFlags & ASF_CHARACTEREXPANSION )
     138           0 :                 pElement->pTextBundle->nCharacterExpansion = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
     139             :             else
     140           0 :                 pElement->aTextBundle.nCharacterExpansion = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
     141             :         }
     142           0 :         break;
     143             :         case 0x0d : /*Character Spacing*/
     144             :         {
     145           0 :             if ( pElement->nAspectSourceFlags & ASF_CHARACTERSPACING )
     146           0 :                 pElement->pTextBundle->nCharacterSpacing = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
     147             :             else
     148           0 :                 pElement->aTextBundle.nCharacterSpacing = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
     149             :         }
     150           0 :         break;
     151             :         case 0x0e : /*Text Color*/
     152             :         {
     153           0 :             if ( pElement->nAspectSourceFlags & ASF_TEXTCOLOR )
     154           0 :                 pElement->pTextBundle->SetColor( ImplGetBitmapColor() );
     155             :             else
     156           0 :                 pElement->aTextBundle.SetColor( ImplGetBitmapColor() );
     157             :         }
     158           0 :         break;
     159             :         case 0x0f : /*Character Height*/
     160             :         {
     161           0 :                 if ( pElement->eVDCType == VDC_INTEGER )
     162           0 :                     pElement->nCharacterHeight = ImplGetI( pElement->nVDCIntegerPrecision );
     163             :                 else // ->floating points
     164           0 :                     pElement->nCharacterHeight = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize );
     165           0 :                 ImplMapDouble( pElement->nCharacterHeight );
     166           0 :                 pElement->nCharacterHeight /= 18.0;
     167             :         }
     168           0 :         break;
     169             :         case 0x10 : /*Character Orientation*/
     170             :         {
     171           0 :             if ( pElement->eVDCType == VDC_INTEGER )
     172             :             {
     173           0 :                 pElement->nCharacterOrientation[0] = ImplGetI( pElement->nVDCIntegerPrecision );
     174           0 :                 pElement->nCharacterOrientation[1] = ImplGetI( pElement->nVDCIntegerPrecision );
     175           0 :                 pElement->nCharacterOrientation[2] = ImplGetI( pElement->nVDCIntegerPrecision );
     176           0 :                 pElement->nCharacterOrientation[3] = ImplGetI( pElement->nVDCIntegerPrecision );
     177             :             }
     178             :             else // ->floating points
     179             :             {
     180           0 :                 pElement->nCharacterOrientation[0] = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize );
     181           0 :                 pElement->nCharacterOrientation[1] = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize );
     182           0 :                 pElement->nCharacterOrientation[2] = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize );
     183           0 :                 pElement->nCharacterOrientation[3] = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize );
     184             :             }
     185             :         }
     186           0 :         break;
     187             :         case 0x11 : /*Text Path*/
     188             :         {
     189           0 :             switch( ImplGetUI16() )
     190             :             {
     191           0 :                 case 0 : pElement->eTextPath = TPR_RIGHT; break;
     192           0 :                 case 1 : pElement->eTextPath = TPR_LEFT; break;
     193           0 :                 case 2 : pElement->eTextPath = TPR_UP; break;
     194           0 :                 case 3 : pElement->eTextPath = TPR_DOWN; break;
     195           0 :                 default : mbStatus = false; break;
     196             :             }
     197             :         }
     198           0 :         break;
     199             :         case 0x12 : /*Text Alignment*/
     200             :         {
     201           0 :             pElement->eTextAlignmentH = (TextAlignmentH)ImplGetUI16();
     202           0 :             pElement->eTextAlignmentV = (TextAlignmentV)ImplGetUI16( 8 );
     203           0 :             pElement->nTextAlignmentHCont = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
     204           0 :             pElement->nTextAlignmentVCont = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
     205             :         }
     206           0 :         break;
     207             :         case 0x13 : /*Character Set Index*/
     208           0 :             pElement->nCharacterSetIndex = ImplGetI( pElement->nIndexPrecision );
     209           0 :         break;
     210             :         case 0x14 : /*Alternate Character Set Index*/
     211           0 :             pElement->nAlternateCharacterSetIndex = ImplGetI( pElement->nIndexPrecision );
     212           0 :         break;
     213             :         case 0x15 : /*Fill Bundle Index*/
     214           0 :             pElement->pFillBundle = static_cast<FillBundle*>(CGMElements::GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aFillList, pElement->aFillBundle ));
     215           0 :         break;
     216             :         case 0x16 : /*Fill Interior Style*/
     217             :         {
     218          14 :             if ( pElement->nAspectSourceFlags & ASF_FILLINTERIORSTYLE )
     219           0 :                 pElement->pFillBundle->eFillInteriorStyle = (FillInteriorStyle)ImplGetUI16();
     220             :             else
     221          14 :                 pElement->aFillBundle.eFillInteriorStyle = (FillInteriorStyle)ImplGetUI16();
     222             :         }
     223          14 :         break;
     224             :         case 0x17 : /*Fill Color*/
     225             :         {
     226           0 :             if ( pElement->nAspectSourceFlags & ASF_FILLCOLOR )
     227           0 :                 pElement->pFillBundle->SetColor( ImplGetBitmapColor() );
     228             :             else
     229           0 :                 pElement->aFillBundle.SetColor( ImplGetBitmapColor() );
     230             :         }
     231           0 :         break;
     232             :         case 0x18 : /*Fill Hatch Index*/
     233             :         {
     234          10 :             if ( pElement->nAspectSourceFlags & ASF_HATCHINDEX )
     235           0 :                 pElement->pFillBundle->nFillHatchIndex = ImplGetI( pElement->nIndexPrecision );
     236             :             else
     237          10 :                 pElement->aFillBundle.nFillHatchIndex = ImplGetI( pElement->nIndexPrecision );
     238             :         }
     239          10 :         break;
     240             :         case 0x19 : /*Fill Pattern Index*/
     241             :         {
     242           4 :             if ( pElement->nAspectSourceFlags & ASF_PATTERNINDEX )
     243           0 :                 pElement->pFillBundle->nFillPatternIndex = ImplGetI( pElement->nIndexPrecision );
     244             :             else
     245           4 :                 pElement->aFillBundle.nFillPatternIndex = ImplGetI( pElement->nIndexPrecision );
     246             :         }
     247           4 :         break;
     248             :         case 0x1a : /*Edge Bundle Index*/
     249           0 :             pElement->pEdgeBundle = static_cast<EdgeBundle*>(CGMElements::GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aEdgeList, pElement->aEdgeBundle ));
     250           0 :         break;
     251             :         case 0x1b : /*Edge Type*/
     252             :         {
     253          18 :             if ( pElement->nAspectSourceFlags & ASF_EDGETYPE )
     254           0 :                 pElement->pEdgeBundle->eEdgeType = (EdgeType)ImplGetI( pElement->nIndexPrecision );
     255             :             else
     256          18 :                 pElement->aEdgeBundle.eEdgeType = (EdgeType)ImplGetI( pElement->nIndexPrecision );
     257             :         }
     258          18 :         break;
     259             :         case 0x1c : /*Edge Width*/
     260             :         {
     261             :             double nWidth;
     262           1 :             if ( pElement->eEdgeWidthSpecMode == SM_ABSOLUTE )
     263             :             {
     264           0 :                 if ( pElement->eVDCType == VDC_REAL )
     265           0 :                     nWidth = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize );
     266             :                 else
     267           0 :                     nWidth = (double)ImplGetI( pElement->nVDCIntegerPrecision );
     268             : 
     269           0 :                 ImplMapDouble( nWidth );
     270             :             }
     271             :             else
     272           1 :                 nWidth = (sal_uInt32)ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ) * 25;
     273           1 :             ( pElement->nAspectSourceFlags & ASF_EDGEWIDTH )
     274             :                 ? pElement->pEdgeBundle->nEdgeWidth = nWidth
     275           1 :                     : pElement->aEdgeBundle.nEdgeWidth = nWidth;
     276             :         }
     277           1 :         break;
     278             :         case 0x1d : /*Edge Color*/
     279             :         {
     280           0 :             if ( pElement->nAspectSourceFlags & ASF_EDGECOLOR )
     281           0 :                 pElement->pEdgeBundle->SetColor( ImplGetBitmapColor() );
     282             :             else
     283           0 :                 pElement->aEdgeBundle.SetColor( ImplGetBitmapColor() );
     284             :         }
     285           0 :         break;
     286             :         case 0x1e : /*Edge Visibility*/
     287             :         {
     288          23 :             switch( ImplGetUI16() )
     289             :             {
     290          14 :                 case 0 : pElement->eEdgeVisibility = EV_OFF; break;
     291           9 :                 case 1 : pElement->eEdgeVisibility = EV_ON; break;
     292           0 :                 default : mbStatus = false;
     293             :             }
     294             :         }
     295          23 :         break;
     296             :         case 0x1f : /*Fill Reference Point*/
     297           0 :             ImplGetPoint( pElement->aFillRefPoint );
     298           0 :         break;
     299           0 :         case 0x20 : /*Pattern Table" )*/ break;
     300           0 :         case 0x21 : /*Pattern Size" )*/ break;
     301             :         case 0x22 : /*Color Table*/
     302             :         {
     303           0 :             sal_uInt32 nColorStartIndex = ImplGetUI( pElement->nColorIndexPrecision );
     304           0 :             if ( ( nColorStartIndex > 255 ) ||
     305           0 :                 ( ( ( mnElementSize - pElement->nColorIndexPrecision ) % ( pElement->nColorPrecision * 3 ) ) != 0 ) )
     306             :             {
     307           0 :                 mbStatus = false;
     308             :             }
     309             :             else
     310             :             {
     311           0 :                 sal_uInt32 nColors = ( mnElementSize - pElement->nColorIndexPrecision ) / ( 3 * pElement->nColorPrecision );
     312           0 :                 if ( nColors )
     313             :                 {
     314           0 :                     sal_uInt32 nMaxColorIndex = nColorStartIndex + nColors - 1;
     315             :                     sal_uInt32 nIndex;
     316           0 :                     if ( nMaxColorIndex > 255 )
     317             :                     {
     318           0 :                         mbStatus = false;
     319           0 :                         break;
     320             :                     }
     321           0 :                     if ( pElement->nLatestColorMaximumIndex < nMaxColorIndex )
     322           0 :                         pElement->nLatestColorMaximumIndex = nMaxColorIndex;
     323             : 
     324           0 :                     for (  nIndex = nColorStartIndex; nIndex <= nMaxColorIndex; nIndex++ )
     325             :                     {
     326           0 :                         pElement->aLatestColorTable[ nIndex ] = ImplGetBitmapColor( true );
     327             :                     }
     328             : 
     329           0 :                     pElement->nColorMaximumIndex = pElement->nLatestColorMaximumIndex;
     330           0 :                     for ( nIndex = nColorStartIndex; nIndex <= nMaxColorIndex; nIndex++ )
     331             :                     {
     332           0 :                         if ( !pElement->aColorTableEntryIs[ nIndex ] )
     333             :                         {
     334           0 :                             pElement->aColorTableEntryIs[ nIndex ] = 1;
     335           0 :                             pElement->aColorTable[ nIndex ] = pElement->aLatestColorTable[ nIndex ];
     336             :                         }
     337             :                     }
     338             :                 }
     339             :             }
     340             :         }
     341           0 :         break;
     342             :         case 0x23 : /*Aspect Source Flags*/
     343             :         {
     344           0 :             int nFlags = mnElementSize >> 2;
     345           0 :             while ( nFlags-- > 0 )
     346             :             {
     347           0 :                 sal_uInt32 nFlag = 0;
     348           0 :                 switch( ImplGetUI16() )
     349             :                 {
     350           0 :                     case 0 : nFlag = ASF_LINETYPE; break;
     351           0 :                     case 1 : nFlag = ASF_LINEWIDTH; break;
     352           0 :                     case 2 : nFlag = ASF_LINECOLOR; break;
     353           0 :                     case 3 : nFlag = ASF_MARKERTYPE; break;
     354           0 :                     case 4 : nFlag = ASF_MARKERSIZE; break;
     355           0 :                     case 5 : nFlag = ASF_MARKERCOLOR; break;
     356           0 :                     case 6 : nFlag = ASF_FILLINTERIORSTYLE; break;
     357           0 :                     case 7 : nFlag = ASF_HATCHINDEX; break;
     358           0 :                     case 8 : nFlag = ASF_PATTERNINDEX; break;
     359           0 :                     case 9 : nFlag = ASF_BITMAPINDEX; break;
     360           0 :                     case 10 : nFlag = ASF_FILLCOLOR; break;
     361           0 :                     case 11 : nFlag = ASF_EDGETYPE; break;
     362           0 :                     case 12 : nFlag = ASF_EDGEWIDTH; break;
     363           0 :                     case 13 : nFlag = ASF_EDGECOLOR; break;
     364           0 :                     case 14 : nFlag = ASF_TEXTFONTINDEX; break;
     365           0 :                     case 15 : nFlag = ASF_TEXTPRECISION; break;
     366           0 :                     case 16 : nFlag = ASF_CHARACTEREXPANSION; break;
     367           0 :                     case 17 : nFlag = ASF_CHARACTERSPACING; break;
     368           0 :                     case 18 : nFlag = ASF_TEXTCOLOR; break;
     369           0 :                     default : mbStatus = false; break;
     370             :                 }
     371           0 :                 sal_uInt32  nASF = ImplGetUI16();
     372           0 :                 switch ( nASF )
     373             :                 {
     374           0 :                     case 0 : pElement->nAspectSourceFlags &= ~nFlag; break; // INDIVIDUAL
     375           0 :                     case 1 : pElement->nAspectSourceFlags |= nFlag; break;  // BUNDLED
     376           0 :                     default : mbStatus = false; break;
     377             :                 }
     378             :             }
     379             :         }
     380           0 :         break;
     381             :         case 0x24 : /*Pick Identifier" ) bre*/
     382             :         case 0x25 : /*Line Cap*/
     383             :         {
     384           0 :             switch( ImplGetUI16() )
     385             :             {
     386           0 :                 case 0 : pElement->eLineCapType = LCT_BUTT; break;
     387           0 :                 case 1 : pElement->eLineCapType = LCT_ROUND; break;
     388           0 :                 case 2 : pElement->eLineCapType = LCT_SQUARE; break;
     389           0 :                 case 3 : pElement->eLineCapType = LCT_TRIANGLE; break;
     390           0 :                 case 4 : pElement->eLineCapType = LCT_ARROW; break;
     391           0 :                 default : pElement->eLineCapType = LCT_NONE; break;
     392             :             }
     393             :         }
     394           0 :         break;
     395             :         case 0x26 : /*Line Join*/
     396             :         {
     397           0 :             switch( ImplGetUI16() )
     398             :             {
     399           0 :                 case 0 : pElement->eLineJoinType = LJT_MITER; break;
     400           0 :                 case 1 : pElement->eLineJoinType = LJT_ROUND; break;
     401           0 :                 case 2 : pElement->eLineJoinType = LJT_BEVEL; break;
     402           0 :                 default : pElement->eLineJoinType = LJT_NONE; break;
     403             :             }
     404             :         }
     405           0 :         break;
     406           0 :         case 0x27 : /*Line Type Continuation*/ break;           // NS
     407           0 :         case 0x28 : /*Line Type Initial Offset*/ break;         // NS
     408           0 :         case 0x29 : /*Text Score Type*/ break;
     409           0 :         case 0x2a : /*Restricted Text Type*/ break;
     410           0 :         case 0x2b : /*Interpolated interior*/ break;
     411           0 :         case 0x2c : /*Edge Cap*/ break;                         // NS
     412           0 :         case 0x2d : /*Edge Join*/ break;
     413           0 :         case 0x2e : /*Edge Type Continuation*/ break;           // NS
     414           0 :         case 0x2f : /*Edge Type Initial Offset*/ break;         // NS
     415           0 :         case 0x30 : /*Symbol Library Index*/ break;             // NS
     416           0 :         case 0x31 : /*Symbol Color*/ break;                     // NS
     417           0 :         case 0x32 : /*Symbol Size*/ break;                      // NS
     418           0 :         case 0x33 : /*Symbol Orientation*/ break;               // NS
     419           0 :         case 0x50 : /*Block Text vcl::Region Margins*/ break;
     420           0 :         case 0x51 : /*Block Text vcl::Region Expansion*/ break;
     421           0 :         case 0x52 : /*Block Text vcl::Region Anchor*/ break;
     422           0 :         case 0x53 : /*Block Text Paragraph Horizontal Alignment*/ break;
     423           0 :         case 0x54 : /*Block Text Paragraph Vertical Alignment*/ break;
     424           0 :         case 0x55 : /*Block Text Line Flow*/ break;
     425           0 :         case 0x60 : /*Block Text Paragraph Spacing*/ break;
     426           0 :         case 0x61 : /*Block Text Paragraph Indent*/ break;
     427           0 :         case 0x62 : /*Block Text Paragraph Tabs*/ break;
     428           0 :         case 0x63 : /*Block Text Paragraph Bullets*/ break;
     429           0 :         case 0x64 : /*Block Text Paragraph Bullet Level*/ break;
     430           0 :         case 0x65 : /*Block Text Paragraph Line Horizontal Alignment*/ break;
     431           0 :         case 0x66 : /*Block Text Paragraph Line Vertical Alignment*/ break;
     432           0 :         case 0x67 : /*Block Text Paragragh Line Spacing*/ break;
     433           0 :         case 0x68 : /*Block Text Paragraph Word Wrap*/ break;
     434           0 :         case 0x70 : /*Block Text Forward Advance Distance*/ break;
     435           0 :         case 0x71 : /*Word Spacing*/ break;
     436           0 :         case 0x72 : /*External Leading*/ break;
     437             :         case 0x7a : /*set Gradient Offset*/
     438             :         {
     439           0 :             long nHorzOffset = ImplGetI( pElement->nIndexPrecision );
     440           0 :             long nVertOffset = ImplGetI( pElement->nIndexPrecision );
     441           0 :             sal_uInt32 nType = ImplGetUI16();
     442           0 :             mpOutAct->SetGradientOffset( nHorzOffset, nVertOffset, nType );
     443           0 :             mnAct4PostReset |= ACT4_GRADIENT_ACTION;
     444             :         }
     445           0 :         break;
     446             :         case 0x7b : /*set Gradient Edge*/
     447             :         {
     448           0 :             mnAct4PostReset |= ACT4_GRADIENT_ACTION;
     449             :         }
     450           0 :         break;
     451             :         case 0x7c : /*set Gradient Angle*/
     452             :         {
     453           0 :             mpOutAct->SetGradientAngle( ImplGetI( pElement->nIndexPrecision ) );
     454           0 :             mnAct4PostReset |= ACT4_GRADIENT_ACTION;
     455             :         }
     456           0 :         break;
     457             :         case 0x7d : /*set Gradient Description*/
     458             :         {
     459           0 :             ImplGetI( pElement->nIndexPrecision ); // -Wall is this needed?
     460           0 :             sal_uInt32  nNumberOfStages = ImplGetI( pElement->nIndexPrecision );
     461           0 :             sal_uInt32  i, nColorFrom = 0;
     462           0 :             sal_uInt32  nColorTo = 0xffffff;
     463             : 
     464           0 :             const size_t nRemainingSize = mpEndValidSource - (mpSource + mnParaSize);
     465           0 :             const size_t nMaxPossibleRecords = nRemainingSize/pElement->nRealSize;
     466             : 
     467           0 :             if (nNumberOfStages > nMaxPossibleRecords)
     468             :             {
     469           0 :                 mbStatus = false;
     470           0 :                 break;
     471             :             }
     472             : 
     473           0 :             for ( i = 0; i < nNumberOfStages; i++ )
     474             :             {
     475           0 :                 ImplGetFloat(pElement->eRealPrecision, pElement->nRealSize);
     476             :             }
     477             : 
     478           0 :             for ( i = 0; i <= nNumberOfStages; i++ )
     479             :             {
     480           0 :                 sal_uInt32 nPara = mnParaSize + 24;
     481           0 :                 if ( i == 0 )
     482             :                 {
     483           0 :                     nColorTo = ImplGetBitmapColor();
     484           0 :                     nColorFrom = nColorTo ^ 0xffffff;
     485             :                 }
     486           0 :                 else if ( i == 1 )
     487           0 :                     nColorFrom = ImplGetBitmapColor();
     488           0 :                 mnParaSize = nPara;
     489             :             }
     490           0 :             if ( nNumberOfStages > 1 )
     491           0 :                 mpOutAct->SetGradientStyle( 0xff, 1 );
     492             : 
     493           0 :             mpOutAct->SetGradientDescriptor( nColorFrom, nColorTo );
     494           0 :             mnAct4PostReset |= ACT4_GRADIENT_ACTION;
     495             :         }
     496           0 :         break;
     497             :         case 0x7e : /*set Gradient Style*/
     498             :         {
     499           0 :             sal_uInt32 nStyle = ImplGetUI16( 8 );
     500           0 :             double fRatio = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize );
     501           0 :             mpOutAct->SetGradientStyle( nStyle, fRatio );
     502           0 :             mnAct4PostReset |= ACT4_GRADIENT_ACTION;
     503             :         }
     504           0 :         break;
     505           0 :         case 0xff : /*inquire Font metrics*/ break;
     506           0 :         case 0xfe : /*inquire character widths*/ break;
     507           0 :         case 0xfd : /*set Text Font*/ break;
     508           0 :         case 0xfc : /*set current position*/ break;
     509           0 :         case 0xfb : /*set current position mode*/ break;
     510           0 :         case 0xfa : /*set character height mode*/ break;
     511           0 :         case 0xf9 : /*set Transform matrix 2D*/ break;
     512           0 :         case 0xf8 : /*set Transform matrix 3D*/ break;
     513           0 :         case 0xf7 : /*pop transformation state*/ break;
     514           0 :         case 0xf6 : /*clear transformation state*/ break;
     515           0 :         case 0xf5 : /*set character widths*/ break;
     516           0 :         case 0xf4 : /*set color name - for Pantone support*/ break;
     517           0 :         default: break;
     518             :     }
     519         112 : };
     520             : 
     521             : 
     522             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11