1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: e3dproperties.cxx,v $
10 * $Revision: 1.7.226.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_svx.hxx"
33 #include <svx/sdr/properties/e3dproperties.hxx>
34 #include <svtools/itemset.hxx>
35 #include <svx/svddef.hxx>
36 #include <svx/obj3d.hxx>
38 //////////////////////////////////////////////////////////////////////////////
44 // create a new itemset
45 SfxItemSet
& E3dProperties::CreateObjectSpecificItemSet(SfxItemPool
& rPool
)
47 return *(new SfxItemSet(rPool
,
49 // ranges from SdrAttrObj
50 SDRATTR_START
, SDRATTR_SHADOW_LAST
,
51 SDRATTR_MISC_FIRST
, SDRATTR_MISC_LAST
,
52 SDRATTR_TEXTDIRECTION
, SDRATTR_TEXTDIRECTION
,
54 // ranges from E3dObject, contains object and scene because of GetMergedItemSet()
55 SDRATTR_3D_FIRST
, SDRATTR_3D_LAST
,
61 E3dProperties::E3dProperties(SdrObject
& rObj
)
62 : AttributeProperties(rObj
)
66 E3dProperties::E3dProperties(const E3dProperties
& rProps
, SdrObject
& rObj
)
67 : AttributeProperties(rProps
, rObj
)
71 E3dProperties::~E3dProperties()
75 BaseProperties
& E3dProperties::Clone(SdrObject
& rObj
) const
77 return *(new E3dProperties(*this, rObj
));
80 void E3dProperties::ItemSetChanged(const SfxItemSet
& rSet
)
82 E3dObject
& rObj
= (E3dObject
&)GetSdrObject();
85 AttributeProperties::ItemSetChanged(rSet
);
88 rObj
.StructureChanged();
91 void E3dProperties::SetStyleSheet(SfxStyleSheet
* pNewStyleSheet
, sal_Bool bDontRemoveHardAttr
)
94 AttributeProperties::SetStyleSheet(pNewStyleSheet
, bDontRemoveHardAttr
);
96 // propagate call to contained objects
97 const SdrObjList
* pSub
= ((const E3dObject
&)GetSdrObject()).GetSubList();
98 const sal_uInt32
nCount(pSub
->GetObjCount());
100 for(sal_uInt32
a(0L); a
< nCount
; a
++)
102 pSub
->GetObj(a
)->GetProperties().SetStyleSheet(pNewStyleSheet
, bDontRemoveHardAttr
);
105 } // end of namespace properties
106 } // end of namespace sdr
108 //////////////////////////////////////////////////////////////////////////////