tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / svx / source / sdr / properties / connectorproperties.cxx
blobe5e29de759791f5c5188e6082711827248e4299a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 <sal/config.h>
22 #include <sdr/properties/connectorproperties.hxx>
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>
30 namespace sdr::properties
32 // create a new itemset
33 SfxItemSet ConnectorProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
35 return SfxItemSet(
36 rPool,
37 svl::Items<
38 // Ranges from SdrAttrObj, SdrEdgeObj:
39 SDRATTR_START, SDRATTR_SHADOW_LAST,
40 SDRATTR_MISC_FIRST, SDRATTR_EDGE_LAST,
41 SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
42 SDRATTR_TEXTCOLUMNS_FIRST, SDRATTR_TEXTCOLUMNS_LAST,
43 SDRATTR_EDGEOOXMLCURVE_FIRST, SDRATTR_EDGEOOXMLCURVE_LAST,
44 // Range from SdrTextObj:
45 EE_ITEMS_START, EE_ITEMS_END>);
48 ConnectorProperties::ConnectorProperties(SdrObject& rObj)
49 : TextProperties(rObj)
53 ConnectorProperties::ConnectorProperties(const ConnectorProperties& rProps, SdrObject& rObj)
54 : TextProperties(rProps, rObj)
58 ConnectorProperties::~ConnectorProperties()
62 std::unique_ptr<BaseProperties> ConnectorProperties::Clone(SdrObject& rObj) const
64 return std::unique_ptr<BaseProperties>(new ConnectorProperties(*this, rObj));
67 void ConnectorProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight)
69 SdrEdgeObj& rObj = static_cast<SdrEdgeObj&>(GetSdrObject());
71 // call parent
72 TextProperties::ItemSetChanged(aChangedItems, nDeletedWhich, bAdjustTextFrameWidthAndHeight);
74 // local changes
75 rObj.ImpSetAttrToEdgeInfo();
78 void ConnectorProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
79 bool bBroadcast, bool bAdjustTextFrameWidthAndHeight)
81 // call parent (always first thing to do, may create the SfxItemSet)
82 TextProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr, bBroadcast, bAdjustTextFrameWidthAndHeight);
84 // local changes
85 SdrEdgeObj& rObj = static_cast<SdrEdgeObj&>(GetSdrObject());
86 rObj.ImpSetAttrToEdgeInfo();
88 } // end of namespace
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */