Orcus
|
#include <shared_strings.hpp>
Public Types | |
typedef std::unordered_map< size_t, format_runs_t * > | format_runs_map_type |
Public Member Functions | |
import_shared_strings (const import_shared_strings &)=delete | |
import_shared_strings & | operator= (const import_shared_strings &)=delete |
import_shared_strings (orcus::string_pool &sp, ixion::model_context &cxt, styles &styles) | |
virtual size_t | append (std::string_view s) override |
virtual size_t | add (std::string_view s) override |
virtual void | set_segment_font (size_t font_index) override |
virtual void | set_segment_bold (bool b) override |
virtual void | set_segment_italic (bool b) override |
virtual void | set_segment_font_name (std::string_view s) override |
virtual void | set_segment_font_size (double point) override |
virtual void | set_segment_font_color (color_elem_t alpha, color_elem_t red, color_elem_t green, color_elem_t blue) override |
virtual void | append_segment (std::string_view s) override |
virtual size_t | commit_segments () override |
const format_runs_t * | get_format_runs (size_t index) const |
const std::string * | get_string (size_t index) const |
void | dump () const |
This class handles global pool of string instances.
|
overridevirtual |
Similar to the append method, it adds new string to the string pool; however, this method checks if the string being added is already in the pool before each insertion, to avoid duplicated strings.
s | string to add to the pool. |
Implements orcus::spreadsheet::iface::import_shared_strings.
|
overridevirtual |
Append new string to the string list. Order of insertion is important since that determines the numerical ID values of inserted strings. Note that this method assumes that the caller knows the string being appended is not yet in the pool.
s | string to append to the pool. |
Implements orcus::spreadsheet::iface::import_shared_strings.
|
overridevirtual |
Append a string segment with the current format attributes to the formatted string buffer.
s | string segment value. |
Implements orcus::spreadsheet::iface::import_shared_strings.
|
overridevirtual |
Store the formatted string in the current buffer to the shared strings store. The implementation may choose to unconditionally append the string to the store, or choose to look for an existing indentical formatted string to reuse and discard the new one if one exists.
Implements orcus::spreadsheet::iface::import_shared_strings.
|
overridevirtual |
Set whether or not to make the font bold to the current format attributes.
b | true if it's bold, false otherwise. |
Implements orcus::spreadsheet::iface::import_shared_strings.
|
overridevirtual |
Set the index of a font to apply to the current format attributes.
font_index | positive integer representing the font to use. |
Implements orcus::spreadsheet::iface::import_shared_strings.
|
overridevirtual |
Set the color of a font in ARGB to the current format attributes.
alpha | alpha component value (0-255). |
red | red component value (0-255). |
green | green component value (0-255). |
blue | blue component value (0-255). |
Implements orcus::spreadsheet::iface::import_shared_strings.
|
overridevirtual |
Set the name of a font to the current format attributes.
s | font name. |
Implements orcus::spreadsheet::iface::import_shared_strings.
|
overridevirtual |
Set a font size to the current format attributes.
point | font size in points. |
Implements orcus::spreadsheet::iface::import_shared_strings.
|
overridevirtual |
Set whether or not to set the font italic font to the current format attributes.
b | true if it's italic, false otherwise. |
Implements orcus::spreadsheet::iface::import_shared_strings.