import_cell_style
Defined in header: <orcus/spreadsheet/import_interface_styles.hpp>
-
class import_cell_style
This interface is used to import named cell style records.
Note
The actual cell format data for named cell styles are imported through import_xf, and this interface references its index through the import_cell_style::set_xf() method.
Public Functions
-
virtual ~import_cell_style()
-
virtual void set_name(std::string_view s) = 0
Set the name associated with the named cell style.
- Parameters:
s – name of the named cell style.
-
virtual void set_display_name(std::string_view s) = 0
Set the name associated with the named cell style intended for display purposes.
Note
Not all supported formats make use of this property. Also, the style may not always have this property even if the format supports it. ODF uses this property when the original name contains characters that cannot be used in internal symbols.
- Parameters:
s – name to use for display purposes.
-
virtual void set_xf(size_t index) = 0
Set the index into the cell format record. The named cell style applies the format referenced by this index.
- Parameters:
index – index into the cell format record.
-
virtual void set_builtin(size_t index) = 0
Set the index into the built-in cell style record.
Note
This is Excel-specific, and unclear whether it’s useful outside of Excel’s implementation. Built-in styles are not stored in file, and Excel likely has its own internal styles stored in the application itself.
- Parameters:
index – index into the built-in cell style record.
-
virtual void set_parent_name(std::string_view s) = 0
Set the name of the parent cell style it uses as its basis.
Note
ODF uses this but Excel does not use this value.
- Parameters:
s – name of the parent cell style.
-
virtual void commit() = 0
Commit the cell style format in the current buffer to the storage.
Note
This method does not return an index.
-
virtual ~import_cell_style()