xref: /AOO41X/main/svx/source/sdr/properties/connectorproperties.cxx (revision f6e50924346d0b8c0b07c91832a97665dd718b0c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_svx.hxx"
26 #include <svx/sdr/properties/connectorproperties.hxx>
27 #include <svl/itemset.hxx>
28 #include <svl/style.hxx>
29 #include <svx/svddef.hxx>
30 #include <editeng/eeitem.hxx>
31 #include <svx/svdoedge.hxx>
32 
33 //////////////////////////////////////////////////////////////////////////////
34 
35 namespace sdr
36 {
37     namespace properties
38     {
39         // create a new itemset
CreateObjectSpecificItemSet(SfxItemPool & rPool)40         SfxItemSet& ConnectorProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
41         {
42             return *(new SfxItemSet(rPool,
43 
44                 // range from SdrAttrObj
45                 SDRATTR_START, SDRATTR_SHADOW_LAST,
46                 SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
47                 SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
48 
49                 // range from SdrEdgeObj
50                 SDRATTR_EDGE_FIRST, SDRATTR_EDGE_LAST,
51 
52                 // range from SdrTextObj
53                 EE_ITEMS_START, EE_ITEMS_END,
54 
55                 // end
56                 0, 0));
57         }
58 
ConnectorProperties(SdrObject & rObj)59         ConnectorProperties::ConnectorProperties(SdrObject& rObj)
60         :   TextProperties(rObj)
61         {
62         }
63 
ConnectorProperties(const ConnectorProperties & rProps,SdrObject & rObj)64         ConnectorProperties::ConnectorProperties(const ConnectorProperties& rProps, SdrObject& rObj)
65         :   TextProperties(rProps, rObj)
66         {
67         }
68 
~ConnectorProperties()69         ConnectorProperties::~ConnectorProperties()
70         {
71         }
72 
Clone(SdrObject & rObj) const73         BaseProperties& ConnectorProperties::Clone(SdrObject& rObj) const
74         {
75             return *(new ConnectorProperties(*this, rObj));
76         }
77 
ItemSetChanged(const SfxItemSet & rSet)78         void ConnectorProperties::ItemSetChanged(const SfxItemSet& rSet)
79         {
80             SdrEdgeObj& rObj = (SdrEdgeObj&)GetSdrObject();
81 
82             // call parent
83             TextProperties::ItemSetChanged(rSet);
84 
85             // local changes
86             rObj.ImpSetAttrToEdgeInfo();
87         }
88 
SetStyleSheet(SfxStyleSheet * pNewStyleSheet,sal_Bool bDontRemoveHardAttr)89         void ConnectorProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr)
90         {
91             SdrEdgeObj& rObj = (SdrEdgeObj&)GetSdrObject();
92 
93             // call parent
94             TextProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
95 
96             // local changes
97             rObj.ImpSetAttrToEdgeInfo();
98         }
99     } // end of namespace properties
100 } // end of namespace sdr
101 
102 //////////////////////////////////////////////////////////////////////////////
103 // eof
104