Types and Interfaces¶
Global Interface¶
-
class
import_filter
¶ Subclassed by orcus::orcus_csv, orcus::orcus_gnumeric, orcus::orcus_ods, orcus::orcus_xls_xml, orcus::orcus_xlsx
Public Functions
-
import_filter
(format_t input)¶
-
virtual
~import_filter
()¶
-
virtual void
read_file
(const std::string &filepath) = 0¶ expects a system path to a local file
-
virtual void
read_stream
(const char *content, size_t len) = 0¶ expects the whole content of the file
-
virtual const char *
get_name
() const = 0¶
-
void
set_config
(const orcus::config &v)¶
-
const orcus::config &
get_config
() const¶
-
-
class
document_dumper
¶ Subclassed by orcus::spreadsheet::document
Public Functions
-
virtual
~document_dumper
()¶
-
virtual void
dump_flat
(const std::string &outdir) const = 0¶
-
virtual void
dump_html
(const std::string &outdir) const = 0¶
-
virtual void
dump_json
(const std::string &outdir) const = 0¶
-
virtual void
dump_csv
(const std::string &outdir) const = 0¶
-
virtual void
dump_check
(std::ostream &os) const = 0¶
-
virtual
Spreadsheet Interface¶
import_array_formula¶
-
class
import_array_formula
¶ Public Functions
-
virtual
~import_array_formula
()¶
-
virtual void
set_formula
(formula_grammar_t grammar, const char *p, size_t n) = 0¶
-
virtual void
commit
() = 0¶
-
virtual
import_auto_filter¶
-
class
import_auto_filter
¶ Public Functions
-
virtual
~import_auto_filter
() = 0¶
-
virtual void
set_range
(const range_t &range) = 0¶ Specify the range where the auto filter is applied.
- Parameters
range
: structure containing the top-left and bottom-right positions of the auto filter range.
-
virtual void
set_column
(col_t col) = 0¶ Specify the column position of a filter. The position is relative to the first column in the auto filter range.
- Parameters
col
: 0-based column position of a filter relative to the first column.
-
virtual void
append_column_match_value
(const char *p, size_t n) = 0¶ Add a match value to the current column filter.
- Parameters
p
: pointer to the first character of match value.n
: length of match value.
-
virtual void
commit_column
() = 0¶ Commit current column filter to the current auto filter.
-
virtual void
commit
() = 0¶ Commit current auto filter to the model.
-
virtual
import_conditional_format¶
-
class
import_conditional_format
¶ This is an optional interface to import conditional formatting.
A conditional format consists of:
- a range
- several entries
Each entry consists of:
- a type
- a few properties depending on the type (optional)
- zero or more conditions depending on the type
Each condition consists of:
- a formula/value/string
- a color (optional)
Public Functions
-
virtual
~import_conditional_format
() = 0¶
-
virtual void
set_color
(color_elem_t alpha, color_elem_t red, color_elem_t green, color_elem_t blue) = 0¶ Sets the color of the current condition. only valid for type == databar or type == colorscale.
-
virtual void
set_formula
(const char *p, size_t n) = 0¶ Sets the formula, value or string of the current condition.
-
virtual void
set_condition_type
(condition_type_t type) = 0¶ Sets the type for the formula, value or string of the current condition. Only valid for type = iconset, databar or colorscale.
-
virtual void
set_date
(condition_date_t date) = 0¶ Only valid for type = date.
-
virtual void
commit_condition
() = 0¶ commits the current condition to the current entry.
-
virtual void
set_icon_name
(const char *p, size_t n) = 0¶ Name of the icons to use in the current entry. only valid for type = iconset
-
virtual void
set_databar_gradient
(bool gradient) = 0¶ Use a gradient for the current entry. only valid for type == databar
-
virtual void
set_databar_axis
(databar_axis_t axis) = 0¶ Position of the 0 axis in the current entry. only valid for type == databar.
-
virtual void
set_databar_color_positive
(color_elem_t alpha, color_elem_t red, color_elem_t green, color_elem_t blue) = 0¶ Databar color for positive values. only valid for type == databar.
-
virtual void
set_databar_color_negative
(color_elem_t alpha, color_elem_t red, color_elem_t green, color_elem_t blue) = 0¶ Databar color for negative values. only valid for type == databar.
-
virtual void
set_min_databar_length
(double length) = 0¶ Sets the minimum length for a databar. only valid for type == databar.
-
virtual void
set_max_databar_length
(double length) = 0¶ Sets the maximum length for a databar. only valid for type == databar.
-
virtual void
set_show_value
(bool show) = 0¶ Don’t show the value in the cell. only valid for type = databar, iconset, colorscale.
-
virtual void
set_iconset_reverse
(bool reverse) = 0¶ Use the icons in reverse order. only valid for type == iconset.
-
virtual void
set_xf_id
(size_t xf) = 0¶ TODO: In OOXML the style is stored as dxf and in ODF as named style.
-
virtual void
set_operator
(condition_operator_t condition_type) = 0¶ Sets the current operation used for the current entry. only valid for type == condition
-
virtual void
set_type
(conditional_format_t type) = 0¶
-
virtual void
commit_entry
() = 0¶
-
virtual void
set_range
(const char *p, size_t n) = 0¶
-
virtual void
commit_format
() = 0¶
import_data_table¶
-
class
import_data_table
¶ Interface for importing data tables.
import_factory¶
-
class
import_factory
¶ This interface provides the filters a means to instantiate concrete classes that implement the above interfaces. The client code never has to manually delete objects returned by its methods; the implementor of this interface must manage the life cycles of objects it returns.
The implementor of this interface normally wraps the document instance inside it and have the document instance manage the life cycles of various objects it creates.
Subclassed by orcus::spreadsheet::import_factory
Public Functions
-
virtual
~import_factory
() = 0¶
-
virtual import_global_settings *
get_global_settings
()¶
- Return
- pointer to the shared strings instance. It may return NULL if the client app doesn’t support shared strings.
-
virtual import_named_expression *
get_named_expression
()¶
-
virtual import_styles *
get_styles
()¶ - Return
- pointer to the styles instance. It may return NULL if the client app doesn’t support styles.
-
virtual import_reference_resolver *
get_reference_resolver
()¶
-
virtual import_pivot_cache_definition *
create_pivot_cache_definition
(pivot_cache_id_t cache_id)¶ Create an interface for pivot cache definition import for a specified cache ID. In case a pivot cache alrady exists for the passed ID, the client app should overwrite the existing cache with a brand-new cache instance.
- Return
- pointer to the pivot cache interface instance. If may return NULL if the client app doesn’t support pivot tables.
- Parameters
cache_id
: numeric ID associated with the pivot cache.
-
virtual import_pivot_cache_records *
create_pivot_cache_records
(pivot_cache_id_t cache_id)¶ Create an interface for pivot cache records import for a specified cache ID.
- Return
- pointer to the pivot cache records interface instance. If may return nullptr if the client app doesn’t support pivot tables.
- Parameters
cache_id
: numeric ID associated with the pivot cache.
-
virtual import_sheet *
append_sheet
(sheet_t sheet_index, const char *sheet_name, size_t sheet_name_length) = 0¶ Append a sheet with specified sheet position index and name.
- Return
- pointer to the sheet instance. It may return nullptr if the client app fails to append a new sheet.
- Parameters
sheet_index
: position index of the sheet to be appended. It is 0-based i.e. the first sheet to be appended will have an index value of 0.sheet_name
: pointer to the first character in the buffer where the sheet name is stored.sheet_name_length
: length of the sheet name.
-
virtual import_sheet *
get_sheet
(const char *sheet_name, size_t sheet_name_length) = 0¶ - Return
- pointer to the sheet instance whose name matches the name passed to this method. It returns nullptr if no sheet instance exists by the specified name.
-
virtual import_sheet *
get_sheet
(sheet_t sheet_index) = 0¶ Retrieve sheet instance by specified numerical sheet index.
- Return
- pointer to the sheet instance, or nullptr if no sheet instance exists at specified sheet index position.
- Parameters
sheet_index
: sheet index
-
virtual void
finalize
() = 0¶ This method is called at the end of import, to give the implementor a chance to perform post-processing if necessary.
-
virtual
import_formula¶
-
class
import_formula
¶ Public Functions
-
virtual
~import_formula
()¶
-
virtual void
set_position
(row_t row, col_t col) = 0¶ Set the position of the cell.
- Parameters
row
: row position.col
: column position.
-
virtual void
set_formula
(formula_grammar_t grammar, const char *p, size_t n) = 0¶ Set formula string to the specified cell.
- Parameters
grammar
: grammar to use to compile the formula string into tokens.p
: pointer to the buffer where the formula string is stored.n
: size of the buffer where the formula string is stored.
Register the formula as a shared string, to be shared with other cells.
- Parameters
index
: shared string index to register the formula with.
-
virtual void
set_result_string
(size_t sindex) = 0¶ Set cached result of string type.
- Parameters
sindex
: index of the string value into the shared string pool.
-
virtual void
set_result_value
(double value) = 0¶ Set cached result of numeric type.
- Parameters
value
: numeric value to set as a cached result.
-
virtual void
set_result_bool
(bool value) = 0¶ Set cached result of boolean type.
- Parameters
value
: boolean value to set as a cached result.
-
virtual void
set_result_empty
() = 0¶ Set empty value as a cached result.
-
virtual void
commit
() = 0¶ Commit all the formula data to the specified cell.
-
virtual
import_global_settings¶
-
class
import_global_settings
¶ Public Functions
-
virtual
~import_global_settings
() = 0¶
-
virtual void
set_origin_date
(int year, int month, int day) = 0¶ Set the date that is to be represented by a value of 0. All date values will be internally represented relative to this date afterward.
- Parameters
year
: 1-based value representing yearmonth
: 1-based value representing month, varying from 1 through 12.day
: 1-based value representing day, varying from 1 through 31.
-
virtual void
set_default_formula_grammar
(formula_grammar_t grammar) = 0¶ Set formula grammar to be used globally when parsing formulas if the grammar is not specified. This grammar will also be used when parsing range strings associated with shared formula ranges, array formula ranges, autofilter ranges etc.
- Parameters
grammar
: default formula grammar
-
virtual formula_grammar_t
get_default_formula_grammar
() const = 0¶ Get current default formula grammar.
- Return
- current default formula grammar.
-
virtual void
set_character_set
(character_set_t charset) = 0¶ Set the character set to be used when parsing string values.
- Parameters
charset
: character set to apply when parsing string values.
-
virtual
import_named_expression¶
-
class
import_named_expression
¶ Interface for importing named expressions.
Public Functions
-
virtual
~import_named_expression
()¶
-
virtual void
define_name
(const char *p_name, size_t n_name, const char *p_exp, size_t n_exp) = 0¶ Define a new named expression or overwrite an existing one.
- Parameters
p_name
: pointer to the buffer that stores the name of the expression to be defined.n_name
: size of the buffer that stores the name of the expression to be defined.p_exp
: pointer to the buffer that stores the expression to be associated with the name.n_exp
: size of the buffer that stores the expression to be associated with the name.
-
virtual
import_pivot_cache_definition¶
-
class
import_pivot_cache_definition
¶ Interface for importing pivot cache definition.
Public Functions
-
virtual
~import_pivot_cache_definition
()¶
-
virtual void
set_worksheet_source
(const char *ref, size_t n_ref, const char *sheet_name, size_t n_sheet_name) = 0¶ Specify that the source data of this pivot cache is located on a local worksheet.
- Parameters
ref
: pointer to the char array that contains the range string specifying the source range.n_ref
: size of the aforementioned char array.sheet_name
: pointer to the char array that contains the name of the worksheet where the source data is located.n_sheet_name
: size of the aforementioned char array.
-
virtual void
set_field_count
(size_t n) = 0¶ Set the total number of fields present in this pivot cache.
- Parameters
n
: total number of fields in this pivot cache.
-
virtual void
set_field_name
(const char *p, size_t n) = 0¶ Set the name of the field in the current field buffer.
- Parameters
p
: pointer to the char array that contains the field name.n
: size of the aforementioned char array.
-
virtual void
set_field_min_value
(double v) = 0¶ Set the lowest value of the field in the current field buffer.
- Parameters
v
: lowest value of the field.
-
virtual void
set_field_max_value
(double v) = 0¶ Set the highest value of the field in the current field buffer.
- Parameters
v
: highest value of the field.
-
virtual void
set_field_min_date
(const date_time_t &dt) = 0¶ Set the lowest date value of the field in the current field buffer.
- Parameters
dt
: lowest date value of the field.
-
virtual void
set_field_max_date
(const date_time_t &dt) = 0¶ Set the highest date value of the field in the current field buffer.
- Parameters
dt
: highest date value of the field.
-
virtual import_pivot_cache_field_group *
create_field_group
(size_t base_index) = 0¶ Mark the current field as a group field.
This method gets called first to signify that the current field is a group field.
- Return
- interface for importing group field data.
- Parameters
base_index
: 0-based index of the field this field is the parent group of.
-
virtual void
commit_field
() = 0¶ Commit the field in the current field buffer to the pivot cache model.
-
virtual void
set_field_item_string
(const char *p, size_t n) = 0¶ Set a string value to the current field item buffer.
- Parameters
p
: pointer to the char array that contains the string value.n
: size of the aforementioned char array.
-
virtual void
set_field_item_numeric
(double v) = 0¶ Set a numeric value to the current field item buffer.
- Parameters
v
: numeric value.
-
virtual void
set_field_item_date_time
(const date_time_t &dt) = 0¶ Set a date-time value to the current field item buffer.
- Parameters
dt
: date-time value.
-
virtual void
set_field_item_error
(error_value_t ev) = 0¶ Set an error value to the current field item buffer,
- Parameters
ev
: error value.
-
virtual void
commit_field_item
() = 0¶ Commit the field item in current field item buffer to the current field model.
-
virtual void
commit
() = 0¶ Commit the current pivot cache model to the document model.
-
virtual
import_pivot_cache_records¶
-
class
import_pivot_cache_records
¶ Interface for importing pivot cache records.
Public Functions
-
virtual
~import_pivot_cache_records
()¶
-
virtual void
set_record_count
(size_t n) = 0¶
-
virtual void
append_record_value_numeric
(double v) = 0¶
-
virtual void
append_record_value_character
(const char *p, size_t n) = 0¶
-
virtual void
commit_record
() = 0¶ Commit the record in the current buffer, and clears the buffer.
-
virtual void
commit
() = 0¶
-
virtual
import_reference_resolver¶
-
class
import_reference_resolver
¶ Public Functions
-
virtual
~import_reference_resolver
()¶
-
virtual address_t
resolve_address
(const char *p, size_t n) = 0¶ Resolve a textural representation of a single cell address.
- Return
- structure containing the column and row positions of the address.
- Parameters
p
: pointer to the first character of the single cell address string.n
: size of the single cell address string.
- Exceptions
orcus::invalid_arg_error
: the string is not a valid single cell addreess.
-
virtual range_t
resolve_range
(const char *p, size_t n) = 0¶ Resolve a textural representation of a range address. Note that a string representing a valid single cell address should be considered a valid range address.
- Return
- structure containing the start and end positions of the range address.
- Parameters
p
: pointer to the first character of the range address string.n
: size of the range address string.
- Exceptions
invalid_arg_error
: the string is not a valid range addreess.
-
virtual
import_sheet¶
-
class
import_sheet
¶ Interface for sheet.
Public Functions
-
virtual
~import_sheet
() = 0¶
-
virtual import_sheet_view *
get_sheet_view
()¶
-
virtual import_sheet_properties *
get_sheet_properties
()¶
-
virtual import_data_table *
get_data_table
()¶ Get an interface for importing data tables. Note that the implementer may decide not to support this feature in which case this method returns NULL. The implementer is responsible for managing the life cycle of the returned interface object.
The implementor should also initialize the internal state of the temporary data table object when this method is called.
- Return
- pointer to the data table interface object.
-
virtual import_auto_filter *
get_auto_filter
()¶ Get an interface for importing auto filter ranges.
The implementor should also initialize the internal state of the temporary auto filter object when this method is called.
- Return
- pointer to the auto filter interface object.
-
virtual import_table *
get_table
()¶ Get an interface for importing tables. The implementer is responsible for managing the life cycle of the returned interface object.
The implementor should also initialize the internal state of the temporary table object when this method is called.
- Return
- pointer to the table interface object, or NULL if the implementer doesn’t support importing of tables.
-
virtual import_conditional_format *
get_conditional_format
()¶ get an interface for importing conditional formats. The implementer is responsible for managing the life cycle of the returned interface object.
- Return
- pointer to the conditional format interface object, or NULL if the implementer doesn’t support importing conditional formats.
-
virtual import_named_expression *
get_named_expression
()¶
-
virtual import_array_formula *
get_array_formula
()¶
-
virtual import_formula *
get_formula
()¶ Get an interface for importing formula cells.
- Return
- pointer to the formula interface object, or nullptr if the implementer doesn’t support importing of formula cells.
-
virtual void
set_auto
(row_t row, col_t col, const char *p, size_t n) = 0¶ Set raw string value to a cell and have the implementation auto-recognize its data type.
- Parameters
row
: row IDcol
: column IDp
: pointer to the first character of the raw string value.n
: size of the raw string value.
-
virtual void
set_string
(row_t row, col_t col, size_t sindex) = 0¶ Set string value to a cell.
- Parameters
row
: row IDcol
: column IDsindex
: 0-based string index in the shared string table.
-
virtual void
set_value
(row_t row, col_t col, double value) = 0¶ Set numerical value to a cell.
- Parameters
row
: row IDcol
: column IDvalue
: value being assigned to the cell.
-
virtual void
set_bool
(row_t row, col_t col, bool value) = 0¶ Set a boolean value to a cell.
- Parameters
row
: row IDcol
: col IDvalue
: boolean value being assigned to the cell
-
virtual void
set_date_time
(row_t row, col_t col, int year, int month, int day, int hour, int minute, double second) = 0¶ Set date and time value to a cell.
- Parameters
row
: row IDcol
: column ID
-
virtual void
set_format
(row_t row, col_t col, size_t xf_index) = 0¶ Set cell format to specified cell. The cell format is referred to by the xf (cell format) index in the styles table.
- Parameters
row
: row IDcol
: column IDindex
: 0-based xf (cell format) index
-
virtual void
set_format
(row_t row_start, col_t col_start, row_t row_end, col_t col_end, size_t xf_index) = 0¶ Set cell format to specified cell range. The cell format is referred to by the xf (cell format) index in the styles table.
- Parameters
row_start
: start row IDcol_start
: start column IDrow_end
: end row IDcol_end
: end column IDindex
: 0-based xf (cell format) index
-
virtual range_size_t
get_sheet_size
() const = 0¶ Get the size of the sheet.
- Return
- structure containing the numbers of rows and columns of the sheet.
-
virtual
import_sheet_properties¶
-
class
import_sheet_properties
¶ Interface for importing sheet properties. Sheet properties are those that are used for decorative purposes but are not necessarily a part of the sheet cell values.
Public Functions
-
virtual
~import_sheet_properties
() = 0¶
-
virtual void
set_column_width
(col_t col, double width, orcus::length_unit_t unit) = 0¶
-
virtual void
set_row_height
(row_t row, double height, orcus::length_unit_t unit) = 0¶
-
virtual
import_sheet_view¶
-
class
import_sheet_view
¶ Public Functions
-
virtual
~import_sheet_view
()¶
-
virtual void
set_sheet_active
() = 0¶ Set this sheet as the active sheet.
-
virtual void
set_split_pane
(double hor_split, double ver_split, const address_t &top_left_cell, sheet_pane_t active_pane) = 0¶ Set the information about split view in the current sheet.
- Parameters
hor_split
: horizontal position of the split in 1/20th of a point, or 0 if none. “Horizontal” in this case indicates the column direction.ver_split
: vertical position of the split in 1/20th of a point, or 0 if none. “Vertical” in this case indicates the row direction.top_left_cell
: the top left visible cell in the bottom right pane.active_pane
: active pane in this sheet.
-
virtual void
set_frozen_pane
(col_t visible_columns, row_t visible_rows, const address_t &top_left_cell, sheet_pane_t active_pane) = 0¶ Set the information about frozen view in the current sheet.
- Parameters
visible_columns
: number of visible columns in the left pane.visible_rows
: number of visible rows in the top pane.top_left_cell
: the top left visible cell in the bottom right pane.active_pane
: active pane in this sheet.
-
virtual void
set_selected_range
(sheet_pane_t pane, range_t range) = 0¶ Set the selected cursor range in a specified sheet pane.
- Parameters
pane
: sheet pane associated with the selection. The top-left pane is used for a non-split sheet view.range
: selected cursor range. The range will be 1 column by 1 row when the cursor is on a single cell only.
-
virtual
import_styles¶
-
class
import_styles
¶ Interface for styles. Note that because the default style must have an index of 0 in each style category, the caller must set the default styles first before importing and setting real styles. ID’s of styles are assigned sequentially starting with 0 and upward in each style category.
In contrast to xf formatting, dxf (differential formats) formatting only stores the format information that is explicitly set. It does not store formatting from the default style. Applying a dxf format to an object only applies those explicitly set formats from the dxf entry, while all the other formats are retained.
Subclassed by orcus::spreadsheet::import_styles
Public Functions
-
virtual
~import_styles
() = 0¶
-
virtual void
set_font_count
(size_t n) = 0¶
-
virtual void
set_font_bold
(bool b) = 0¶
-
virtual void
set_font_italic
(bool b) = 0¶
-
virtual void
set_font_name
(const char *s, size_t n) = 0¶
-
virtual void
set_font_size
(double point) = 0¶
-
virtual void
set_font_underline
(underline_t e) = 0¶
-
virtual void
set_font_underline_width
(underline_width_t e) = 0¶
-
virtual void
set_font_underline_mode
(underline_mode_t e) = 0¶
-
virtual void
set_font_underline_type
(underline_type_t e) = 0¶
-
virtual void
set_font_underline_color
(color_elem_t alpha, color_elem_t red, color_elem_t green, color_elem_t blue) = 0¶
-
virtual void
set_font_color
(color_elem_t alpha, color_elem_t red, color_elem_t green, color_elem_t blue) = 0¶
-
virtual void
set_strikethrough_style
(strikethrough_style_t s) = 0¶
-
virtual void
set_strikethrough_type
(strikethrough_type_t s) = 0¶
-
virtual void
set_strikethrough_width
(strikethrough_width_t s) = 0¶
-
virtual void
set_strikethrough_text
(strikethrough_text_t s) = 0¶
-
virtual size_t
commit_font
() = 0¶
-
virtual void
set_fill_count
(size_t n) = 0¶ Set the total number of fill styles. This call is not strictly required but may slightly improve performance.
- Parameters
n
: number of fill styles.
-
virtual void
set_fill_pattern_type
(fill_pattern_t fp) = 0¶ Set the type of fill pattern.
- Parameters
fp
: fill pattern type.
-
virtual void
set_fill_fg_color
(color_elem_t alpha, color_elem_t red, color_elem_t green, color_elem_t blue) = 0¶ Set the foreground color of a fill. Note that for a solid fill type, the foreground color will be used.
- Parameters
alpha
: alpha component ranging from 0 (fully transparent) to 255 (fully opaque).red
: red component ranging from 0 to 255.green
: green component ranging from 0 to 255.blue
: blue component ranging from 0 to 255.
-
virtual void
set_fill_bg_color
(color_elem_t alpha, color_elem_t red, color_elem_t green, color_elem_t blue) = 0¶ Set the background color of a fill. Note that this color will be ignored for a solid fill type.
- Parameters
alpha
: alpha component ranging from 0 (fully transparent) to 255 (fully opaque).red
: red component ranging from 0 to 255.green
: green component ranging from 0 to 255.blue
: blue component ranging from 0 to 255.
-
virtual size_t
commit_fill
() = 0¶ Commit the fill style currently in the buffer.
- Return
- the ID of the committed fill style, to be passed on to the set_xf_fill() method as its argument.
-
virtual void
set_border_count
(size_t n) = 0¶
-
virtual void
set_border_style
(border_direction_t dir, border_style_t style) = 0¶
-
virtual void
set_border_color
(border_direction_t dir, color_elem_t alpha, color_elem_t red, color_elem_t green, color_elem_t blue) = 0¶
-
virtual void
set_border_width
(border_direction_t dir, double width, orcus::length_unit_t unit) = 0¶
-
virtual size_t
commit_border
() = 0¶
-
virtual void
set_cell_locked
(bool b) = 0¶
-
virtual void
set_cell_print_content
(bool b) = 0¶
-
virtual size_t
commit_cell_protection
() = 0¶
-
virtual void
set_number_format_count
(size_t n) = 0¶
-
virtual void
set_number_format_identifier
(size_t id) = 0¶
-
virtual void
set_number_format_code
(const char *s, size_t n) = 0¶
-
virtual size_t
commit_number_format
() = 0¶
-
virtual void
set_cell_xf_count
(size_t n) = 0¶
-
virtual void
set_cell_style_xf_count
(size_t n) = 0¶
-
virtual void
set_dxf_count
(size_t n) = 0¶
-
virtual void
set_xf_font
(size_t index) = 0¶
-
virtual void
set_xf_fill
(size_t index) = 0¶
-
virtual void
set_xf_border
(size_t index) = 0¶
-
virtual void
set_xf_protection
(size_t index) = 0¶
-
virtual void
set_xf_number_format
(size_t index) = 0¶
-
virtual void
set_xf_style_xf
(size_t index) = 0¶
-
virtual void
set_xf_apply_alignment
(bool b) = 0¶
-
virtual void
set_xf_horizontal_alignment
(hor_alignment_t align) = 0¶
-
virtual void
set_xf_vertical_alignment
(ver_alignment_t align) = 0¶
-
virtual size_t
commit_cell_xf
() = 0¶
-
virtual size_t
commit_cell_style_xf
() = 0¶
-
virtual size_t
commit_dxf
() = 0¶
-
virtual void
set_cell_style_count
(size_t n) = 0¶
-
virtual void
set_cell_style_name
(const char *s, size_t n) = 0¶
-
virtual void
set_cell_style_xf
(size_t index) = 0¶
-
virtual void
set_cell_style_builtin
(size_t index) = 0¶
-
virtual void
set_cell_style_parent_name
(const char *s, size_t n) = 0¶
-
virtual size_t
commit_cell_style
() = 0¶
-
virtual
import_table¶
-
class
import_table
¶ Interface for table. A table is a range within a sheet that consists of one or more data columns with a header row that contains their labels.
Public Functions
-
virtual
~import_table
() = 0¶
-
virtual import_auto_filter *
get_auto_filter
()¶
-
virtual void
set_identifier
(size_t id) = 0¶
-
virtual void
set_range
(const char *p_ref, size_t n_ref) = 0¶
-
virtual void
set_totals_row_count
(size_t row_count) = 0¶
-
virtual void
set_name
(const char *p, size_t n) = 0¶
-
virtual void
set_display_name
(const char *p, size_t n) = 0¶
-
virtual void
set_column_count
(size_t n) = 0¶
-
virtual void
set_column_identifier
(size_t id) = 0¶
-
virtual void
set_column_name
(const char *p, size_t n) = 0¶
-
virtual void
set_column_totals_row_label
(const char *p, size_t n) = 0¶
-
virtual void
set_column_totals_row_function
(totals_row_function_t func) = 0¶
-
virtual void
commit_column
() = 0¶
-
virtual void
set_style_name
(const char *p, size_t n) = 0¶
-
virtual void
set_style_show_first_column
(bool b) = 0¶
-
virtual void
set_style_show_last_column
(bool b) = 0¶
-
virtual void
set_style_show_row_stripes
(bool b) = 0¶
-
virtual void
set_style_show_column_stripes
(bool b) = 0¶
-
virtual void
commit
() = 0¶
-
virtual
export_factory¶
-
class
export_factory
¶ Subclassed by orcus::spreadsheet::export_factory
Public Functions
-
virtual
~export_factory
() = 0¶
-
virtual const export_sheet *
get_sheet
(const char *sheet_name, size_t sheet_name_length) const = 0¶
-
virtual
Spreadsheet Types¶
Types¶
-
typedef int32_t
orcus::spreadsheet::
row_t
¶
-
typedef int32_t
orcus::spreadsheet::
col_t
¶
-
typedef int32_t
orcus::spreadsheet::
sheet_t
¶
-
typedef uint8_t
orcus::spreadsheet::
color_elem_t
¶
-
typedef uint16_t
orcus::spreadsheet::
col_width_t
¶
-
typedef uint16_t
orcus::spreadsheet::
row_height_t
¶
-
typedef uint32_t
orcus::spreadsheet::
pivot_cache_id_t
¶
Structs¶
-
struct
underline_attrs_t
¶ Public Members
-
underline_t
underline_style
¶
-
underline_width_t
underline_width
¶
-
underline_mode_t
underline_mode
¶
-
underline_type_t
underline_type
¶
-
underline_t
-
struct
address_t
¶
-
struct
range_size_t
¶
-
struct
range_t
¶
-
struct
color_rgb_t
¶ Public Functions
-
color_rgb_t
()¶
-
color_rgb_t
(const color_rgb_t &other)¶
-
color_rgb_t
(color_rgb_t &&other)¶
-
color_rgb_t &
operator=
(const color_rgb_t &other)¶
-
Enums¶
-
enum
orcus::spreadsheet::
border_direction_t
¶ Values:
-
unknown
= 0
-
top
¶
-
bottom
¶
-
left
¶
-
right
¶
-
diagonal
¶
-
diagonal_bl_tr
¶
-
diagonal_tl_br
¶
-
-
enum
orcus::spreadsheet::
border_style_t
¶ Values:
-
unknown
= 0
-
none
¶
-
solid
¶
-
dash_dot
¶
-
dash_dot_dot
¶
-
dashed
¶
-
dotted
¶
-
double_border
¶
-
hair
¶
-
medium
¶
-
medium_dash_dot
¶
-
medium_dash_dot_dot
¶
-
medium_dashed
¶
-
slant_dash_dot
¶
-
thick
¶
-
thin
¶
-
double_thin
¶
-
fine_dashed
¶
-
-
enum
orcus::spreadsheet::
fill_pattern_t
¶ Values:
-
none
= 0
-
solid
-
dark_down
¶
-
dark_gray
¶
-
dark_grid
¶
-
dark_horizontal
¶
-
dark_trellis
¶
-
dark_up
¶
-
dark_vertical
¶
-
gray_0625
¶
-
gray_125
¶
-
light_down
¶
-
light_gray
¶
-
light_grid
¶
-
light_horizontal
¶
-
light_trellis
¶
-
light_up
¶
-
light_vertical
¶
-
medium_gray
¶
-
-
enum
orcus::spreadsheet::
strikethrough_style_t
¶ Values:
-
none
= 0
-
solid
-
dash
¶
-
dot_dash
¶
-
dot_dot_dash
¶
-
dotted
-
long_dash
¶
-
wave
¶
-
-
enum
orcus::spreadsheet::
strikethrough_width_t
¶ Values:
-
unknown
= 0
-
width_auto
¶
-
thin
-
medium
-
thick
-
bold
¶
-
-
enum
orcus::spreadsheet::
formula_grammar_t
¶ Type that specifies the grammar of a formula expression. Each grammar may exhibit a different set of syntax rules.
Values:
-
unknown
= 0 Grammar type is either unknown or unspecified.
-
xls_xml
¶ Grammar used by the Excel 2003 XML (aka XML Spreadsheet) format.
-
xlsx
¶ Grammar used by the Office Open XML spreadsheet format.
-
ods
¶ Grammar used by the OpenDocument Spreadsheet format.
-
gnumeric
¶ Grammar used by the Gnumeric XML format.
-
-
enum
orcus::spreadsheet::
underline_t
¶ Values:
-
none
= 0
-
single_line
¶
-
single_accounting
¶
-
double_line
¶
-
double_accounting
¶
-
dotted
-
dash
-
long_dash
-
dot_dash
-
dot_dot_dot_dash
¶
-
wave
-
-
enum
orcus::spreadsheet::
underline_width_t
¶ Values:
-
none
= 0
-
normal
-
bold
-
thin
-
medium
-
thick
-
positive_integer
¶
-
percent
¶
-
positive_length
¶
-
-
enum
orcus::spreadsheet::
underline_type_t
¶ Values:
-
none
= 0
-
single
-
double_type
-
-
enum
orcus::spreadsheet::
hor_alignment_t
¶ Values:
-
unknown
= 0
-
left
-
center
¶
-
right
-
justified
¶
-
distributed
¶
-
filled
¶
-
-
enum
orcus::spreadsheet::
ver_alignment_t
¶ Values:
-
unknown
= 0
-
top
-
middle
¶
-
bottom
-
justified
-
distributed
-
-
enum
orcus::spreadsheet::
data_table_type_t
¶ Type of data table. A data table can be either of a single-variable column, a single-variable row, or a double-variable type that uses both column and row input cells.
Values:
-
column
¶
-
row
¶
-
both
¶
-
-
enum
orcus::spreadsheet::
totals_row_function_t
¶ Function type used in the totals row of a table.
Values:
-
none
= 0
-
sum
¶
-
minimum
¶
-
maximum
¶
-
average
¶
-
count
¶
-
count_numbers
¶
-
standard_deviation
¶
-
variance
¶
-
custom
¶
-
-
enum
orcus::spreadsheet::
conditional_format_t
¶ Values:
-
unknown
= 0
-
condition
¶
-
date
¶
-
formula
¶
-
colorscale
¶
-
databar
¶
-
iconset
¶
-
-
enum
orcus::spreadsheet::
condition_operator_t
¶ Values:
-
unknown
= 0
-
equal
¶
-
less
¶
-
greater
¶
-
greater_equal
¶
-
less_equal
¶
-
not_equal
¶
-
between
¶
-
not_between
¶
-
duplicate
¶
-
unique
¶
-
top_n
¶
-
bottom_n
¶
-
above_average
¶
-
below_average
¶
-
above_equal_average
¶
-
below_equal_average
¶
-
contains_error
¶
-
contains_no_error
¶
-
begins_with
¶
-
ends_with
¶
-
contains
¶
-
contains_blanks
¶
-
not_contains
¶
-
expression
¶
-
-
enum
orcus::spreadsheet::
condition_type_t
¶ Values:
-
unknown
= 0
-
value
-
automatic
¶
-
max
¶
-
min
¶
-
formula
-
percent
-
percentile
¶
-
-
enum
orcus::spreadsheet::
condition_date_t
¶ Values:
-
unknown
= 0
-
today
¶
-
yesterday
¶
-
tomorrow
¶
-
last_7_days
¶
-
this_week
¶
-
next_week
¶
-
last_week
¶
-
this_month
¶
-
next_month
¶
-
last_month
¶
-
this_year
¶
-
next_year
¶
-
last_year
¶
-
-
enum
orcus::spreadsheet::
databar_axis_t
¶ Values:
-
none
= 0
-
middle
-
automatic
-
Spreadsheet Global Functions¶
-
col_width_t
orcus::spreadsheet::
get_default_column_width
()¶
-
row_height_t
orcus::spreadsheet::
get_default_row_height
()¶
-
totals_row_function_t
orcus::spreadsheet::
to_totals_row_function_enum
(const char *p, size_t n)¶ Convert a string representation of a totals row function name to its equivalent enum value.
- Return
- enum value representing the totals row function.
- Parameters
p
: pointer to the string buffer.n
: size of the string buffer.
-
pivot_cache_group_by_t
orcus::spreadsheet::
to_pivot_cache_group_by_enum
(const char *p, size_t n)¶ Convert a string representation of a pivot cache group-by type to its equivalent enum value.
- Return
- enum value representing the pivot cache group-by type.
- Parameters
p
: pointer to the string buffer.n
: size of the string buffer.
-
error_value_t
orcus::spreadsheet::
to_error_value_enum
(const char *p, size_t n)¶ Convert a string representation of a error value to its equivalent enum value.
- Return
- enum value representing the error value.
- Parameters
p
: pointer to the string buffer.n
: size of the string buffer.
-
color_rgb_t
orcus::spreadsheet::
to_color_rgb
(const char *p, size_t n)¶ Convert a string representation of a RGB value to an equivalent struct value. The string representation is expected to be a 6 digit hexadecimal value string that may or may not be prefixed with a ‘#’.
- Return
- struct value representing an RGB value.
- Parameters
p
: pointer to the string buffer that stores the string representation of the RGB value.n
: length of the buffer.