1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
13 #include <undobase.hxx>
19 /** Previous sparkline group data, which is restored at Undo grouping */
20 struct UndoGroupSparklinesData
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
))
31 ScRangeList m_aDataRangeList
;
32 std::shared_ptr
<sc::SparklineGroup
> m_pSparklineGroup
;
35 /** Undo action for grouping sparklines */
36 class UndoGroupSparklines
: public ScSimpleUndo
40 std::shared_ptr
<sc::SparklineGroup
> m_pSparklineGroup
;
41 std::vector
<UndoGroupSparklinesData
> m_aUndoData
;
44 UndoGroupSparklines(ScDocShell
& rDocShell
, ScRange
const& rRange
,
45 std::shared_ptr
<sc::SparklineGroup
> pSparklineGroup
);
46 virtual ~UndoGroupSparklines() override
;
50 bool CanRepeat(SfxRepeatTarget
& rTarget
) const override
;
51 void Repeat(SfxRepeatTarget
& rTarget
) override
;
52 OUString
GetComment() const override
;
57 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */