IWORKTableRecorder.h Source File documentation

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 setStyle(const IWORKStylePtr_t &style);
39 void setSizes(const IWORKColumnSizes_t &columnSizes, const IWORKRowSizes_t &rowSizes);
40 void setBorders(const IWORKGridLineMap_t &verticalLines, const IWORKGridLineMap_t &horizontalLines);
41 void insertCell(unsigned column, unsigned row, const boost::optional<std::string> &value, const std::shared_ptr<IWORKText> &content, unsigned columnSpan, unsigned rowSpan, const boost::optional<IWORKFormula> &formula, const IWORKStylePtr_t &style, IWORKCellType type);
42 void insertCoveredCell(unsigned column, unsigned row);
43
44 void setDefaultCellStyle(IWORKTable::CellType type, const IWORKStylePtr_t &style);
45 void setDefaultLayoutStyle(IWORKTable::CellType type, const IWORKStylePtr_t &style);
46 void setDefaultParagraphStyle(IWORKTable::CellType type, const IWORKStylePtr_t &style);
47
48 private:
49 struct Impl;
50
51 private:
52 std::shared_ptr<Impl> m_impl;
53 };
54
55 }
56
57 #endif // IWORKTABLERECORDER_H_INCLUDED
58
59 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::IWORKTable::CellType
CellType
Definition: IWORKTable.h:49
IWORKStyle_fwd.h
libetonyek
Definition: IWORKBezierElement.cpp:18
libetonyek::IWORKTableRecorder::Impl
Definition: IWORKTableRecorder.cpp:281
libetonyek::IWORKTableRecorder::setSize
void setSize(unsigned columns, unsigned rows)
Definition: IWORKTableRecorder.cpp:305
libetonyek::IWORKTableRecorder::setRepeated
void setRepeated(bool columns, bool rows)
Definition: IWORKTableRecorder.cpp:320
libetonyek::IWORKTableRecorder::insertCell
void insertCell(unsigned column, unsigned row, const boost::optional< std::string > &value, const std::shared_ptr< IWORKText > &content, unsigned columnSpan, unsigned rowSpan, const boost::optional< IWORKFormula > &formula, const IWORKStylePtr_t &style, IWORKCellType type)
Definition: IWORKTableRecorder.cpp:340
libetonyek::IWORKTableRecorder::setBandedRows
void setBandedRows(bool banded)
Definition: IWORKTableRecorder.cpp:315
libetonyek::IWORKToken::content
Definition: IWORKToken.h:93
libetonyek::IWORKTableRecorder::setStyle
void setStyle(const IWORKStylePtr_t &style)
Definition: IWORKTableRecorder.cpp:325
libetonyek::IWORKStylePtr_t
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
libetonyek::IWORKTableRecorder::setBorders
void setBorders(const IWORKGridLineMap_t &verticalLines, const IWORKGridLineMap_t &horizontalLines)
Definition: IWORKTableRecorder.cpp:335
libetonyek::IWORKTableRecorder::m_impl
std::shared_ptr< Impl > m_impl
Definition: IWORKTableRecorder.h:49
libetonyek::IWORKTableRecorder::setDefaultCellStyle
void setDefaultCellStyle(IWORKTable::CellType type, const IWORKStylePtr_t &style)
Definition: IWORKTableRecorder.cpp:350
libetonyek::IWORKTableRecorder::IWORKTableRecorder
IWORKTableRecorder()
Definition: IWORKTableRecorder.cpp:293
libetonyek::IWORKToken::style
Definition: IWORKToken.h:268
libetonyek::IWORKToken::rows
Definition: IWORKToken.h:245
libetonyek::IWORKTableRecorder::setDefaultLayoutStyle
void setDefaultLayoutStyle(IWORKTable::CellType type, const IWORKStylePtr_t &style)
Definition: IWORKTableRecorder.cpp:355
libetonyek::IWORKTableRecorder
Definition: IWORKTableRecorder.h:26
libetonyek::IWORKColumnSizes_t
std::deque< double > IWORKColumnSizes_t
Definition: IWORKTypes_fwd.h:22
libetonyek::IWORKRowSizes_t
std::deque< double > IWORKRowSizes_t
Definition: IWORKTypes_fwd.h:24
libetonyek::IWORKToken::columns
Definition: IWORKToken.h:87
libetonyek::IWORKGridLineMap_t
std::map< unsigned, IWORKGridLine_t > IWORKGridLineMap_t
Definition: IWORKTypes.h:102
libetonyek::IWORKTableRecorder::setHeaders
void setHeaders(unsigned headerColumns, unsigned headerRows, unsigned footerRows)
Definition: IWORKTableRecorder.cpp:310
libetonyek::IWORKTableRecorder::setSizes
void setSizes(const IWORKColumnSizes_t &columnSizes, const IWORKRowSizes_t &rowSizes)
Definition: IWORKTableRecorder.cpp:330
IWORKTable.h
libetonyek::IWORKToken::column
Definition: IWORKToken.h:85
IWORKTypes.h
libetonyek::IWORKTable
Definition: IWORKTable.h:29
libetonyek::IWORKTableRecorder::insertCoveredCell
void insertCoveredCell(unsigned column, unsigned row)
Definition: IWORKTableRecorder.cpp:345
libetonyek::IWORKToken::type
Definition: IWORKToken.h:295
libetonyek::IWORKTableRecorder::setDefaultParagraphStyle
void setDefaultParagraphStyle(IWORKTable::CellType type, const IWORKStylePtr_t &style)
Definition: IWORKTableRecorder.cpp:360
libetonyek::IWORKTableRecorder::replay
void replay(IWORKTable &table) const
Definition: IWORKTableRecorder.cpp:298
libetonyek::IWORKCellType
IWORKCellType
Definition: IWORKEnum.h:70