Orcus
Toggle main menu visibility
Loading...
Searching...
No Matches
include
orcus
spreadsheet
document.hpp
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
* This Source Code Form is subject to the terms of the Mozilla Public
4
* License, v. 2.0. If a copy of the MPL was not distributed with this
5
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
*/
7
8
#ifndef INCLUDED_ORCUS_SPREADSHEET_DOCUMENT_HPP
9
#define INCLUDED_ORCUS_SPREADSHEET_DOCUMENT_HPP
10
11
#include "orcus/env.hpp"
12
#include "orcus/interface.hpp"
13
#include "orcus/spreadsheet/types.hpp"
14
15
#include <ostream>
16
#include <memory>
17
18
namespace
ixion {
19
20
class
formula_name_resolver;
21
class
model_context;
22
struct
abs_address_t;
23
24
}
25
26
namespace
orcus {
27
28
class
string_pool
;
29
struct
date_time_t
;
30
31
namespace
spreadsheet {
32
33
class
shared_strings
;
34
class
styles
;
35
class
tables
;
36
class
pivot_collection
;
37
class
sheet
;
38
class
import_factory
;
39
40
struct
document_config
;
41
struct
table_t
;
42
43
namespace
detail {
44
45
struct
document_impl;
46
47
}
48
54
class
ORCUS_SPM_DLLPUBLIC document :
public
orcus::iface::document_dumper
55
{
56
friend
class
sheet;
57
friend
class
import_factory;
58
59
public
:
60
document() =
delete
;
61
document(
const
document&) =
delete
;
62
document& operator= (
const
document&) =
delete
;
63
64
document(
const
range_size_t
& sheet_size);
65
~document();
66
68
virtual
void
dump
(dump_format_t format, std::string_view output)
const override
;
69
71
virtual
void
dump
(dump_format_t format, std::u16string_view output)
const override
;
72
74
virtual
void
dump_check
(std::ostream& os)
const override
;
75
76
shared_strings
& get_shared_strings();
77
const
shared_strings
& get_shared_strings()
const
;
78
79
styles
& get_styles();
80
const
styles
& get_styles()
const
;
81
82
pivot_collection
& get_pivot_collection();
83
const
pivot_collection
& get_pivot_collection()
const
;
84
85
sheet* append_sheet(std::string_view sheet_name);
86
sheet* get_sheet(std::string_view sheet_name);
87
const
sheet* get_sheet(std::string_view sheet_name)
const
;
88
sheet* get_sheet(sheet_t sheet_pos);
89
const
sheet* get_sheet(sheet_t sheet_pos)
const
;
90
94
void
clear
();
95
100
void
recalc_formula_cells
();
101
102
sheet_t get_sheet_index(std::string_view name)
const
;
103
std::string_view get_sheet_name(sheet_t sheet_pos)
const
;
104
111
void
set_sheet_name
(sheet_t sheet_pos, std::string name);
112
113
range_size_t
get_sheet_size()
const
;
114
void
set_sheet_size(
const
range_size_t
& sheet_size);
115
size_t
get_sheet_count()
const
;
116
117
void
set_origin_date(
int
year,
int
month,
int
day);
118
date_time_t
get_origin_date()
const
;
119
120
void
set_formula_grammar(formula_grammar_t grammar);
121
formula_grammar_t get_formula_grammar()
const
;
122
123
const
ixion::formula_name_resolver* get_formula_name_resolver(formula_ref_context_t cxt)
const
;
124
125
ixion::model_context& get_model_context();
126
const
ixion::model_context& get_model_context()
const
;
127
128
const
document_config
& get_config()
const
;
129
void
set_config(
const
document_config
& cfg);
130
131
string_pool
& get_string_pool();
132
const
string_pool
& get_string_pool()
const
;
133
134
tables
& get_tables();
135
const
tables
& get_tables()
const
;
136
137
private
:
138
void
finalize_import();
139
void
insert_dirty_cell(
const
ixion::abs_address_t& pos);
140
141
private
:
142
std::unique_ptr<detail::document_impl> mp_impl;
143
};
144
145
}}
146
147
#endif
148
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
orcus::iface::document_dumper
Definition
interface.hpp:66
orcus::spreadsheet::document::clear
void clear()
orcus::spreadsheet::document::dump_check
virtual void dump_check(std::ostream &os) const override
orcus::spreadsheet::document::recalc_formula_cells
void recalc_formula_cells()
orcus::spreadsheet::document::dump
virtual void dump(dump_format_t format, std::string_view output) const override
orcus::spreadsheet::document::dump
virtual void dump(dump_format_t format, std::u16string_view output) const override
orcus::spreadsheet::document::set_sheet_name
void set_sheet_name(sheet_t sheet_pos, std::string name)
orcus::spreadsheet::import_factory
Definition
factory.hpp:53
orcus::spreadsheet::pivot_collection
Definition
pivot.hpp:389
orcus::spreadsheet::shared_strings
Definition
shared_strings.hpp:31
orcus::spreadsheet::sheet
Definition
sheet.hpp:42
orcus::spreadsheet::styles
Definition
styles.hpp:196
orcus::spreadsheet::tables
Definition
tables.hpp:32
orcus::string_pool
Definition
string_pool.hpp:26
orcus::date_time_t
Definition
types.hpp:530
orcus::spreadsheet::document_config
Definition
config.hpp:18
orcus::spreadsheet::range_size_t
Definition
types.hpp:698
orcus::spreadsheet::table_t
Definition
table.hpp:63
Generated on
for Orcus by
1.17.0