LibreOffice Module svx (master)
1
svx
source
engine3d
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/svdobjkind.hxx
>
21
#include <
svx/cube3d.hxx
>
22
#include <
svx/sphere3d.hxx
>
23
#include <
extrud3d.hxx
>
24
#include <
svx/lathe3d.hxx
>
25
#include <
polygn3d.hxx
>
26
#include <
svx/objfac3d.hxx
>
27
#include <
svx/svdobj.hxx
>
28
#include <
svx/scene3d.hxx
>
29
30
static
bool
bInit
=
false
;
31
32
E3dObjFactory::E3dObjFactory
()
33
{
34
if
( !
bInit
)
35
{
36
SdrObjFactory::InsertMakeObjectHdl
(
LINK
(
this
,
E3dObjFactory
, MakeObject));
37
bInit
=
true
;
38
}
39
}
40
41
// Generate chart internal objects
42
43
IMPL_STATIC_LINK
(
E3dObjFactory
, MakeObject,
SdrObjCreatorParams
, aParams,
rtl::Reference<SdrObject>
)
44
{
45
if
( aParams.nInventor ==
SdrInventor::E3d
)
46
{
47
switch
( aParams.nObjIdentifier )
48
{
49
case
SdrObjKind::E3D_Scene
:
50
return
new
E3dScene
(aParams.rSdrModel);
51
case
SdrObjKind::E3D_Polygon
:
52
return
new
E3dPolygonObj(aParams.rSdrModel);
53
case
SdrObjKind::E3D_Cube
:
54
return
new
E3dCubeObj
(aParams.rSdrModel);
55
case
SdrObjKind::E3D_Sphere
:
56
return
new
E3dSphereObj
(aParams.rSdrModel);
57
case
SdrObjKind::E3D_Extrusion
:
58
return
new
E3dExtrudeObj(aParams.rSdrModel);
59
case
SdrObjKind::E3D_Lathe
:
60
return
new
E3dLatheObj
(aParams.rSdrModel);
61
case
SdrObjKind::E3D_CompoundObject
:
62
return
new
E3dCompoundObject
(aParams.rSdrModel);
63
default
:
64
break
;
65
}
66
}
67
return
nullptr
;
68
}
69
70
71
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
E3dCompoundObject
Definition:
obj3d.hxx:154
E3dCubeObj
Definition:
cube3d.hxx:48
E3dLatheObj
Definition:
lathe3d.hxx:43
E3dObjFactory
Definition:
objfac3d.hxx:37
E3dObjFactory::E3dObjFactory
E3dObjFactory()
Definition:
objfac3d.cxx:32
E3dScene
Definition:
scene3d.hxx:58
E3dSphereObj
SphereObject with diameter r3DSize.
Definition:
sphere3d.hxx:36
SdrObjFactory::InsertMakeObjectHdl
static void InsertMakeObjectHdl(Link< SdrObjCreatorParams, rtl::Reference< SdrObject > > const &rLink)
Definition:
svdobj.cxx:3421
rtl::Reference< SdrObject >
cube3d.hxx
extrud3d.hxx
lathe3d.hxx
LINK
#define LINK(Instance, Class, Member)
bInit
static bool bInit
Definition:
objfac3d.cxx:30
IMPL_STATIC_LINK
IMPL_STATIC_LINK(E3dObjFactory, MakeObject, SdrObjCreatorParams, aParams, rtl::Reference< SdrObject >)
Definition:
objfac3d.cxx:43
objfac3d.hxx
polygn3d.hxx
scene3d.hxx
sphere3d.hxx
SdrObjCreatorParams
Definition:
svdobj.hxx:1008
svdobj.hxx
SdrInventor::E3d
@ E3d
svdobjkind.hxx
SdrObjKind::E3D_Extrusion
@ E3D_Extrusion
SdrObjKind::E3D_Scene
@ E3D_Scene
SdrObjKind::E3D_Sphere
@ E3D_Sphere
SdrObjKind::E3D_Polygon
@ E3D_Polygon
SdrObjKind::E3D_Cube
@ E3D_Cube
SdrObjKind::E3D_CompoundObject
@ E3D_CompoundObject
SdrObjKind::E3D_Lathe
@ E3D_Lathe
Generated on Sun Jul 30 2023 04:27:57 for LibreOffice Module svx (master) by
1.9.3