LibreOffice Module svx (master)  1
objfac3d.cxx
Go to the documentation of this file.
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 #include <svx/svdpage.hxx>
21 #include <svx/globl3d.hxx>
22 #include <svx/cube3d.hxx>
23 #include <svx/sphere3d.hxx>
24 #include <svx/extrud3d.hxx>
25 #include <svx/lathe3d.hxx>
26 #include <svx/polygn3d.hxx>
27 #include <svx/objfac3d.hxx>
28 #include <svx/svdobj.hxx>
29 #include <svx/scene3d.hxx>
30 
31 static bool bInit = false;
32 
34 {
35  if ( !bInit )
36  {
38  bInit = true;
39  }
40 }
41 
43 {
44 }
45 
46 // Generate chart internal objects
47 
49 {
50  if ( aParams.nInventor == SdrInventor::E3d )
51  {
52  switch ( aParams.nObjIdentifier )
53  {
54  case E3D_SCENE_ID:
55  return new E3dScene(aParams.rSdrModel);
56  case E3D_POLYGONOBJ_ID :
57  return new E3dPolygonObj(aParams.rSdrModel);
58  case E3D_CUBEOBJ_ID :
59  return new E3dCubeObj(aParams.rSdrModel);
60  case E3D_SPHEREOBJ_ID:
61  return new E3dSphereObj(aParams.rSdrModel);
62  case E3D_EXTRUDEOBJ_ID:
63  return new E3dExtrudeObj(aParams.rSdrModel);
64  case E3D_LATHEOBJ_ID:
65  return new E3dLatheObj(aParams.rSdrModel);
66  case E3D_COMPOUNDOBJ_ID:
67  return new E3dCompoundObject(aParams.rSdrModel);
68  }
69  }
70  return nullptr;
71 }
72 
73 
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const sal_uInt16 E3D_LATHEOBJ_ID
Definition: globl3d.hxx:30
const sal_uInt16 E3D_COMPOUNDOBJ_ID
Definition: globl3d.hxx:31
const sal_uInt16 E3D_POLYGONOBJ_ID
Definition: globl3d.hxx:32
static void InsertMakeObjectHdl(Link< SdrObjCreatorParams, SdrObject * > const &rLink)
Definition: svdobj.cxx:3208
const sal_uInt16 E3D_SCENE_ID
Definition: globl3d.hxx:25
SphereObject with diameter r3DSize.
Definition: sphere3d.hxx:35
const sal_uInt16 E3D_EXTRUDEOBJ_ID
Definition: globl3d.hxx:29
static bool bInit
Definition: objfac3d.cxx:31
IMPL_STATIC_LINK(E3dObjFactory, MakeObject, SdrObjCreatorParams, aParams, SdrObject *)
Definition: objfac3d.cxx:48
Abstract DrawObject.
Definition: svdobj.hxx:312
const sal_uInt16 E3D_SPHEREOBJ_ID
Definition: globl3d.hxx:28
const sal_uInt16 E3D_CUBEOBJ_ID
Definition: globl3d.hxx:27