IWORKTableRecorder.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libetonyek 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 #ifndef IWORKTABLERECORDER_H_INCLUDED
11 #define IWORKTABLERECORDER_H_INCLUDED
12
13 #include <memory>
14
15 #include <boost/optional.hpp>
16
17 #include "IWORKStyle_fwd.h"
18 #include "IWORKTable.h"
19 #include "IWORKTypes.h"
20
21 namespace libetonyek
22 {
23
24 class IWORKText;
25
26 class IWORKTableRecorder
27 {
28 public:
29 IWORKTableRecorder();
30
31 void replay(IWORKTable &table) const;
32
33 void setSize(unsigned columns, unsigned rows);
34 void setHeaders(unsigned headerColumns, unsigned headerRows, unsigned footerRows);
35 void setBandedRows(bool banded);
36 void setRepeated(bool columns, bool rows);
37
38 void setOrder(int order);
39 void setStyle(const IWORKStylePtr_t &style);
40 void setSizes(const IWORKColumnSizes_t &columnSizes, const IWORKRowSizes_t &rowSizes);
41 void setBorders(const IWORKGridLineMap_t &verticalLines, const IWORKGridLineMap_t &horizontalLines);
42 void setBorders(const IWORKGridLineMap_t &verticalLeftLines, const IWORKGridLineMap_t &verticalRightLines,
43 const IWORKGridLineMap_t &horizontalTopLines, const IWORKGridLineMap_t &horizontalBottomLines);
44 void insertCell(unsigned column, unsigned row, const boost::optional<std::string> &value, const std::shared_ptr<IWORKText> &content, const boost::optional<IWORKDateTimeData> &dateTime, unsigned columnSpan, unsigned rowSpan, const IWORKFormulaPtr_t &formula, const boost::optional<unsigned> &formulaHC, const IWORKStylePtr_t &style, IWORKCellType type);
45 void insertCoveredCell(unsigned column, unsigned row);
46
47 void setDefaultCellStyle(IWORKTable::CellType type, const IWORKStylePtr_t &style);
48 void setDefaultLayoutStyle(IWORKTable::CellType type, const IWORKStylePtr_t &style);
49 void setDefaultParagraphStyle(IWORKTable::CellType type, const IWORKStylePtr_t &style);
50
51 private:
52 struct Impl;
53
54 private:
55 std::shared_ptr<Impl> m_impl;
56 };
57
58 }
59
60 #endif // IWORKTABLERECORDER_H_INCLUDED
61
62 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::IWORKTable::CellType
CellType
Definition: IWORKTable.h:51
IWORKStyle_fwd.h
libetonyek
Definition: IWORKBezierElement.cpp:20
libetonyek::IWORKTableRecorder::Impl
Definition: IWORKTableRecorder.cpp:314
libetonyek::IWORKTableRecorder::setSize
void setSize(unsigned columns, unsigned rows)
Definition: IWORKTableRecorder.cpp:338
libetonyek::IWORKTableRecorder::setRepeated
void setRepeated(bool columns, bool rows)
Definition: IWORKTableRecorder.cpp:353
libetonyek::IWORKTableRecorder::insertCell
void insertCell(unsigned column, unsigned row, const boost::optional< std::string > &value, const std::shared_ptr< IWORKText > &content, const boost::optional< IWORKDateTimeData > &dateTime, unsigned columnSpan, unsigned rowSpan, const IWORKFormulaPtr_t &formula, const boost::optional< unsigned > &formulaHC, const IWORKStylePtr_t &style, IWORKCellType type)
Definition: IWORKTableRecorder.cpp:385
libetonyek::IWORKTableRecorder::setBandedRows
void setBandedRows(bool banded)
Definition: IWORKTableRecorder.cpp:348
libetonyek::IWORKToken::content
Definition: IWORKToken.h:163
libetonyek::IWORKTableRecorder::setStyle
void setStyle(const IWORKStylePtr_t &style)
Definition: IWORKTableRecorder.cpp:363
libetonyek::IWORKStylePtr_t
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
libetonyek::PAG1Token::order
Definition: PAG1Token.h:43
libetonyek::IWORKToken::value
Definition: IWORKToken.h:624
libetonyek::IWORKTableRecorder::setBorders
void setBorders(const IWORKGridLineMap_t &verticalLines, const IWORKGridLineMap_t &horizontalLines)
Definition: IWORKTableRecorder.cpp:373
libetonyek::IWORKTableRecorder::m_impl
std::shared_ptr< Impl > m_impl
Definition: IWORKTableRecorder.h:52
libetonyek::IWORKTableRecorder::setDefaultCellStyle
void setDefaultCellStyle(IWORKTable::CellType type, const IWORKStylePtr_t &style)
Definition: IWORKTableRecorder.cpp:395
libetonyek::KEY1Token::table
Definition: KEY1Token.h:198
libetonyek::IWORKTableRecorder::IWORKTableRecorder
IWORKTableRecorder()
Definition: IWORKTableRecorder.cpp:326
libetonyek::IWORKRowSizes_t
std::deque< IWORKColumnRowSize > IWORKRowSizes_t
Definition: IWORKTypes_fwd.h:26
libetonyek::IWORKToken::style
Definition: IWORKToken.h:414
libetonyek::IWORKColumnSizes_t
std::deque< IWORKColumnRowSize > IWORKColumnSizes_t
Definition: IWORKTypes_fwd.h:22
libetonyek::IWORKToken::rows
Definition: IWORKToken.h:385
libetonyek::IWORKTableRecorder::setDefaultLayoutStyle
void setDefaultLayoutStyle(IWORKTable::CellType type, const IWORKStylePtr_t &style)
Definition: IWORKTableRecorder.cpp:400
libetonyek::IWORKTableRecorder
Definition: IWORKTableRecorder.h:26
libetonyek::IWORKFormulaPtr_t
std::shared_ptr< IWORKFormula > IWORKFormulaPtr_t
Definition: IWORKTypes.h:123
libetonyek::IWORKToken::columns
Definition: IWORKToken.h:154
libetonyek::IWORKGridLineMap_t
std::map< unsigned, IWORKGridLine_t > IWORKGridLineMap_t
Definition: IWORKTypes.h:122
libetonyek::IWORKTableRecorder::setHeaders
void setHeaders(unsigned headerColumns, unsigned headerRows, unsigned footerRows)
Definition: IWORKTableRecorder.cpp:343
libetonyek::IWORKTableRecorder::setSizes
void setSizes(const IWORKColumnSizes_t &columnSizes, const IWORKRowSizes_t &rowSizes)
Definition: IWORKTableRecorder.cpp:368
IWORKTable.h
libetonyek::IWORKToken::formula
Definition: IWORKToken.h:224
libetonyek::IWORKToken::column
Definition: IWORKToken.h:152
IWORKTypes.h
libetonyek::IWORKTable
Definition: IWORKTable.h:29
libetonyek::IWORKTableRecorder::insertCoveredCell
void insertCoveredCell(unsigned column, unsigned row)
Definition: IWORKTableRecorder.cpp:390
libetonyek::IWORKToken::type
Definition: IWORKToken.h:486
libetonyek::IWORKTableRecorder::setDefaultParagraphStyle
void setDefaultParagraphStyle(IWORKTable::CellType type, const IWORKStylePtr_t &style)
Definition: IWORKTableRecorder.cpp:405
libetonyek::IWORKTableRecorder::replay
void replay(IWORKTable &table) const
Definition: IWORKTableRecorder.cpp:331
libetonyek::IWORKCellType
IWORKCellType
Definition: IWORKEnum.h:79
libetonyek::IWORKToken::row
Definition: IWORKToken.h:383
libetonyek::IWORKTableRecorder::setOrder
void setOrder(int order)
Definition: IWORKTableRecorder.cpp:358