Branch data 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 : : #include <svx/sdr/properties/e3dproperties.hxx>
21 : : #include <svl/itemset.hxx>
22 : : #include <svx/svddef.hxx>
23 : : #include <svx/obj3d.hxx>
24 : :
25 : : //////////////////////////////////////////////////////////////////////////////
26 : :
27 : : namespace sdr
28 : : {
29 : : namespace properties
30 : : {
31 : : // create a new itemset
32 : 2675 : SfxItemSet& E3dProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
33 : : {
34 : : return *(new SfxItemSet(rPool,
35 : :
36 : : // ranges from SdrAttrObj
37 : : SDRATTR_START, SDRATTR_SHADOW_LAST,
38 : : SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
39 : : SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
40 : :
41 : : // ranges from E3dObject, contains object and scene because of GetMergedItemSet()
42 : : SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
43 : :
44 : : // end
45 [ + - ]: 2675 : 0, 0));
46 : : }
47 : :
48 : 2675 : E3dProperties::E3dProperties(SdrObject& rObj)
49 : 2675 : : AttributeProperties(rObj)
50 : : {
51 : 2675 : }
52 : :
53 : 0 : E3dProperties::E3dProperties(const E3dProperties& rProps, SdrObject& rObj)
54 : 0 : : AttributeProperties(rProps, rObj)
55 : : {
56 : 0 : }
57 : :
58 : 2675 : E3dProperties::~E3dProperties()
59 : : {
60 [ - + ]: 2675 : }
61 : :
62 : 0 : BaseProperties& E3dProperties::Clone(SdrObject& rObj) const
63 : : {
64 [ # # ]: 0 : return *(new E3dProperties(*this, rObj));
65 : : }
66 : :
67 : 7767 : void E3dProperties::ItemSetChanged(const SfxItemSet& rSet)
68 : : {
69 : 7767 : E3dObject& rObj = (E3dObject&)GetSdrObject();
70 : :
71 : : // call parent
72 : 7767 : AttributeProperties::ItemSetChanged(rSet);
73 : :
74 : : // local changes
75 : 7767 : rObj.StructureChanged();
76 : 7767 : }
77 : :
78 : 1939 : void E3dProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr)
79 : : {
80 : : // call parent
81 : 1939 : AttributeProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
82 : :
83 : : // propagate call to contained objects
84 : 1939 : const SdrObjList* pSub = ((const E3dObject&)GetSdrObject()).GetSubList();
85 : 1939 : const sal_uInt32 nCount(pSub->GetObjCount());
86 : :
87 [ - + ]: 1939 : for(sal_uInt32 a(0L); a < nCount; a++)
88 : : {
89 : 0 : pSub->GetObj(a)->GetProperties().SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
90 : : }
91 : 1939 : }
92 : : } // end of namespace properties
93 : : } // end of namespace sdr
94 : :
95 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|