Orcus
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
orcus::spreadsheet::document Class Reference

#include <document.hpp>

Inheritance diagram for orcus::spreadsheet::document:
orcus::iface::document_dumper

Public Member Functions

 document (const document &)=delete
 
documentoperator= (const document &)=delete
 
 document (const range_size_t &sheet_size)
 
virtual void dump (dump_format_t format, const std::string &output) const override
 
virtual void dump_check (std::ostream &os) const override
 
shared_stringsget_shared_strings ()
 
const shared_stringsget_shared_strings () const
 
stylesget_styles ()
 
const stylesget_styles () const
 
pivot_collectionget_pivot_collection ()
 
const pivot_collectionget_pivot_collection () const
 
sheetappend_sheet (std::string_view sheet_name)
 
sheetget_sheet (std::string_view sheet_name)
 
const sheetget_sheet (std::string_view sheet_name) const
 
sheetget_sheet (sheet_t sheet_pos)
 
const sheetget_sheet (sheet_t sheet_pos) const
 
void clear ()
 
void recalc_formula_cells ()
 
sheet_t get_sheet_index (std::string_view name) const
 
std::string_view get_sheet_name (sheet_t sheet_pos) const
 
range_size_t get_sheet_size () const
 
void set_sheet_size (const range_size_t &sheet_size)
 
size_t get_sheet_count () const
 
void set_origin_date (int year, int month, int day)
 
date_time_t get_origin_date () const
 
void set_formula_grammar (formula_grammar_t grammar)
 
formula_grammar_t get_formula_grammar () const
 
const ixion::formula_name_resolver * get_formula_name_resolver (formula_ref_context_t cxt) const
 
ixion::model_context & get_model_context ()
 
const ixion::model_context & get_model_context () const
 
const document_configget_config () const
 
void set_config (const document_config &cfg)
 
string_poolget_string_pool ()
 
const string_poolget_string_pool () const
 
void insert_table (table_t *p)
 
const table_tget_table (std::string_view name) const
 

Friends

class sheet
 
class import_factory
 

Detailed Description

Store spreadsheet document content. It uses the model_context class from the ixion library to store raw cell values required in the computation of formula expressions.

Member Function Documentation

◆ clear()

void orcus::spreadsheet::document::clear ( )

Clear document content, to make it empty.

◆ dump()

virtual void orcus::spreadsheet::document::dump ( dump_format_t  format,
const std::string &  output 
) const
overridevirtual

◆ dump_check()

virtual void orcus::spreadsheet::document::dump_check ( std::ostream &  os) const
overridevirtual

◆ get_table()

const table_t * orcus::spreadsheet::document::get_table ( std::string_view  name) const

Get a structure containing properties of a named table.

Parameters
nameName of the table.
Returns
Pointer to the structure containing the properties of a named table, or nullptr if no such table exists for the given name.

◆ insert_table()

void orcus::spreadsheet::document::insert_table ( table_t p)

Insert a new table object into the document. The document will take ownership of the inserted object after the call. The object will get inserted only when there is no pre-existing table object of the same name. The object not being inserted will be deleted.

Parameters
ptable object to insert.

◆ recalc_formula_cells()

void orcus::spreadsheet::document::recalc_formula_cells ( )

Calculate those formula cells that have been newly inserted and have not yet been calculated.