LCOV - code coverage report
Current view: top level - svx/inc/svx - lathe3d.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 22 0.0 %
Date: 2012-08-25 Functions: 0 14 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 4 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef _E3D_LATHE3D_HXX
      30                 :            : #define _E3D_LATHE3D_HXX
      31                 :            : 
      32                 :            : #include <svx/obj3d.hxx>
      33                 :            : #include "svx/svxdllapi.h"
      34                 :            : 
      35                 :            : /*************************************************************************
      36                 :            : |*
      37                 :            : |* Create a 3D rotation object from a passed 2D polygon
      38                 :            : |*
      39                 :            : |* The aPolyPoly3D is rotated around its axis in nHSegments steps.
      40                 :            : |* nVSegments contains the number of lines of aPolyPoly3D and therefore
      41                 :            : |* is effectively a vertical segmentation.
      42                 :            : |*
      43                 :            : \************************************************************************/
      44                 :            : 
      45 [ #  # ][ #  # ]:          0 : class SVX_DLLPUBLIC E3dLatheObj : public E3dCompoundObject
      46                 :            : {
      47                 :            : private:
      48                 :            :     // Part codes for Wireframe generation: standard oder cover surface
      49                 :            :     enum { LATHE_PART_STD = 1, LATHE_PART_COVER = 2 };
      50                 :            :     basegfx::B2DPolyPolygon maPolyPoly2D;
      51                 :            : 
      52                 :            :  protected:
      53                 :            :     virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
      54                 :            :     virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties();
      55                 :            :     void SetDefaultAttributes(E3dDefaultAttributes& rDefault);
      56                 :            : 
      57                 :            :  public:
      58                 :            :     TYPEINFO();
      59                 :            :     E3dLatheObj(E3dDefaultAttributes& rDefault, const basegfx::B2DPolyPolygon rPoly2D);
      60                 :            :     E3dLatheObj();
      61                 :            : 
      62                 :            :     // HorizontalSegments:
      63                 :          0 :     sal_uInt32 GetHorizontalSegments() const
      64                 :          0 :         { return ((const Svx3DHorizontalSegmentsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue(); }
      65                 :            : 
      66                 :            :     // VerticalSegments:
      67                 :          0 :     sal_uInt32 GetVerticalSegments() const
      68                 :          0 :         { return ((const Svx3DVerticalSegmentsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue(); }
      69                 :            : 
      70                 :            :     // PercentDiagonal: 0..100, before 0.0..0.5
      71                 :          0 :     sal_uInt16 GetPercentDiagonal() const
      72                 :          0 :         { return ((const Svx3DPercentDiagonalItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue(); }
      73                 :            : 
      74                 :            :     // BackScale: 0..100, before 0.0..1.0
      75                 :          0 :     sal_uInt16 GetBackScale() const
      76                 :          0 :         { return ((const Svx3DBackscaleItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue(); }
      77                 :            : 
      78                 :            :     // EndAngle: 0..10000
      79                 :          0 :     sal_uInt32 GetEndAngle() const
      80                 :          0 :         { return ((const Svx3DEndAngleItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_END_ANGLE)).GetValue(); }
      81                 :            : 
      82                 :            :     // #107245# GetSmoothNormals() for bLatheSmoothed
      83                 :          0 :     sal_Bool GetSmoothNormals() const
      84                 :          0 :         { return ((const Svx3DSmoothNormalsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_NORMALS)).GetValue(); }
      85                 :            : 
      86                 :            :     // #107245# GetSmoothLids() for bLatheSmoothFrontBack
      87                 :          0 :     sal_Bool GetSmoothLids() const
      88                 :          0 :         { return ((const Svx3DSmoothLidsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_SMOOTH_LIDS)).GetValue(); }
      89                 :            : 
      90                 :            :     // #107245# GetCharacterMode() for bLatheCharacterMode
      91                 :          0 :     sal_Bool GetCharacterMode() const
      92                 :          0 :         { return ((const Svx3DCharacterModeItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_CHARACTER_MODE)).GetValue(); }
      93                 :            : 
      94                 :            :     // #107245# GetCloseFront() for bLatheCloseFront
      95                 :          0 :     sal_Bool GetCloseFront() const
      96                 :          0 :         { return ((const Svx3DCloseFrontItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_FRONT)).GetValue(); }
      97                 :            : 
      98                 :            :     // #107245# GetCloseBack() for bLatheCloseBack
      99                 :          0 :     sal_Bool GetCloseBack() const
     100                 :          0 :         { return ((const Svx3DCloseBackItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_CLOSE_BACK)).GetValue(); }
     101                 :            : 
     102                 :            :     virtual sal_uInt16 GetObjIdentifier() const;
     103                 :            : 
     104                 :            :     virtual E3dLatheObj* Clone() const;
     105                 :            : 
     106                 :            :     virtual SdrObject* DoConvertToPolyObj(sal_Bool bBezier) const;
     107                 :            : 
     108                 :            :     // TakeObjName...() is for the display in the UI, for example "3 frames selected".
     109                 :            :     virtual void TakeObjNameSingul(String& rName) const;
     110                 :            :     virtual void TakeObjNamePlural(String& rName) const;
     111                 :            : 
     112                 :            :     // set/get local parameters with geometry recreation
     113                 :            :     void SetPolyPoly2D(const basegfx::B2DPolyPolygon& rNew);
     114                 :          0 :     const basegfx::B2DPolyPolygon& GetPolyPoly2D() { return maPolyPoly2D; }
     115                 :            : 
     116                 :            :     // break up
     117                 :            :     virtual sal_Bool IsBreakObjPossible();
     118                 :            :     virtual SdrAttrObj* GetBreakObj();
     119                 :            : };
     120                 :            : 
     121                 :            : #endif          // _E3D_LATHE3D_HXX
     122                 :            : 
     123                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10