LibreOffice Module chart2 (master) 1
DragMethod_Base.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 "DragMethod_Base.hxx"
21#include <DrawViewWrapper.hxx>
22#include <ChartModel.hxx>
24#include <ObjectIdentifier.hxx>
25
27#include <utility>
28#include <vcl/ptrstyle.hxx>
29
30namespace chart
31{
32
33using namespace ::com::sun::star;
34
36 , OUString aObjectCID
37 , const rtl::Reference<::chart::ChartModel>& xChartModel
39 : SdrDragMethod( rDrawViewWrapper )
40 , m_rDrawViewWrapper(rDrawViewWrapper)
41 , m_aObjectCID(std::move(aObjectCID))
42 , m_eActionType( eActionType )
43 , m_xChartModel( xChartModel.get() )
44{
45 setMoveOnly(true);
46}
48{
49}
50
52{
53 return m_xChartModel.get();
54}
55
57{
61}
63{
64 return getUndoDescription();
65}
67{
69 return PointerStyle::MovePoint;
70 else
71 return PointerStyle::Move;
72}
73} //namespace chart
74
75/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static OUString createDescription(ActionType eActionType, std::u16string_view rObjectName)
bool IsDraggingPoints() const
void setMoveOnly(bool bNew)
bool IsDraggingGluePoints() const
unotools::WeakReference<::chart::ChartModel > m_xChartModel
OUString getUndoDescription() const
virtual PointerStyle GetSdrDragPointer() const override
virtual OUString GetSdrDragComment() const override
DragMethod_Base(DrawViewWrapper &rDrawViewWrapper, OUString aObjectCID, const rtl::Reference<::chart::ChartModel > &xChartModel, ActionDescriptionProvider::ActionType eActionType=ActionDescriptionProvider::ActionType::Move)
ActionDescriptionProvider::ActionType m_eActionType
rtl::Reference<::chart::ChartModel > getChartModel() const
virtual ~DragMethod_Base() override
ObjectType getObjectType() const
static OUString getName(ObjectType eObjectType, bool bPlural=false)
rtl::Reference< interface_type > SAL_CALL get() const
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
PointerStyle