OpenXLSX 1.12.1
Modern C++ Excel Library (Fork of OpenXLSX by Kenneth Troldal Balslev)
Loading...
Searching...
No Matches
XLChartsheet.hpp
Go to the documentation of this file.
1/*
2 * OpenXLSX-NX - Modern High-Performance C++ Excel Library
3 *
4 * Original work Copyright (c) 2018-2025, Kenneth Troldal Balslev and OpenXLSX contributors
5 * Modified work Copyright (c) 2026, Curry Tang and OpenXLSX-NX contributors
6 *
7 * Distributed under the BSD 3-Clause License.
8 * See LICENSE.md in the project root or https://opensource.org/licenses/BSD-3-Clause
9 */
10
11#ifndef OPENXLSX_XLCHARTSHEET_HPP
12#define OPENXLSX_XLCHARTSHEET_HPP
13
14#include "OpenXLSX-Exports.hpp"
15#include "XLChart.hpp"
16#include "XLDrawing.hpp"
17#include "XLSheetBase.hpp"
18
19namespace OpenXLSX
20{
24 class OPENXLSX_EXPORT XLChartsheet final : public XLSheetBase<XLChartsheet>
25 {
26 friend class XLSheetBase<XLChartsheet>;
27
28 public:
29 XLChartsheet() : XLSheetBase(nullptr) {};
30 explicit XLChartsheet(XLXmlData* xmlData);
31 XLChartsheet(const XLChartsheet& other) = default;
32 XLChartsheet(XLChartsheet&& other) noexcept = default;
34
35 XLChartsheet& operator=(const XLChartsheet& other) = default;
36 XLChartsheet& operator=(XLChartsheet&& other) noexcept = default;
37
44 XLChart addChart(XLChartType type, std::string_view name);
45
51
52 private:
53 XLColor getColor_impl() const;
54 void setColor_impl(const XLColor& color);
55 bool isSelected_impl() const;
56 void setSelected_impl(bool selected);
57 bool isActive_impl() const { return false; }
58 bool setActive_impl() { return true; }
59
60 uint16_t sheetXmlNumber() const;
61
62 XLRelationships m_relationships{};
63 XLDrawing m_drawing{};
64 };
65} // namespace OpenXLSX
66
67#endif
Definition XLChart.hpp:261
Class representing an Excel chartsheet.
Definition XLChartsheet.hpp:25
XLChartsheet()
Definition XLChartsheet.hpp:29
XLRelationships & relationships()
Definition XLChartsheet.cpp:39
XLChartsheet(const XLChartsheet &other)=default
XLChartsheet & operator=(const XLChartsheet &other)=default
XLDrawing & drawing()
Get the underlying drawing for this chartsheet.
Definition XLChartsheet.cpp:46
XLChart addChart(XLChartType type, std::string_view name)
Add or replace the chart in this chartsheet.
Definition XLChartsheet.cpp:91
XLChartsheet & operator=(XLChartsheet &&other) noexcept=default
XLChartsheet(XLChartsheet &&other) noexcept=default
Definition XLColor.hpp:32
The XLDrawing class is the base class for worksheet drawings (images, charts, etc....
Definition XLDrawing.hpp:398
Definition XLRelationships.hpp:150
std::string name() const
Definition XLSheetBase.hpp:201
XLColor color() const
Definition XLSheetBase.hpp:166
XLSheetBase()
Definition XLSheetBase.hpp:69
The XLXmlData class encapsulates the properties and behaviour of the .xml files in an ....
Definition XLXmlData.hpp:79
Definition IXLCellProvider.hpp:24
XLChartType
Definition XLChart.hpp:24