LibreOffice Module sc (master) 1
UndoGroupSparklines.hxx
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 */
10
11#pragma once
12
13#include <undobase.hxx>
14#include <memory>
15#include <utility>
16
17namespace sc
18{
21{
22 UndoGroupSparklinesData(ScAddress const& rAddress, ScRangeList aDataRangeList,
23 std::shared_ptr<sc::SparklineGroup> pGroup)
24 : m_aAddress(rAddress)
25 , m_aDataRangeList(std::move(aDataRangeList))
26 , m_pSparklineGroup(std::move(pGroup))
27 {
28 }
29
32 std::shared_ptr<sc::SparklineGroup> m_pSparklineGroup;
33};
34
37{
38private:
40 std::shared_ptr<sc::SparklineGroup> m_pSparklineGroup;
41 std::vector<UndoGroupSparklinesData> m_aUndoData;
42
43public:
44 UndoGroupSparklines(ScDocShell& rDocShell, ScRange const& rRange,
45 std::shared_ptr<sc::SparklineGroup> pSparklineGroup);
46 virtual ~UndoGroupSparklines() override;
47
48 void Undo() override;
49 void Redo() override;
50 bool CanRepeat(SfxRepeatTarget& rTarget) const override;
51 void Repeat(SfxRepeatTarget& rTarget) override;
52 OUString GetComment() const override;
53};
54
55} // namespace sc
56
57/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Undo action for grouping sparklines.
virtual ~UndoGroupSparklines() override
std::vector< UndoGroupSparklinesData > m_aUndoData
UndoGroupSparklines(ScDocShell &rDocShell, ScRange const &rRange, std::shared_ptr< sc::SparklineGroup > pSparklineGroup)
void Repeat(SfxRepeatTarget &rTarget) override
bool CanRepeat(SfxRepeatTarget &rTarget) const override
OUString GetComment() const override
std::shared_ptr< sc::SparklineGroup > m_pSparklineGroup
CAUTION! The following defines must be in the same namespace as the respective type.
Definition: broadcast.cxx:15
Previous sparkline group data, which is restored at Undo grouping.
UndoGroupSparklinesData(ScAddress const &rAddress, ScRangeList aDataRangeList, std::shared_ptr< sc::SparklineGroup > pGroup)
std::shared_ptr< sc::SparklineGroup > m_pSparklineGroup