Coverage Report

Created: 2025-11-16 09:57

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/chart2/source/controller/main/DragMethod_Base.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 "DragMethod_Base.hxx"
21
#include <DrawViewWrapper.hxx>
22
#include <ChartModel.hxx>
23
#include <ObjectNameProvider.hxx>
24
#include <ObjectIdentifier.hxx>
25
26
#include <svx/ActionDescriptionProvider.hxx>
27
#include <utility>
28
#include <vcl/ptrstyle.hxx>
29
30
namespace chart
31
{
32
33
using namespace ::com::sun::star;
34
35
DragMethod_Base::DragMethod_Base( DrawViewWrapper& rDrawViewWrapper
36
                                             , OUString aObjectCID
37
                                             , const rtl::Reference<::chart::ChartModel>& xChartModel
38
                                             , ActionDescriptionProvider::ActionType eActionType )
39
0
    : SdrDragMethod( rDrawViewWrapper )
40
0
    , m_rDrawViewWrapper(rDrawViewWrapper)
41
0
    , m_aObjectCID(std::move(aObjectCID))
42
0
    , m_eActionType( eActionType )
43
0
    , m_xChartModel( xChartModel.get() )
44
0
{
45
0
    setMoveOnly(true);
46
0
}
47
DragMethod_Base::~DragMethod_Base()
48
0
{
49
0
}
50
51
rtl::Reference<::chart::ChartModel> DragMethod_Base::getChartModel() const
52
0
{
53
0
    return m_xChartModel.get();
54
0
}
55
56
OUString DragMethod_Base::getUndoDescription() const
57
0
{
58
0
    return ActionDescriptionProvider::createDescription(
59
0
                m_eActionType,
60
0
                ObjectNameProvider::getName( ObjectIdentifier::getObjectType( m_aObjectCID )));
61
0
}
62
OUString DragMethod_Base::GetSdrDragComment() const
63
0
{
64
0
    return getUndoDescription();
65
0
}
66
PointerStyle DragMethod_Base::GetSdrDragPointer() const
67
0
{
68
0
    if( IsDraggingPoints() || IsDraggingGluePoints() )
69
0
        return PointerStyle::MovePoint;
70
0
    else
71
0
        return PointerStyle::Move;
72
0
}
73
} //namespace chart
74
75
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */