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
16namespace sc
17{
20{
21 UndoGroupSparklinesData(ScAddress const& rAddress, ScRangeList const& rDataRangeList,
22 std::shared_ptr<sc::SparklineGroup> const& rpGroup)
23 : m_aAddress(rAddress)
24 , m_aDataRangeList(rDataRangeList)
25 , m_pSparklineGroup(rpGroup)
26 {
27 }
28
31 std::shared_ptr<sc::SparklineGroup> m_pSparklineGroup;
32};
33
36{
37private:
39 std::shared_ptr<sc::SparklineGroup> m_pSparklineGroup;
40 std::vector<UndoGroupSparklinesData> m_aUndoData;
41
42public:
43 UndoGroupSparklines(ScDocShell& rDocShell, ScRange const& rRange,
44 std::shared_ptr<sc::SparklineGroup> const& rpSparklineGroup);
45 virtual ~UndoGroupSparklines() override;
46
47 void Undo() override;
48 void Redo() override;
49 bool CanRepeat(SfxRepeatTarget& rTarget) const override;
50 void Repeat(SfxRepeatTarget& rTarget) override;
51 OUString GetComment() const override;
52};
53
54} // namespace sc
55
56/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Undo action for grouping sparklines.
virtual ~UndoGroupSparklines() override
std::vector< UndoGroupSparklinesData > m_aUndoData
void Repeat(SfxRepeatTarget &rTarget) override
UndoGroupSparklines(ScDocShell &rDocShell, ScRange const &rRange, std::shared_ptr< sc::SparklineGroup > const &rpSparklineGroup)
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.
Previous sparkline group data, which is restored at Undo grouping.
std::shared_ptr< sc::SparklineGroup > m_pSparklineGroup
UndoGroupSparklinesData(ScAddress const &rAddress, ScRangeList const &rDataRangeList, std::shared_ptr< sc::SparklineGroup > const &rpGroup)