LibreOffice Module svx (master)  1
connectorproperties.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 <sal/config.h>
21 
23 #include <svl/itemset.hxx>
24 #include <svl/style.hxx>
25 #include <svx/svddef.hxx>
26 #include <editeng/eeitem.hxx>
27 #include <svx/svdoedge.hxx>
28 
29 
30 namespace sdr::properties
31 {
32  // create a new itemset
34  {
35  return std::make_unique<SfxItemSet>(
36  rPool,
37  svl::Items<
38  // Ranges from SdrAttrObj, SdrEdgeObj:
42  // Range from SdrTextObj:
44  }
45 
47  : TextProperties(rObj)
48  {
49  }
50 
52  : TextProperties(rProps, rObj)
53  {
54  }
55 
57  {
58  }
59 
60  std::unique_ptr<BaseProperties> ConnectorProperties::Clone(SdrObject& rObj) const
61  {
62  return std::unique_ptr<BaseProperties>(new ConnectorProperties(*this, rObj));
63  }
64 
66  {
67  SdrEdgeObj& rObj = static_cast<SdrEdgeObj&>(GetSdrObject());
68 
69  // call parent
71 
72  // local changes
73  rObj.ImpSetAttrToEdgeInfo();
74  }
75 
76  void ConnectorProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr)
77  {
78  // call parent (always first thing to do, may create the SfxItemSet)
79  TextProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
80 
81  // local changes
82  SdrEdgeObj& rObj = static_cast<SdrEdgeObj&>(GetSdrObject());
83  rObj.ImpSetAttrToEdgeInfo();
84  }
85 } // end of namespace
86 
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr) override
#define EE_ITEMS_START
#define SDRATTR_EDGE_LAST
Definition: svddef.hxx:234
virtual std::unique_ptr< SfxItemSet > CreateObjectSpecificItemSet(SfxItemPool &rPool) override
#define SDRATTR_SHADOW_LAST
Definition: svddef.hxx:178
void ImpSetAttrToEdgeInfo()
Definition: svdoedge.cxx:196
#define SDRATTR_MISC_FIRST
Definition: svddef.hxx:193
#define SDRATTR_TEXTDIRECTION
Definition: svddef.hxx:302
#define SDRATTR_START
Definition: svddef.hxx:168
Abstract DrawObject.
Definition: svdobj.hxx:312
virtual void ItemSetChanged(const SfxItemSet &rSet) override
virtual void SetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr) override
const SdrObject & GetSdrObject() const
Definition: properties.cxx:60
virtual std::unique_ptr< BaseProperties > Clone(SdrObject &rObj) const override
Utility class SdrEdgeObj.
Definition: svdoedge.hxx:128
virtual void ItemSetChanged(const SfxItemSet &rSet) override
#define EE_ITEMS_END