LCOV - code coverage report
Current view: top level - filter/source/graphicfilter/icgm - bundles.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 35 36 97.2 %
Date: 2015-06-13 12:38:46 Functions: 31 33 93.9 %
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             : #ifndef INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_BUNDLES_HXX
      21             : #define INCLUDED_FILTER_SOURCE_GRAPHICFILTER_ICGM_BUNDLES_HXX
      22             : 
      23             : #include <sal/types.h>
      24             : #include "cgmtypes.hxx"
      25             : #include <vcl/salbtype.hxx>
      26             : #include <vector>
      27             : 
      28             : 
      29             : 
      30         160 : class Bundle
      31             : {
      32             : 
      33             :     long                mnBundleIndex;
      34             :     sal_uInt32          mnColor;
      35             : 
      36             : public:
      37             :     void                SetColor( sal_uInt32 nColor ) ;
      38         146 :     sal_uInt32          GetColor() const { return mnColor;}
      39         440 :     long                GetIndex() const { return mnBundleIndex; } ;
      40         160 :     void                SetIndex( long nBundleIndex ) { mnBundleIndex = nBundleIndex; } ;
      41             : 
      42          20 :     Bundle()
      43             :         : mnBundleIndex( 0 )
      44          20 :         , mnColor( 0 )
      45          20 :         {};
      46             : 
      47           0 :     virtual Bundle*     Clone() { return new Bundle( *this ); };
      48             :             Bundle&     operator=( Bundle& rBundle );
      49             : 
      50         180 :     virtual            ~Bundle() {} ;
      51             : };
      52             : 
      53             : 
      54             : 
      55         100 : class LineBundle : public Bundle
      56             : {
      57             : public:
      58             : 
      59             :     LineType            eLineType;
      60             :     double              nLineWidth;
      61             : 
      62           4 :     LineBundle()
      63             :         : eLineType(LT_SOLID)
      64           4 :         , nLineWidth(0)
      65           4 :     {}
      66             : 
      67          32 :     virtual Bundle* Clone() SAL_OVERRIDE { return new LineBundle( *this ); }
      68             :     LineBundle& operator=( LineBundle& rLineBundle );
      69             : };
      70             : 
      71             : 
      72             : 
      73          32 : class MarkerBundle : public Bundle
      74             : {
      75             : public:
      76             : 
      77             :     MarkerType          eMarkerType;
      78             :     double              nMarkerSize;
      79             : 
      80           4 :     MarkerBundle()
      81             :         : eMarkerType( MT_POINT )
      82           4 :         , nMarkerSize( 0.0 )
      83           4 :         {};
      84             : 
      85          32 :     virtual Bundle*     Clone() SAL_OVERRIDE { return new MarkerBundle( *this ); } ;
      86             :             MarkerBundle&   operator=( MarkerBundle& rMarkerBundle );
      87          68 :     virtual             ~MarkerBundle() {};
      88             : };
      89             : 
      90             : 
      91             : 
      92         100 : class EdgeBundle : public Bundle
      93             : {
      94             : public:
      95             : 
      96             :     EdgeType            eEdgeType;
      97             :     double              nEdgeWidth;
      98             : 
      99           4 :     EdgeBundle()
     100             :         : eEdgeType(ET_NONE)
     101           4 :         , nEdgeWidth(0)
     102           4 :     {}
     103          32 :     virtual Bundle*     Clone() SAL_OVERRIDE { return new EdgeBundle( *this ); }
     104             :     EdgeBundle& operator=( EdgeBundle& rEdgeBundle );
     105             : };
     106             : 
     107             : 
     108             : 
     109          32 : class TextBundle : public Bundle
     110             : {
     111             : public:
     112             : 
     113             :     sal_uInt32          nTextFontIndex;
     114             :     TextPrecision       eTextPrecision;
     115             :     double              nCharacterExpansion;
     116             :     double              nCharacterSpacing;
     117             : 
     118           4 :     TextBundle()
     119             :         : nTextFontIndex( 0 )
     120             :         , eTextPrecision( TPR_UNDEFINED )
     121             :         , nCharacterExpansion( 0.0 )
     122           4 :         , nCharacterSpacing( 0.0 )
     123           4 :         {};
     124             : 
     125          32 :     virtual Bundle*     Clone() SAL_OVERRIDE { return new TextBundle( *this ); } ;
     126             :             TextBundle& operator=( TextBundle& rTextBundle );
     127          68 :     virtual             ~TextBundle() {};
     128             : };
     129             : 
     130             : 
     131             : 
     132         100 : class FillBundle : public Bundle
     133             : {
     134             : public:
     135             : 
     136             :     FillInteriorStyle   eFillInteriorStyle;
     137             :     long                nFillPatternIndex;
     138             :     long                nFillHatchIndex;
     139             : 
     140           4 :     FillBundle()
     141             :         : eFillInteriorStyle(FIS_HOLLOW)
     142             :         , nFillPatternIndex(0)
     143           4 :         , nFillHatchIndex(0)
     144           4 :     {}
     145          32 :     virtual Bundle*     Clone() SAL_OVERRIDE { return new FillBundle( *this ); }
     146             :     FillBundle& operator=( FillBundle& rFillBundle );
     147             : };
     148             : 
     149             : 
     150             : 
     151             : 
     152             : class FontEntry
     153             : {
     154             : public:
     155             :     sal_Int8*               pFontName;
     156             :     CharSetType         eCharSetType;
     157             :     sal_Int8*               pCharSetValue;
     158             :     sal_uInt32              nFontType;          // bit 0 = 1 -> Italic,
     159             :                                             // bit 1 = 1 -> Bold
     160             : 
     161             :                         FontEntry();
     162             :     FontEntry*          Clone() { return new FontEntry( *this ); } ;
     163             :                         ~FontEntry();
     164             : };
     165             : 
     166             : 
     167             : 
     168             : typedef ::std::vector< FontEntry* > FontEntryList;
     169             : 
     170             : class CGMFList
     171             : {
     172             :     sal_uInt32      nFontNameCount;
     173             :     sal_uInt32      nCharSetCount;
     174             :     FontEntryList   aFontEntryList;
     175             :     void            ImplDeleteList();
     176             : 
     177             : public:
     178             :                     CGMFList();
     179             :                     ~CGMFList();
     180             : 
     181             :     sal_uInt32      nFontsAvailable;
     182             :     FontEntry*      GetFontEntry( sal_uInt32 );
     183             :     void            InsertName( sal_uInt8* pSource, sal_uInt32 nSize );
     184             :     void            InsertCharSet( CharSetType, sal_uInt8* pSource, sal_uInt32 nSize );
     185             :     CGMFList&       operator=( CGMFList& rFontList );
     186             : };
     187             : 
     188             : #endif
     189             : 
     190             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11