IWORKTabularModelElement.h Source File documentation

IWORKTabularModelElement.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 IWORKTABULARMODELELEMENT_H_INCLUDED
11 #define IWORKTABULARMODELELEMENT_H_INCLUDED
12
13 #include <string>
14
15 #include <boost/optional.hpp>
16
17 #include "IWORKStyle_fwd.h"
18
19 #include "IWORKXMLContextBase.h"
20
21 namespace libetonyek
22 {
23 class IWORKTable;
24
25 class IWORKTabularModelElement : public IWORKXMLElementContextBase
26 {
27 public:
28 explicit IWORKTabularModelElement(IWORKXMLParserState &state, bool isDefinition=false);
29
30 private:
31 void attribute(int name, const char *value) override;
32 void endOfAttributes() override;
33 void startOfElement() override;
34 IWORKXMLContextPtr_t element(int name) override;
35 void endOfElement() override;
36
37 private:
38 void sendStyle(const IWORKStylePtr_t &style, const std::shared_ptr<IWORKTable> &table);
39
40 private:
41 bool m_isDefinition;
42 boost::optional<ID_t> m_id;
43 boost::optional<std::string> m_tableName;
44 boost::optional<std::string> m_tableId;
45 boost::optional<ID_t> m_styleRef;
46 boost::optional<unsigned> m_headerColumns;
47 boost::optional<unsigned> m_headerRows;
48 boost::optional<unsigned> m_footerRows;
49 };
50
51 }
52
53 #endif // IWORKTABULARMODELELEMENT_H_INCLUDED
54
55 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::IWORKToken::SFTHeaderRowRepeatsProperty
@ SFTHeaderRowRepeatsProperty
Definition: IWORKToken.h:84
libetonyek::IWORKXMLEmptyContextBase
IWORKXMLContextBase< IWORKXMLContextEmpty, IWORKXMLParserState > IWORKXMLEmptyContextBase
Definition: IWORKXMLContextBase.h:128
IWORKTextStorageElement.h
IWORKDictionary.h
libetonyek::IWORKToken::stop_index
@ stop_index
Definition: IWORKToken.h:408
libetonyek
Definition: IWORKBezierElement.cpp:20
libetonyek::IWORKToken::none
@ none
Definition: IWORKToken.h:666
libetonyek::IWORKToken::cell_text
@ cell_text
Definition: IWORKToken.h:134
libetonyek::IWORKToken::formula
@ formula
Definition: IWORKToken.h:224
libetonyek::IWORKToken::error_warning_mapping
@ error_warning_mapping
Definition: IWORKToken.h:191
libetonyek::KEY1Token::table
@ table
Definition: KEY1Token.h:198
libetonyek::IWORKToken::SFTDefaultFooterRowCellStyleProperty
@ SFTDefaultFooterRowCellStyleProperty
Definition: IWORKToken.h:65
libetonyek::IWORKToken::flags
@ flags
Definition: IWORKToken.h:527
libetonyek::IWORKToken::date_format
@ date_format
Definition: IWORKToken.h:176
libetonyek::IWORKTabularModelElement::endOfElement
void endOfElement() override
Definition: IWORKTabularModelElement.cpp:1891
m_tableNameMap
const IWORKTableNameMapPtr_t & m_tableNameMap
Definition: IWORKOutputElements.cpp:334
libetonyek::IWORKToken::result_text_cell
@ result_text_cell
Definition: IWORKToken.h:380
libetonyek::IWORKToken::cell_style_ref
@ cell_style_ref
Definition: IWORKToken.h:133
libetonyek::IWORKToken::rb
@ rb
Definition: IWORKToken.h:374
libetonyek::IWORKToken::ID
@ ID
Definition: IWORKToken.h:499
libetonyek::IWORKToken::datasource
@ datasource
Definition: IWORKToken.h:181
m_tableId
boost::optional< std::string > m_tableId
Definition: IWORKTableInfoElement.cpp:567
IWORKProperties.h
libetonyek::IWORKXMLContextPtr_t
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18
libetonyek::IWORK_CELL_TYPE_TEXT
@ IWORK_CELL_TYPE_TEXT
Definition: IWORKEnum.h:82
libetonyek::IWORKToken::NS_URI_SFA
@ NS_URI_SFA
Definition: IWORKToken.h:689
libetonyek::IWORKToken::du
@ du
Definition: IWORKToken.h:184
libetonyek::IWORKToken::fitting_height
@ fitting_height
Definition: IWORKToken.h:525
libetonyek::IWORKToken::SFTHeaderColumnRepeatsProperty
@ SFTHeaderColumnRepeatsProperty
Definition: IWORKToken.h:83
libetonyek::IWORKToken::increment
@ increment
Definition: IWORKToken.h:562
libetonyek::IWORKToken::pm
@ pm
Definition: IWORKToken.h:365
libetonyek::IWORKToken::filterset
@ filterset
Definition: IWORKToken.h:207
m_isResult
bool m_isResult
Definition: IWORKTabularModelElement.cpp:114
libetonyek::IWORKToken::ct
@ ct
Definition: IWORKToken.h:171
libetonyek::IWORKToken::col_span
@ col_span
Definition: IWORKToken.h:512
libetonyek::IWORKToken::num_header_rows
@ num_header_rows
Definition: IWORKToken.h:584
libetonyek::IWORKToken::slider_position
@ slider_position
Definition: IWORKToken.h:608
libetonyek::IWORKToken::fitting_width
@ fitting_width
Definition: IWORKToken.h:526
libetonyek::IWORKToken::row_span
@ row_span
Definition: IWORKToken.h:598
libetonyek::IWORKToken::result_bool_cell
@ result_bool_cell
Definition: IWORKToken.h:376
libetonyek::IWORKContentMap_t
std::unordered_map< std::string, std::string > IWORKContentMap_t
Definition: IWORKTypes_fwd.h:36
libetonyek::IWORKToken::generic_cell
@ generic_cell
Definition: IWORKToken.h:233
libetonyek::IWORKToken::num_footer_rows
@ num_footer_rows
Definition: IWORKToken.h:582
libetonyek::IWORKToken::numcols
@ numcols
Definition: IWORKToken.h:585
libetonyek::IWORKToken::start_index
@ start_index
Definition: IWORKToken.h:406
libetonyek::IWORKToken::g
@ g
Definition: IWORKToken.h:231
ETONYEK_DEBUG_MSG
#define ETONYEK_DEBUG_MSG(M)
Definition: libetonyek_utils.h:54
libetonyek::IWORKToken::n
@ n
Definition: IWORKToken.h:328
libetonyek::IWORKToken::so
@ so
Definition: IWORKToken.h:398
IWORKFormulaElement.h
libetonyek::IWORKToken::row
@ row
Definition: IWORKToken.h:383
libetonyek::IWORKToken::cf_ref
@ cf_ref
Definition: IWORKToken.h:136
libetonyek::IWORKToken::sl
@ sl
Definition: IWORKToken.h:396
libetonyek::IWORKTextPtr_t
std::shared_ptr< IWORKText > IWORKTextPtr_t
Definition: IWORKText_fwd.h:18
libetonyek::IWORKToken::slider_orientation
@ slider_orientation
Definition: IWORKToken.h:607
libetonyek::IWORKTabularModelElement::m_styleRef
boost::optional< ID_t > m_styleRef
Definition: IWORKTabularModelElement.h:45
IWORKTable.h
libetonyek::IWORKTabularModelElement::m_footerRows
boost::optional< unsigned > m_footerRows
Definition: IWORKTabularModelElement.h:48
libetonyek::IWORKToken::cb
@ cb
Definition: IWORKToken.h:127
libetonyek::IWORKToken::groupings_element
@ groupings_element
Definition: IWORKToken.h:250
libetonyek::IWORKToken::fo
@ fo
Definition: IWORKToken.h:212
libetonyek::IWORKTable::CELL_TYPE_BODY
@ CELL_TYPE_BODY
Definition: IWORKTable.h:53
libetonyek::try_int_cast
boost::optional< int > try_int_cast(const char *value)
Definition: libetonyek_xml.cpp:99
libetonyek::IWORKToken::sort
@ sort
Definition: IWORKToken.h:399
m_contentMap
IWORKContentMap_t & m_contentMap
Definition: IWORKTabularModelElement.cpp:751
libetonyek::IWORKToken::SFTTableBandedRowsProperty
@ SFTTableBandedRowsProperty
Definition: IWORKToken.h:86
m_gridlineIndex_
optional< unsigned > m_gridlineIndex_
Definition: IWORKTabularModelElement.cpp:1575
libetonyek::IWORKToken::duration_format
@ duration_format
Definition: IWORKToken.h:185
libetonyek::IWORKToken::st
@ st
Definition: IWORKToken.h:404
libetonyek::IWORKToken::grouping_state
@ grouping_state
Definition: IWORKToken.h:249
libetonyek::IWORKToken::grouping_display
@ grouping_display
Definition: IWORKToken.h:247
libetonyek::IWORKToken::preferred_width
@ preferred_width
Definition: IWORKToken.h:594
libetonyek::IWORKToken::group_formula_value_valid
@ group_formula_value_valid
Definition: IWORKToken.h:549
m_headerRows
const unsigned m_headerRows
Definition: IWORKTableRecorder.cpp:49
libetonyek::IWORKToken::date_cell
@ date_cell
Definition: IWORKToken.h:175
libetonyek::IWORKToken::ncoc
@ ncoc
Definition: IWORKToken.h:580
m_dateTimeFormat
optional< IWORKDateTimeFormat > m_dateTimeFormat
Definition: IWORKTabularModelElement.cpp:54
m_startIndex
optional< unsigned > m_startIndex
Definition: IWORKTabularModelElement.cpp:1521
libetonyek::IWORKTabularModelElement
Definition: IWORKTabularModelElement.h:25
libetonyek::IWORKToken::number_cell
@ number_cell
Definition: IWORKToken.h:332
libetonyek::IWORKToken::cf
@ cf
Definition: IWORKToken.h:135
libetonyek::IWORKToken::d
@ d
Definition: IWORKToken.h:173
libetonyek::IWORKTabularModelElement::m_id
boost::optional< ID_t > m_id
Definition: IWORKTabularModelElement.h:42
libetonyek::IWORKXMLParserState
Definition: IWORKXMLParserState.h:31
m_footerRows
const unsigned m_footerRows
Definition: IWORKTableRecorder.cpp:50
libetonyek::IWORKToken::nsc
@ nsc
Definition: IWORKToken.h:581
libetonyek::IWORKToken::count
@ count
Definition: IWORKToken.h:515
libetonyek::IWORKToken::rows
@ rows
Definition: IWORKToken.h:385
libetonyek::IWORKToken::height
@ height
Definition: IWORKToken.h:551
libetonyek::IWORKToken::result_number_cell
@ result_number_cell
Definition: IWORKToken.h:379
libetonyek::IWORKToken::formula_cell
@ formula_cell
Definition: IWORKToken.h:225
libetonyek::IWORKToken::h
@ h
Definition: IWORKToken.h:550
libetonyek::IWORKToken::col
@ col
Definition: IWORKToken.h:150
libetonyek::IWORKToken::style_run
@ style_run
Definition: IWORKToken.h:415
libetonyek::IWORKToken::group_formula_string
@ group_formula_string
Definition: IWORKToken.h:547
libetonyek::IWORKToken::text_cell
@ text_cell
Definition: IWORKToken.h:468
m_maxLines
unsigned m_maxLines
Definition: IWORKTabularModelElement.cpp:1656
libetonyek::IWORKToken::SFTDefaultHeaderRowCellStyleProperty
@ SFTDefaultHeaderRowCellStyleProperty
Definition: IWORKToken.h:81
libetonyek::IWORKTable::CELL_TYPE_ROW_FOOTER
@ CELL_TYPE_ROW_FOOTER
Definition: IWORKTable.h:57
m_count
optional< unsigned > m_count
Definition: IWORKTabularModelElement.cpp:1576
libetonyek::IWORKTabularModelElement::m_headerRows
boost::optional< unsigned > m_headerRows
Definition: IWORKTabularModelElement.h:47
libetonyek::IWORKToken::menu_choices
@ menu_choices
Definition: IWORKToken.h:322
libetonyek::IWORKToken::columns
@ columns
Definition: IWORKToken.h:154
libetonyek::IWORKToken::id
@ id
Definition: IWORKToken.h:259
libetonyek::IWORKToken::line
@ line
Definition: IWORKToken.h:298
libetonyek::IWORKTabularModelElement::element
IWORKXMLContextPtr_t element(int name) override
Definition: IWORKTabularModelElement.cpp:1867
libetonyek::IWORKToken::vo
@ vo
Definition: IWORKToken.h:629
libetonyek::IWORKTableDataPtr_t
std::shared_ptr< IWORKTableData > IWORKTableDataPtr_t
Definition: IWORKTypes_fwd.h:76
m_stopIndex
optional< unsigned > m_stopIndex
Definition: IWORKTabularModelElement.cpp:1522
m_ref
boost::optional< ID_t > m_ref
Definition: IWORKTabularModelElement.cpp:113
libetonyek::IWORKToken::manually_sized
@ manually_sized
Definition: IWORKToken.h:572
libetonyek::IWORKToken::result_date_cell
@ result_date_cell
Definition: IWORKToken.h:378
libetonyek::IWORKToken::horizontal_offset
@ horizontal_offset
Definition: IWORKToken.h:558
libetonyek::IWORKToken::horizontal_gridline_styles
@ horizontal_gridline_styles
Definition: IWORKToken.h:557
libetonyek::IWORKXMLContextBase::getCollector
Collector & getCollector() const
Definition: IWORKXMLContextBase.h:49
m_numberFormat
optional< IWORKNumberFormat > m_numberFormat
Definition: IWORKTabularModelElement.cpp:56
libetonyek::IWORKToken::min_value
@ min_value
Definition: IWORKToken.h:576
libetonyek::IWORKTabularModelElement::m_tableId
boost::optional< std::string > m_tableId
Definition: IWORKTabularModelElement.h:44
libetonyek::IWORK_CELL_TYPE_DURATION
@ IWORK_CELL_TYPE_DURATION
Definition: IWORKEnum.h:84
libetonyek::IWORKGridLine_t
mdds::flat_segment_tree< unsigned, IWORKStylePtr_t > IWORKGridLine_t
Definition: IWORKTypes.h:121
libetonyek::IWORKToken::t
@ t
Definition: IWORKToken.h:420
libetonyek::IWORKToken::r
@ r
Definition: IWORKToken.h:373
libetonyek::IWORKTabularModelElement::startOfElement
void startOfElement() override
Definition: IWORKTabularModelElement.cpp:1857
libetonyek::IWORKToken::element
@ element
Definition: IWORKToken.h:188
IWORKTabularModelElement.h
libetonyek::IWORKToken::content_size
@ content_size
Definition: IWORKToken.h:164
libetonyek::IWORK_CELL_TYPE_NUMBER
@ IWORK_CELL_TYPE_NUMBER
Definition: IWORKEnum.h:81
libetonyek::IWORKToken::cell_date
@ cell_date
Definition: IWORKToken.h:130
libetonyek::IWORKToken::num_header_columns
@ num_header_columns
Definition: IWORKToken.h:583
libetonyek::IWORKToken::string
@ string
Definition: IWORKToken.h:411
libetonyek::IWORKToken::v
@ v
Definition: IWORKToken.h:622
m_id
const boost::optional< std::string > & m_id
Definition: IWORKTabularModelElement.cpp:752
IWORKText.h
m_resultRef
boost::optional< ID_t > m_resultRef
Definition: IWORKTabularModelElement.cpp:1365
libetonyek::IWORKToken::w
@ w
Definition: IWORKToken.h:630
libetonyek::IWORKToken::cell_storage
@ cell_storage
Definition: IWORKToken.h:131
libetonyek::IWORKToken::numrows
@ numrows
Definition: IWORKToken.h:586
libetonyek::IWORKToken::result_cell
@ result_cell
Definition: IWORKToken.h:377
libetonyek::IWORKToken::style
@ style
Definition: IWORKToken.h:414
libetonyek::IWORKTabularModelElement::sendStyle
void sendStyle(const IWORKStylePtr_t &style, const std::shared_ptr< IWORKTable > &table)
Definition: IWORKTabularModelElement.cpp:1916
libetonyek::IWORK_CELL_TYPE_DATE_TIME
@ IWORK_CELL_TYPE_DATE_TIME
Definition: IWORKEnum.h:83
libetonyek::IWORKToken::grid_row
@ grid_row
Definition: IWORKToken.h:242
libetonyek::IWORKXMLContextBase
Definition: IWORKXMLContextBase.h:27
libetonyek::IWORKToken::vector_style_ref
@ vector_style_ref
Definition: IWORKToken.h:491
IWORKXMLParserState.h
libetonyek::IWORKTabularModelElement::IWORKTabularModelElement
IWORKTabularModelElement(IWORKXMLParserState &state, bool isDefinition=false)
Definition: IWORKTabularModelElement.cpp:1810
libetonyek::IWORKXMLElementContextBase
IWORKXMLContextBase< IWORKXMLContextElement, IWORKXMLParserState > IWORKXMLElementContextBase
Definition: IWORKXMLContextBase.h:125
libetonyek::IWORKToken::preferred_height
@ preferred_height
Definition: IWORKToken.h:593
libetonyek::IWORKToken::gridline_index
@ gridline_index
Definition: IWORKToken.h:243
libetonyek::IWORKToken::rd
@ rd
Definition: IWORKToken.h:375
IWORKCollector.h
IWORKFormatElement.h
libetonyek::IWORKTabularModelElement::endOfAttributes
void endOfAttributes() override
Definition: IWORKTabularModelElement.cpp:1851
libetonyek::IWORKTable::CELL_TYPE_ROW_HEADER
@ CELL_TYPE_ROW_HEADER
Definition: IWORKTable.h:56
libetonyek::IWORKToken::rt
@ rt
Definition: IWORKToken.h:386
libetonyek::IWORKToken::number_format
@ number_format
Definition: IWORKToken.h:333
libetonyek::IWORKToken::first
@ first
Definition: IWORKToken.h:524
libetonyek::IWORKToken::proxied_cell_ref
@ proxied_cell_ref
Definition: IWORKToken.h:371
m_gridLines
IWORKGridLineMap_t & m_gridLines
Definition: IWORKTabularModelElement.cpp:1573
libetonyek::IWORKTabularModelElement::m_isDefinition
bool m_isDefinition
Definition: IWORKTabularModelElement.h:41
libetonyek::IWORKToken::cell_comment_mapping
@ cell_comment_mapping
Definition: IWORKToken.h:129
libetonyek::IWORKToken::NS_URI_SF
@ NS_URI_SF
Definition: IWORKToken.h:688
libetonyek::IWORKStylePtr_t
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
IWORKXMLContextBase.h
libetonyek::IWORKToken::s
@ s
Definition: IWORKToken.h:387
m_headerColumns
const unsigned m_headerColumns
Definition: IWORKTableRecorder.cpp:48
libetonyek::IWORKToken::nc
@ nc
Definition: IWORKToken.h:579
m_line
IWORKGridLine_t & m_line
Definition: IWORKTabularModelElement.cpp:1520
libetonyek::get_optional_value_or
const ValueT & get_optional_value_or(const detail::IWAFieldImpl< TagV, ValueT, Reader > &field, const ValueT &value)
Definition: IWAField.h:196
libetonyek::int_cast
int int_cast(const char *value)
Definition: libetonyek_xml.cpp:94
libetonyek::IWORK_CELL_TYPE_BOOL
@ IWORK_CELL_TYPE_BOOL
Definition: IWORKEnum.h:85
m_styleRef
boost::optional< ID_t > m_styleRef
Definition: IWORKTabularModelElement.cpp:1062
libetonyek::IWORKToken::tabular_style_ref
@ tabular_style_ref
Definition: IWORKToken.h:462
IWORKToken.h
libetonyek::IWORKToken::rn
@ rn
Definition: IWORKToken.h:382
libetonyek::IWORKToken::vertical_gridline_styles
@ vertical_gridline_styles
Definition: IWORKToken.h:493
libetonyek::IWORKToken::vertical_offset
@ vertical_offset
Definition: IWORKToken.h:627
libetonyek::IWORKToken::max_value
@ max_value
Definition: IWORKToken.h:575
libetonyek::IWORKToken::of
@ of
Definition: IWORKToken.h:336
libetonyek::IWORKToken::grid_column
@ grid_column
Definition: IWORKToken.h:241
libetonyek::IWORKTable::CELL_TYPE_COLUMN_HEADER
@ CELL_TYPE_COLUMN_HEADER
Definition: IWORKTable.h:55
libetonyek::IWORKToken::group_formula_value
@ group_formula_value
Definition: IWORKToken.h:548
libetonyek::get
const ValueT & get(const detail::IWAFieldImpl< TagV, ValueT, Reader > &field)
Definition: IWAField.h:190
IWORKRefContext.h
IWORKStyle_fwd.h
libetonyek::IWORKToken::grid
@ grid
Definition: IWORKToken.h:240
libetonyek::IWORKToken::grouping_order
@ grouping_order
Definition: IWORKToken.h:248
libetonyek::IWORKToken::ho
@ ho
Definition: IWORKToken.h:555
libetonyek::IWORKToken::width
@ width
Definition: IWORKToken.h:631
libetonyek::IWORKTabularModelElement::attribute
void attribute(int name, const char *value) override
Definition: IWORKTabularModelElement.cpp:1823
libetonyek::IWORKTabularModelElement::m_tableName
boost::optional< std::string > m_tableName
Definition: IWORKTabularModelElement.h:43
libetonyek::IWORKToken::name
@ name
Definition: IWORKToken.h:578
libetonyek::IWORKToken::value
@ value
Definition: IWORKToken.h:624
libetonyek::IWORKToken::f
@ f
Definition: IWORKToken.h:197
libetonyek::IWORKToken::SFTDefaultHeaderColumnCellStyleProperty
@ SFTDefaultHeaderColumnCellStyleProperty
Definition: IWORKToken.h:80
libetonyek::IWORKToken::implicit_format_type
@ implicit_format_type
Definition: IWORKToken.h:561
IWORKStyle.h
libetonyek::IWORKTabularModelElement::m_headerColumns
boost::optional< unsigned > m_headerColumns
Definition: IWORKTabularModelElement.h:46
libetonyek::IWORKToken::SFTDefaultBodyCellStyleProperty
@ SFTDefaultBodyCellStyleProperty
Definition: IWORKToken.h:61
libetonyek::IWORKToken::grouping
@ grouping
Definition: IWORKToken.h:246
m_durationFormat
optional< IWORKDurationFormat > m_durationFormat
Definition: IWORKTabularModelElement.cpp:55
libetonyek::IWORKGridLineMap_t
std::map< unsigned, IWORKGridLine_t > IWORKGridLineMap_t
Definition: IWORKTypes.h:122
libetonyek::IWORKToken::span_cell
@ span_cell
Definition: IWORKToken.h:403
libetonyek_xml.h
libetonyek::IWORKToken::text
@ text
Definition: IWORKToken.h:465
libetonyek::IWORKXMLContextBase::getState
State & getState()
Definition: IWORKXMLContextBase.h:43