LibreOffice Module sc (master) 1
UndoUngroupSparklines.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 SparklineUndoData(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::vector<SparklineUndoData> m_aUndoData;
41
42public:
43 UndoUngroupSparklines(ScDocShell& rDocShell, ScRange const& rRange);
44 virtual ~UndoUngroupSparklines() override;
45
46 void Undo() override;
47 void Redo() override;
48 bool CanRepeat(SfxRepeatTarget& rTarget) const override;
49 void Repeat(SfxRepeatTarget& rTarget) override;
50 OUString GetComment() const override;
51};
52
53} // namespace sc
54
55/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Undo action for ungrouping sparklines.
virtual ~UndoUngroupSparklines() override
std::vector< SparklineUndoData > m_aUndoData
void Repeat(SfxRepeatTarget &rTarget) override
OUString GetComment() const override
bool CanRepeat(SfxRepeatTarget &rTarget) const override
UndoUngroupSparklines(ScDocShell &rDocShell, ScRange const &rRange)
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 ungroupping.
SparklineUndoData(ScAddress const &rAddress, ScRangeList aDataRangeList, std::shared_ptr< sc::SparklineGroup > pGroup)
std::shared_ptr< sc::SparklineGroup > m_pSparklineGroup