5 #include "Chartsheet.h"
6 #include "SimpleXlsxDef.h"
12 namespace SimpleXlsx {
18 static const size_t BUILT_IN_STYLES_NUMBER = 164;
19 static const size_t STYLE_LINK_NUMBER = 4;
22 STYLE_LINK_BORDER = 0,
34 std::vector<NumFormat>
nums;
40 std::vector< std::pair<std::pair<EAlignHoriz, EAlignVert>,
bool> >
stylePos;
67 std::vector< std::pair<std::pair<EAlignHoriz, EAlignVert>,
bool> >
GetPositions()
const {
return stylePos; }
76 std::vector<size_t> styleLinks(STYLE_LINK_NUMBER);
80 for (
size_t i = 0; i <
borders.size(); i++) {
83 styleLinks[STYLE_LINK_BORDER] = i;
91 styleLinks[STYLE_LINK_BORDER] =
borders.size() - 1;
96 for (
size_t i = 0; i <
fonts.size(); i++) {
99 styleLinks[STYLE_LINK_FONT] = i;
107 styleLinks[STYLE_LINK_FONT] =
fonts.size() - 1;
112 for (
size_t i = 0; i <
fills.size(); i++) {
115 styleLinks[STYLE_LINK_FILL] = i;
123 styleLinks[STYLE_LINK_FILL] =
fills.size() - 1;
128 for (
size_t i = 0; i <
nums.size(); i++) {
131 styleLinks[STYLE_LINK_NUM_FORMAT] = i;
138 if (style.
numFormat.
id >= BUILT_IN_STYLES_NUMBER) {
139 styleLinks[STYLE_LINK_NUM_FORMAT] =
fmtLastId;
143 styleLinks[STYLE_LINK_NUM_FORMAT] =
nums.size();
158 std::pair<std::pair<EAlignHoriz, EAlignVert>,
bool> pos;
177 std::map<_tstring, uint64_t>m_sharedStrings;
178 std::vector<Comment> m_comments;
192 CWorksheet&
AddSheet(
const _tstring& title, uint32_t frozenWidth, uint32_t frozenHeight);
193 CWorksheet&
AddSheet(
const _tstring& title, uint32_t frozenWidth, uint32_t frozenHeight, std::vector<ColumnWidth>& colWidths);
198 bool Save(
const _tstring& name);
217 void AddFonts(xmlw::XmlStream& stream)
const;
218 void AddFills(xmlw::XmlStream& stream)
const;
219 void AddBorders(xmlw::XmlStream& stream)
const;
230 #endif // __WORKBOOK_H__