Coverage Report

Created: 2026-04-09 11:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/svx/source/sdr/properties/connectorproperties.cxx
Line
Count
Source
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
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>
28
29
30
namespace sdr::properties
31
{
32
        // create a new itemset
33
        SfxItemSet ConnectorProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
34
14.4k
        {
35
14.4k
            return SfxItemSet(
36
14.4k
                rPool,
37
14.4k
                svl::Items<
38
                    // Ranges from SdrAttrObj, SdrEdgeObj:
39
14.4k
                    SDRATTR_START, SDRATTR_SHADOW_LAST,
40
14.4k
                    SDRATTR_MISC_FIRST, SDRATTR_EDGE_LAST,
41
14.4k
                    SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
42
14.4k
                    SDRATTR_TEXTCOLUMNS_FIRST, SDRATTR_TEXTCOLUMNS_LAST,
43
14.4k
                    SDRATTR_EDGEOOXMLCURVE_FIRST, SDRATTR_EDGEOOXMLCURVE_LAST,
44
                    // Range from SdrTextObj:
45
14.4k
                    EE_ITEMS_START, EE_ITEMS_END>);
46
14.4k
        }
47
48
        ConnectorProperties::ConnectorProperties(SdrObject& rObj)
49
12.5k
        :   TextProperties(rObj)
50
12.5k
        {
51
12.5k
        }
52
53
        ConnectorProperties::ConnectorProperties(const ConnectorProperties& rProps, SdrObject& rObj)
54
19
        :   TextProperties(rProps, rObj)
55
19
        {
56
19
        }
57
58
        ConnectorProperties::~ConnectorProperties()
59
12.5k
        {
60
12.5k
        }
61
62
        std::unique_ptr<BaseProperties> ConnectorProperties::Clone(SdrObject& rObj) const
63
19
        {
64
19
            return std::unique_ptr<BaseProperties>(new ConnectorProperties(*this, rObj));
65
19
        }
66
67
        void ConnectorProperties::ItemSetChanged(std::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich, bool bAdjustTextFrameWidthAndHeight)
68
28.0k
        {
69
28.0k
            SdrEdgeObj& rObj = static_cast<SdrEdgeObj&>(GetSdrObject());
70
71
            // call parent
72
28.0k
            TextProperties::ItemSetChanged(aChangedItems, nDeletedWhich, bAdjustTextFrameWidthAndHeight);
73
74
            // local changes
75
28.0k
            rObj.ImpSetAttrToEdgeInfo();
76
28.0k
        }
77
78
        void ConnectorProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
79
                bool bBroadcast, bool bAdjustTextFrameWidthAndHeight)
80
400
        {
81
            // call parent (always first thing to do, may create the SfxItemSet)
82
400
            TextProperties::SetStyleSheet(pNewStyleSheet, bDontRemoveHardAttr, bBroadcast, bAdjustTextFrameWidthAndHeight);
83
84
            // local changes
85
400
            SdrEdgeObj& rObj = static_cast<SdrEdgeObj&>(GetSdrObject());
86
400
            rObj.ImpSetAttrToEdgeInfo();
87
400
        }
88
} // end of namespace
89
90
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */