LCOV - code coverage report
Current view: top level - filter/source/graphicfilter/icgm - outact.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 19 0.0 %
Date: 2012-08-25 Functions: 0 19 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     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 CGM_OUTACT_HXX_
      21                 :            : #define CGM_OUTACT_HXX_
      22                 :            : 
      23                 :            : #include <com/sun/star/awt/Gradient.hpp>
      24                 :            : #include <com/sun/star/drawing/XDrawPages.hpp>
      25                 :            : #include <com/sun/star/drawing/XDrawPage.hpp>
      26                 :            : #include <com/sun/star/drawing/XShape.hpp>
      27                 :            : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
      28                 :            : #include <com/sun/star/beans/XPropertySet.hpp>
      29                 :            : 
      30                 :            : 
      31                 :            : #define CGM_OUTACT_MAX_GROUP_LEVEL 64
      32                 :            : 
      33                 :            : #include "cgm.hxx"
      34                 :            : #include <chart.hxx>
      35                 :            : #include <tools/poly.hxx>
      36                 :            : 
      37                 :            : typedef struct NodeFrameSet
      38                 :            : {
      39                 :            :     Point       nTopLeft;
      40                 :            :     Point       nBottomRight;
      41                 :            :     ::com::sun::star::awt::Size     nSize;
      42                 :            : } NodeFrameSet;
      43                 :            : 
      44                 :            : class CGM;
      45                 :            : class CGMBitmapDescriptor;
      46                 :            : class CGMOutAct
      47                 :            : {
      48                 :            :     protected:
      49                 :            :         sal_uInt16                  mnCurrentPage;          // defaulted to zero
      50                 :            : 
      51                 :            :         sal_uInt32                  mnGroupActCount;        // grouping
      52                 :            :         sal_uInt32                  mnGroupLevel;
      53                 :            :         sal_uInt32*                 mpGroupLevel;
      54                 :            : 
      55                 :            :         sal_uInt16                  mnIndex;                // figure
      56                 :            :         sal_uInt8*                  mpFlags;
      57                 :            :         Point*                  mpPoints;
      58                 :            :         PolyPolygon             maPolyPolygon;
      59                 :            :         ::com::sun::star::awt::Gradient*            mpGradient;
      60                 :            : 
      61                 :            :         CGM*                    mpCGM;
      62                 :            : 
      63                 :            :     public:
      64                 :            :                                 CGMOutAct( CGM& rCGM );
      65                 :            :     virtual                     ~CGMOutAct();
      66                 :          0 :     virtual void                FirstOutPut() { mpCGM->mbFirstOutPut = sal_False; } ;
      67                 :          0 :     virtual void                InsertPage() { mnCurrentPage++; } ;
      68                 :          0 :     virtual void                BeginGroup() {} ;
      69                 :          0 :     virtual void                EndGroup() {};
      70                 :          0 :     virtual void                EndGrouping() {} ;
      71                 :            :     void                        BeginFigure() ;
      72                 :            :     void                        CloseRegion() ;
      73                 :            :     void                        NewRegion() ;
      74                 :            :     void                        EndFigure() ;
      75                 :            :     void                        RegPolyLine( Polygon&, sal_Bool bReverse = sal_False ) ;
      76                 :            :     void                        SetGradientOffset( long nHorzOfs, long nVertOfs, sal_uInt32 nType );
      77                 :            :     void                        SetGradientAngle( long nAngle );
      78                 :            :     void                        SetGradientDescriptor( sal_uInt32 nColorFrom, sal_uInt32 nColorTo );
      79                 :            :     void                        SetGradientStyle( sal_uInt32 nStyle, double fRatio );
      80                 :          0 :     virtual void                DrawRectangle( FloatRect& ) {} ;
      81                 :          0 :     virtual void                DrawEllipse( FloatPoint&, FloatPoint&, double& ) {} ;
      82                 :          0 :     virtual void                DrawEllipticalArc( FloatPoint&, FloatPoint&, double&,
      83                 :          0 :                                     sal_uInt32, double&, double&) {} ;
      84                 :          0 :     virtual void                DrawBitmap( CGMBitmapDescriptor* ) {} ;
      85                 :          0 :     virtual void                DrawPolygon( Polygon& ) {} ;
      86                 :          0 :     virtual void                DrawPolyLine( Polygon& ) {} ;
      87                 :          0 :     virtual void                DrawPolybezier( Polygon& ) {} ;
      88                 :          0 :     virtual void                DrawPolyPolygon( PolyPolygon& ) {} ;
      89                 :          0 :     virtual void                DrawText( ::com::sun::star::awt::Point&, ::com::sun::star::awt::Size&, char*, sal_uInt32, FinalFlag ) {} ;
      90                 :          0 :     virtual void                AppendText( char*, sal_uInt32, FinalFlag ) {} ;
      91                 :          0 :     virtual sal_uInt32              DrawText( TextEntry*, NodeFrameSet&, sal_uInt32 ) { return 0; } ;
      92                 :          0 :     virtual void                DrawChart(){} ;
      93                 :            : };
      94                 :            : 
      95                 :            : class CGMImpressOutAct : public CGMOutAct
      96                 :            : {
      97                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPages >               maXDrawPages;
      98                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >                maXDrawPage;
      99                 :            : 
     100                 :            : //  ::com::sun::star::uno::Reference< XServiceRegistry >            maXServiceRegistry;
     101                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >        maXMultiServiceFactory;
     102                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >        maXServiceManagerSC;
     103                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >                   maXShape;
     104                 :            :     sal_Bool                        ImplCreateShape( const ::rtl::OUString& rType );
     105                 :            : 
     106                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >           maXPropSet;
     107                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >                  maXShapes;
     108                 :            : 
     109                 :            :     sal_uInt32                      nFinalTextCount;
     110                 :            : 
     111                 :            :     sal_Bool                        ImplInitPage();
     112                 :            :     void                        ImplSetOrientation( FloatPoint& RefPoint, double& Orientation ) ;
     113                 :            :     void                        ImplSetLineBundle() ;
     114                 :            :     void                        ImplSetFillBundle() ;
     115                 :            :     void                        ImplSetTextBundle( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & ) ;
     116                 :            : public:
     117                 :            :                                 CGMImpressOutAct( CGM&, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & ) ;
     118                 :          0 :                                 ~CGMImpressOutAct() {} ;
     119                 :            :     virtual void                InsertPage() ;
     120                 :            :     virtual void                BeginGroup() ;
     121                 :            :     virtual void                EndGroup() ;
     122                 :            :     virtual void                EndGrouping() ;
     123                 :            :     virtual void                DrawRectangle( FloatRect& ) ;
     124                 :            :     virtual void                DrawEllipse( FloatPoint& center, FloatPoint&, double& Orientation ) ;
     125                 :            :     virtual void                DrawEllipticalArc( FloatPoint& center, FloatPoint& size, double& orientation,
     126                 :            :                                     sal_uInt32 etype, double& startangle, double& endangle ) ;
     127                 :            :     virtual void                DrawBitmap( CGMBitmapDescriptor* ) ;
     128                 :            :     virtual void                DrawPolygon( Polygon& ) ;
     129                 :            :     virtual void                DrawPolyLine( Polygon& ) ;
     130                 :            :     virtual void                DrawPolybezier( Polygon& ) ;
     131                 :            :     virtual void                DrawPolyPolygon( PolyPolygon& ) ;
     132                 :            :     virtual void                DrawText( ::com::sun::star::awt::Point& TextRectPos, ::com::sun::star::awt::Size& TextRectSize, char* String, sal_uInt32 StringSize, FinalFlag ) ;
     133                 :            :     virtual void                AppendText( char* String, sal_uInt32 StringSize, FinalFlag ) ;
     134                 :            :     virtual sal_uInt32              DrawText( TextEntry*, NodeFrameSet&, sal_uInt32 ) ;
     135                 :            :     virtual void                DrawChart();
     136                 :            : };
     137                 :            : 
     138                 :            : 
     139                 :            : #endif
     140                 :            : 
     141                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10