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

Generated by: LCOV version 1.10