Orcus
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
orcus::spreadsheet::format_run_t Struct Reference

#include <document_types.hpp>

Public Member Functions

 format_run_t (const format_run_t &other)
 
format_run_toperator= (const format_run_t &other)
 
void reset ()
 
bool formatted () const
 

Public Attributes

std::size_t pos = 0
 
std::size_t size = 0
 
std::optional< std::string_view > font
 
std::optional< double > font_size
 
std::optional< color_tcolor
 
std::optional< bool > bold
 
std::optional< bool > italic
 
std::optional< bool > superscript
 
std::optional< bool > subscript
 
strikethrough_t strikethrough
 
underline_t underline
 

Detailed Description

Contains formatting properties of a section of a string. This is used in the storage of rich-text strings.

Member Function Documentation

◆ formatted()

bool orcus::spreadsheet::format_run_t::formatted ( ) const

Query whether or not the section contains non-default format properties.

Returns
true of it's formatted, otherwise false.

◆ reset()

void orcus::spreadsheet::format_run_t::reset ( )

Reset the properties to unformatted state.

Member Data Documentation

◆ bold

std::optional<bool> orcus::spreadsheet::format_run_t::bold

Whether or not the font is bold.

◆ color

std::optional<color_t> orcus::spreadsheet::format_run_t::color

Color of the section.

◆ font

std::optional<std::string_view> orcus::spreadsheet::format_run_t::font

Name of the font.

◆ font_size

std::optional<double> orcus::spreadsheet::format_run_t::font_size

Size of the font.

◆ italic

std::optional<bool> orcus::spreadsheet::format_run_t::italic

Whether or not the font is italic.

◆ pos

std::size_t orcus::spreadsheet::format_run_t::pos = 0

Position of the section where the formatting starts.

◆ size

std::size_t orcus::spreadsheet::format_run_t::size = 0

Length of the section.

◆ strikethrough

strikethrough_t orcus::spreadsheet::format_run_t::strikethrough

Strikethrough attributes.

◆ subscript

std::optional<bool> orcus::spreadsheet::format_run_t::subscript

Whether or not the font has subscript applied.

◆ superscript

std::optional<bool> orcus::spreadsheet::format_run_t::superscript

Whether or not the font has superscript applied.