LCOV - code coverage report
Current view: top level - include/svx - deflt3d.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 14 24 58.3 %
Date: 2015-06-13 12:38:46 Functions: 14 25 56.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 INCLUDED_SVX_DEFLT3D_HXX
      21             : #define INCLUDED_SVX_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       14638 : class SVX_DLLPUBLIC SAL_WARN_UNUSED E3dDefaultAttributes
      35             : {
      36             : private:
      37             :     // Compound object
      38             :     Color               aDefaultAmbientColor;
      39             :     bool                bDefaultCreateNormals;
      40             :     bool                bDefaultCreateTexture;
      41             : 
      42             :     // Cube object
      43             :     basegfx::B3DPoint   aDefaultCubePos;
      44             :     basegfx::B3DVector  aDefaultCubeSize;
      45             :     sal_uInt16          nDefaultCubeSideFlags;
      46             :     bool                bDefaultCubePosIsCenter;
      47             : 
      48             :     // Sphere object
      49             :     basegfx::B3DPoint   aDefaultSphereCenter;
      50             :     basegfx::B3DVector  aDefaultSphereSize;
      51             : 
      52             :     // Lathe object
      53             :     long                nDefaultLatheEndAngle;
      54             :     bool                bDefaultLatheSmoothed;
      55             :     bool                bDefaultLatheSmoothFrontBack;
      56             :     bool                bDefaultLatheCharacterMode;
      57             :     bool                bDefaultLatheCloseFront;
      58             :     bool                bDefaultLatheCloseBack;
      59             : 
      60             :     // Extrude object
      61             :     bool                bDefaultExtrudeSmoothed;
      62             :     bool                bDefaultExtrudeSmoothFrontBack;
      63             :     bool                bDefaultExtrudeCharacterMode;
      64             :     bool                bDefaultExtrudeCloseFront;
      65             :     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        4894 :     const Color& GetDefaultAmbientColor() { return aDefaultAmbientColor; }
      77             :     void SetDefaultAmbientColor(const Color& rNew) { aDefaultAmbientColor = rNew; }
      78             : 
      79        4894 :     bool GetDefaultCreateNormals() const { return bDefaultCreateNormals; }
      80             :     void SetDefaultCreateNormals(const bool bNew) { bDefaultCreateNormals = bNew; }
      81        4894 :     bool GetDefaultCreateTexture() const { return bDefaultCreateTexture; }
      82             :     void SetDefaultCreateTexture(const 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 :     bool GetDefaultCubePosIsCenter() const { return bDefaultCubePosIsCenter; }
      92             :     void SetDefaultCubePosIsCenter(const 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         252 :     bool GetDefaultLatheSmoothed() const { return bDefaultLatheSmoothed; }
     104             :     void SetDefaultLatheSmoothed(const bool bNew) { bDefaultLatheSmoothed = bNew; }
     105         252 :     bool GetDefaultLatheSmoothFrontBack() const { return bDefaultLatheSmoothFrontBack; }
     106             :     void SetDefaultLatheSmoothFrontBack(const bool bNew) { bDefaultLatheSmoothFrontBack = bNew; }
     107         252 :     bool GetDefaultLatheCharacterMode() const { return bDefaultLatheCharacterMode; }
     108           0 :     void SetDefaultLatheCharacterMode(const bool bNew) { bDefaultLatheCharacterMode = bNew; }
     109         252 :     bool GetDefaultLatheCloseFront() const { return bDefaultLatheCloseFront; }
     110             :     void SetDefaultLatheCloseFront(const bool bNew) { bDefaultLatheCloseFront = bNew; }
     111         252 :     bool GetDefaultLatheCloseBack() const { return bDefaultLatheCloseBack; }
     112             :     void SetDefaultLatheCloseBack(const bool bNew) { bDefaultLatheCloseBack = bNew; }
     113             : 
     114             :     // Extrude object
     115        4168 :     bool GetDefaultExtrudeSmoothed() const { return bDefaultExtrudeSmoothed; }
     116             :     void SetDefaultExtrudeSmoothed(const bool bNew) { bDefaultExtrudeSmoothed = bNew; }
     117        4168 :     bool GetDefaultExtrudeSmoothFrontBack() const { return bDefaultExtrudeSmoothFrontBack; }
     118             :     void SetDefaultExtrudeSmoothFrontBack(const bool bNew) { bDefaultExtrudeSmoothFrontBack = bNew; }
     119        4168 :     bool GetDefaultExtrudeCharacterMode() const { return bDefaultExtrudeCharacterMode; }
     120           0 :     void SetDefaultExtrudeCharacterMode(const bool bNew) { bDefaultExtrudeCharacterMode = bNew; }
     121        4168 :     bool GetDefaultExtrudeCloseFront() const { return bDefaultExtrudeCloseFront; }
     122           0 :     void SetDefaultExtrudeCloseFront(const bool bNew) { bDefaultExtrudeCloseFront = bNew; }
     123        4168 :     bool GetDefaultExtrudeCloseBack() const { return bDefaultExtrudeCloseBack; }
     124           0 :     void SetDefaultExtrudeCloseBack(const bool bNew) { bDefaultExtrudeCloseBack = bNew; }
     125             : };
     126             : 
     127             : #endif // INCLUDED_SVX_DEFLT3D_HXX
     128             : 
     129             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11