LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/include/svx - cube3d.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 4 0.0 %
Date: 2013-07-09 Functions: 0 6 0.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_CUBE3D_HXX
      21             : #define _E3D_CUBE3D_HXX
      22             : 
      23             : #include <svx/obj3d.hxx>
      24             : #include "svx/svxdllapi.h"
      25             : 
      26             : /*************************************************************************
      27             : |*
      28             : |*                                                              |
      29             : |* Create a 3D cuboid; aPos: Center oder left, bottom, behind   |__
      30             : |*                           (depending on bPosIsCenter)       /
      31             : |* nSideFlags indicates, if only some of the cuboid surfaces can
      32             : |* be created; the corresponding bits are defined in the enum.
      33             : |* The flag bDblSided indicates whether the created surfaces are
      34             : |* two-sided (which only makes sense if not all of the surfaces were
      35             : |* created).
      36             : |*
      37             : \************************************************************************/
      38             : 
      39             : enum { CUBE_BOTTOM = 0x0001, CUBE_BACK = 0x0002, CUBE_LEFT = 0x0004,
      40             :        CUBE_TOP = 0x0008, CUBE_RIGHT = 0x0010, CUBE_FRONT = 0x0020,
      41             :        CUBE_FULL = 0x003F, CUBE_OPEN_TB = 0x0036, CUBE_OPEN_LR = 0x002B,
      42             :        CUBE_OPEN_FB = 0x001D };
      43             : 
      44           0 : class SVX_DLLPUBLIC E3dCubeObj : public E3dCompoundObject
      45             : {
      46             : private:
      47             :     // Parameter
      48             :     basegfx::B3DPoint                   aCubePos;
      49             :     basegfx::B3DVector                  aCubeSize;
      50             :     sal_uInt16                              nSideFlags;
      51             : 
      52             :     // BOOLeans
      53             :     unsigned                            bPosIsCenter : 1;
      54             : 
      55             : protected:
      56             :     void SetDefaultAttributes(E3dDefaultAttributes& rDefault);
      57             :     virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
      58             : 
      59             : public:
      60             :     TYPEINFO();
      61             :     E3dCubeObj(E3dDefaultAttributes& rDefault, basegfx::B3DPoint aPos, const basegfx::B3DVector& r3DSize);
      62             :     E3dCubeObj();
      63             : 
      64             :     virtual sal_uInt16 GetObjIdentifier() const;
      65             :     virtual SdrObject* DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const;
      66             : 
      67             :     virtual E3dCubeObj* Clone() const;
      68             : 
      69             :     // Set local parameters with geometry recreation
      70             :     void SetCubePos(const basegfx::B3DPoint& rNew);
      71           0 :     const basegfx::B3DPoint& GetCubePos() { return aCubePos; }
      72             : 
      73             :     void SetCubeSize(const basegfx::B3DVector& rNew);
      74           0 :     const basegfx::B3DVector& GetCubeSize() { return aCubeSize; }
      75             : 
      76             :     void SetPosIsCenter(sal_Bool bNew);
      77           0 :     sal_Bool GetPosIsCenter() { return (sal_Bool)bPosIsCenter; }
      78             : 
      79             :     sal_uInt16 GetSideFlags() { return nSideFlags; }
      80             : 
      81             :     // TakeObjName...() is for the display in the UI, for example "3 frames selected".
      82             :     virtual void TakeObjNameSingul(String& rName) const;
      83             :     virtual void TakeObjNamePlural(String& rName) const;
      84             : };
      85             : 
      86             : #endif          // _E3D_CUBE3D_HXX
      87             : 
      88             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10