1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <svx/sdr/properties/e3dproperties.hxx>
21 #include <svl/itemset.hxx>
22 #include <svx/svddef.hxx>
23 #include <svx/obj3d.hxx>
25 //////////////////////////////////////////////////////////////////////////////
31 // create a new itemset
32 SfxItemSet
& E3dProperties::CreateObjectSpecificItemSet(SfxItemPool
& rPool
)
34 return *(new SfxItemSet(rPool
,
36 // ranges from SdrAttrObj
37 SDRATTR_START
, SDRATTR_SHADOW_LAST
,
38 SDRATTR_MISC_FIRST
, SDRATTR_MISC_LAST
,
39 SDRATTR_TEXTDIRECTION
, SDRATTR_TEXTDIRECTION
,
41 // ranges from E3dObject, contains object and scene because of GetMergedItemSet()
42 SDRATTR_3D_FIRST
, SDRATTR_3D_LAST
,
48 E3dProperties::E3dProperties(SdrObject
& rObj
)
49 : AttributeProperties(rObj
)
53 E3dProperties::E3dProperties(const E3dProperties
& rProps
, SdrObject
& rObj
)
54 : AttributeProperties(rProps
, rObj
)
58 E3dProperties::~E3dProperties()
62 BaseProperties
& E3dProperties::Clone(SdrObject
& rObj
) const
64 return *(new E3dProperties(*this, rObj
));
67 void E3dProperties::ItemSetChanged(const SfxItemSet
& rSet
)
69 E3dObject
& rObj
= (E3dObject
&)GetSdrObject();
72 AttributeProperties::ItemSetChanged(rSet
);
75 rObj
.StructureChanged();
78 void E3dProperties::SetStyleSheet(SfxStyleSheet
* pNewStyleSheet
, sal_Bool bDontRemoveHardAttr
)
81 AttributeProperties::SetStyleSheet(pNewStyleSheet
, bDontRemoveHardAttr
);
83 // propagate call to contained objects
84 const SdrObjList
* pSub
= ((const E3dObject
&)GetSdrObject()).GetSubList();
85 const sal_uInt32
nCount(pSub
->GetObjCount());
87 for(sal_uInt32
a(0L); a
< nCount
; a
++)
89 pSub
->GetObj(a
)->GetProperties().SetStyleSheet(pNewStyleSheet
, bDontRemoveHardAttr
);
92 } // end of namespace properties
93 } // end of namespace sdr
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */