tdf#48459 sw inline heading: don't apply inside frames or over 120 chars
[LibreOffice.git] / sc / inc / SparklineList.hxx
blobe9ca8591237c061c78025a52de872b97c939fe2e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
9 */
11 #pragma once
13 #include "scdllapi.h"
14 #include <memory>
15 #include <map>
17 #include "Sparkline.hxx"
18 #include "SparklineGroup.hxx"
20 namespace sc
22 /** Tracks and gathers all created sparklines and sparkline groups.
24 * All the collections of sparkline groups and sparklines don't take
25 * the ownership of the pointers.
27 class SC_DLLPUBLIC SparklineList
29 private:
30 std::vector<std::weak_ptr<SparklineGroup>> m_aSparklineGroups;
31 std::map<std::weak_ptr<SparklineGroup>, std::vector<std::weak_ptr<Sparkline>>,
32 std::owner_less<>>
33 m_aSparklineGroupMap;
35 public:
36 SparklineList();
38 void addSparkline(std::shared_ptr<Sparkline> const& pSparkline);
39 void removeSparkline(std::shared_ptr<Sparkline> const& pSparkline);
41 std::vector<std::shared_ptr<SparklineGroup>> getSparklineGroups();
43 std::vector<std::shared_ptr<Sparkline>>
44 getSparklinesFor(std::shared_ptr<SparklineGroup> const& pSparklineGroup);
47 } // end sc
49 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */