import_styles
Defined in header: <orcus/spreadsheet/import_interface_styles.hpp>
-
class import_styles
Interface for importing styles. This one acts as an entry point and provides other interfaces for the style categories.
The styles are to be stored in a flyweight fashion where each style category maintains an array of stored style items, which are referenced by their indices. Each time a style item is pushed through the interface, it returns an index representing the item. The indices are to be assigned sequentially starting with 0 in each style category, and the default style must get an index of 0. Because of this, the import filter imports the default styles first before importing other non-default styles.
The appreviation
xfstands for cell format, and is used throughout the styles API. Similarly, thedxfstands for differential cell format, and stores partial format properties that are to be applied on top of the base format properties.Note
The implementor of this interface must implement all interfaces for all the style categories that this interface returns.
Subclassed by orcus::spreadsheet::import_styles
Public Functions
-
virtual ~import_styles()
-
virtual import_font_style *start_font_style() = 0
Signal the start of the import of font style attributes, and return a pointer to the interface instance for importing the attributes.
Note
Note that the import_styles implementer must return a non-null pointer.
- Returns:
pointer to the interface instance for importing font style attributes.
-
virtual import_fill_style *start_fill_style() = 0
Signal the start of the import of fill style attributes, and return a pointer to the interface instance for importing the attributes.
Note
Note that the import_styles implementer must return a non-null pointer.
- Returns:
pointer to the interface instance for importing fill style attributes.
-
virtual import_border_style *start_border_style() = 0
Signal the start of the import of border style attributes, and return a pointer to the interface instance for importing the attributes.
Note
Note that the import_styles implementer must return a non-null pointer.
- Returns:
pointer to the interface instance for importing border style attributes.
-
virtual import_cell_protection *start_cell_protection() = 0
Signal the start of the import of cell protection attributes, and return a pointer to the interface instance for importing the attributes.
Note
Note that the import_styles implementer must return a non-null pointer.
- Returns:
pointer to the interface instance for importing cell protection attributes.
-
virtual import_number_format *start_number_format() = 0
Signal the start of the import of number format attributes and return a pointer to the interface instance for importing the attributes.
Note
Note that the import_styles implementer must return a non-null pointer.
- Returns:
pointer to the interface instance for importing number format attributes.
-
virtual import_xf *start_xf(xf_category_t cat) = 0
Signal the start of the import of cell format (xf) indices that each reference different format attributes in their respective pools, and return a pointer to the interface instance for importing the indices.
Note
Note that the import_styles implementer must return a non-null pointer.
- Returns:
pointer to the interface instance for importing cell format (xf) indices.
-
virtual import_cell_style *start_cell_style() = 0
Signal the start of the import of named cell style information, and return a pointer to the interface instance for importing the information.
Note
Note that the import_styles implementer must return a non-null pointer.
- Returns:
pointer to the interface instance for importing named cell style information.
-
virtual void set_font_count(size_t n) = 0
Set the total number of font styles. This may be called before importing any of the font styles. This will give the implementer a chance to allocate storage. Note that it may not always be called.
- Parameters:
n – number of font styles.
-
virtual void set_fill_count(size_t n) = 0
Set the total number of fill styles. This may be called before importing any of the fill styles. This will give the implementer a chance to allocate storage. Note that it may not always be called.
- Parameters:
n – number of fill styles.
-
virtual void set_border_count(size_t n) = 0
Set the total number of border styles. This may be called before importing any of the border styles. This will give the implementer a chance to allocate storage. Note that it may not always be called.
- Parameters:
n – number of border styles.
-
virtual void set_number_format_count(size_t n) = 0
Set the total number of number format styles. This may be called before importing any of the number format styles. This will give the implementer a chance to allocate storage. Note that it may not always be called.
- Parameters:
n – number of number format styles.
-
virtual void set_xf_count(xf_category_t cat, size_t n) = 0
Set the total number of cell format styles for a specified cell format category. This may be called before importing any of the cell format styles for the specified category. This will give the implementer a chance to allocate storage. Note that it may not always be called.
- Parameters:
cat – cell format category.
n – number of cell formats styles for the specified cell format category.
-
virtual void set_cell_style_count(size_t n) = 0
Set the total number of named cell styles. This may be called before importing any cell styles to give the implementer a chance to allocate storage. Note that it may not always be called.
- Parameters:
n – number of named cell styles.
-
virtual ~import_styles()