LCOV - code coverage report
Current view: top level - svx/inc/svx - deflt3d.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 9 24 37.5 %
Date: 2012-08-25 Functions: 9 25 36.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                 :            :  *
       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_DEFLT3D_HXX
      30                 :            : #define _E3D_DEFLT3D_HXX
      31                 :            : 
      32                 :            : #include <basegfx/point/b3dpoint.hxx>
      33                 :            : #include <basegfx/vector/b3dvector.hxx>
      34                 :            : #include "svx/svxdllapi.h"
      35                 :            : #include <tools/color.hxx>
      36                 :            : 
      37                 :            : /*************************************************************************
      38                 :            : |*
      39                 :            : |* Class for managing the 3D default attributes
      40                 :            : |*
      41                 :            : \************************************************************************/
      42                 :            : 
      43                 :       6116 : class SVX_DLLPUBLIC E3dDefaultAttributes
      44                 :            : {
      45                 :            : private:
      46                 :            :     // Compound object
      47                 :            :     Color               aDefaultAmbientColor;
      48                 :            :     sal_Bool                bDefaultCreateNormals;
      49                 :            :     sal_Bool                bDefaultCreateTexture;
      50                 :            : 
      51                 :            :     // Cube object
      52                 :            :     basegfx::B3DPoint   aDefaultCubePos;
      53                 :            :     basegfx::B3DVector  aDefaultCubeSize;
      54                 :            :     sal_uInt16              nDefaultCubeSideFlags;
      55                 :            :     sal_Bool                bDefaultCubePosIsCenter;
      56                 :            : 
      57                 :            :     // Sphere object
      58                 :            :     basegfx::B3DPoint   aDefaultSphereCenter;
      59                 :            :     basegfx::B3DVector  aDefaultSphereSize;
      60                 :            : 
      61                 :            :     // Lathe object
      62                 :            :     long                nDefaultLatheEndAngle;
      63                 :            :     sal_Bool                bDefaultLatheSmoothed;
      64                 :            :     sal_Bool                bDefaultLatheSmoothFrontBack;
      65                 :            :     sal_Bool                bDefaultLatheCharacterMode;
      66                 :            :     sal_Bool                bDefaultLatheCloseFront;
      67                 :            :     sal_Bool                bDefaultLatheCloseBack;
      68                 :            : 
      69                 :            :     // Extrude object
      70                 :            :     sal_Bool                bDefaultExtrudeSmoothed;
      71                 :            :     sal_Bool                bDefaultExtrudeSmoothFrontBack;
      72                 :            :     sal_Bool                bDefaultExtrudeCharacterMode;
      73                 :            :     sal_Bool                bDefaultExtrudeCloseFront;
      74                 :            :     sal_Bool                bDefaultExtrudeCloseBack;
      75                 :            : 
      76                 :            : public:
      77                 :            :     // Construktor
      78                 :            :     E3dDefaultAttributes();
      79                 :            : 
      80                 :            :     // Reset to defaults
      81                 :            :     void Reset();
      82                 :            : 
      83                 :            :     // Getter/Setter for default values of all 3D objects
      84                 :            :     // Compound object
      85                 :       1939 :     const Color& GetDefaultAmbientColor() { return aDefaultAmbientColor; }
      86                 :            :     void SetDefaultAmbientColor(const Color& rNew) { aDefaultAmbientColor = rNew; }
      87                 :            : 
      88                 :       1939 :     sal_Bool GetDefaultCreateNormals() const { return bDefaultCreateNormals; }
      89                 :            :     void SetDefaultCreateNormals(const sal_Bool bNew) { bDefaultCreateNormals = bNew; }
      90                 :       1939 :     sal_Bool GetDefaultCreateTexture() const { return bDefaultCreateTexture; }
      91                 :            :     void SetDefaultCreateTexture(const sal_Bool bNew) { bDefaultCreateTexture = bNew; }
      92                 :            : 
      93                 :            :     // Cube object
      94                 :          0 :     const basegfx::B3DPoint& GetDefaultCubePos() { return aDefaultCubePos; }
      95                 :            :     void SetDefaultCubePos(const basegfx::B3DPoint& rNew) { aDefaultCubePos = rNew; }
      96                 :          0 :     const basegfx::B3DVector& GetDefaultCubeSize() { return aDefaultCubeSize; }
      97                 :            :     void SetDefaultCubeSize(const basegfx::B3DVector& rNew) { aDefaultCubeSize = rNew; }
      98                 :          0 :     sal_uInt16 GetDefaultCubeSideFlags() const { return nDefaultCubeSideFlags; }
      99                 :            :     void SetDefaultCubeSideFlags(const sal_uInt16 nNew) { nDefaultCubeSideFlags = nNew; }
     100                 :          0 :     sal_Bool GetDefaultCubePosIsCenter() const { return bDefaultCubePosIsCenter; }
     101                 :            :     void SetDefaultCubePosIsCenter(const sal_Bool bNew) { bDefaultCubePosIsCenter = bNew; }
     102                 :            : 
     103                 :            :     // Sphere object
     104                 :          0 :     const basegfx::B3DPoint& GetDefaultSphereCenter() { return aDefaultSphereCenter; }
     105                 :            :     void SetDefaultSphereCenter(const basegfx::B3DPoint& rNew) { aDefaultSphereCenter = rNew; }
     106                 :          0 :     const basegfx::B3DVector& GetDefaultSphereSize() { return aDefaultSphereSize; }
     107                 :            :     void SetDefaultSphereSize(const basegfx::B3DPoint& rNew) { aDefaultSphereSize = rNew; }
     108                 :            : 
     109                 :            :     // Lathe object
     110                 :            :     long GetDefaultLatheEndAngle() const { return nDefaultLatheEndAngle; }
     111                 :            :     void SetDefaultLatheEndAngle(const long nNew) { nDefaultLatheEndAngle = nNew; }
     112                 :          0 :     sal_Bool GetDefaultLatheSmoothed() const { return bDefaultLatheSmoothed; }
     113                 :            :     void SetDefaultLatheSmoothed(const sal_Bool bNew) { bDefaultLatheSmoothed = bNew; }
     114                 :          0 :     sal_Bool GetDefaultLatheSmoothFrontBack() const { return bDefaultLatheSmoothFrontBack; }
     115                 :            :     void SetDefaultLatheSmoothFrontBack(const sal_Bool bNew) { bDefaultLatheSmoothFrontBack = bNew; }
     116                 :          0 :     sal_Bool GetDefaultLatheCharacterMode() const { return bDefaultLatheCharacterMode; }
     117                 :          0 :     void SetDefaultLatheCharacterMode(const sal_Bool bNew) { bDefaultLatheCharacterMode = bNew; }
     118                 :          0 :     sal_Bool GetDefaultLatheCloseFront() const { return bDefaultLatheCloseFront; }
     119                 :            :     void SetDefaultLatheCloseFront(const sal_Bool bNew) { bDefaultLatheCloseFront = bNew; }
     120                 :          0 :     sal_Bool GetDefaultLatheCloseBack() const { return bDefaultLatheCloseBack; }
     121                 :            :     void SetDefaultLatheCloseBack(const sal_Bool bNew) { bDefaultLatheCloseBack = bNew; }
     122                 :            : 
     123                 :            :     // Extrude object
     124                 :       1501 :     sal_Bool GetDefaultExtrudeSmoothed() const { return bDefaultExtrudeSmoothed; }
     125                 :            :     void SetDefaultExtrudeSmoothed(const sal_Bool bNew) { bDefaultExtrudeSmoothed = bNew; }
     126                 :       1501 :     sal_Bool GetDefaultExtrudeSmoothFrontBack() const { return bDefaultExtrudeSmoothFrontBack; }
     127                 :            :     void SetDefaultExtrudeSmoothFrontBack(const sal_Bool bNew) { bDefaultExtrudeSmoothFrontBack = bNew; }
     128                 :       1501 :     sal_Bool GetDefaultExtrudeCharacterMode() const { return bDefaultExtrudeCharacterMode; }
     129                 :          0 :     void SetDefaultExtrudeCharacterMode(const sal_Bool bNew) { bDefaultExtrudeCharacterMode = bNew; }
     130                 :       1501 :     sal_Bool GetDefaultExtrudeCloseFront() const { return bDefaultExtrudeCloseFront; }
     131                 :          0 :     void SetDefaultExtrudeCloseFront(const sal_Bool bNew) { bDefaultExtrudeCloseFront = bNew; }
     132                 :       1501 :     sal_Bool GetDefaultExtrudeCloseBack() const { return bDefaultExtrudeCloseBack; }
     133                 :          0 :     void SetDefaultExtrudeCloseBack(const sal_Bool bNew) { bDefaultExtrudeCloseBack = bNew; }
     134                 :            : };
     135                 :            : 
     136                 :            : #endif          // _E3D_DEFLT3D_HXX
     137                 :            : 
     138                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10