OpenXLSX 1.9.1
Loading...
Searching...
No Matches
OpenXLSX::XLCellStyle Class Reference

An encapsulation of a cell style item. More...

#include <XLStyles.hpp>

Public Member Functions

 XLCellStyle ()
 
 XLCellStyle (const XMLNode &node)
 Constructor. New items should only be created through an XLStyles object.
 
 XLCellStyle (const XLCellStyle &other)
 Copy Constructor.
 
 XLCellStyle (XLCellStyle &&other) noexcept=default
 Move Constructor.
 
 ~XLCellStyle ()
 
XLCellStyleoperator= (const XLCellStyle &other)
 Copy assignment operator.
 
XLCellStyleoperator= (XLCellStyle &&other) noexcept=default
 Move assignment operator.
 
bool empty () const
 Test if this is an empty node.
 
std::string name () const
 Get the name of the cell style.
 
XLStyleIndex xfId () const
 Get the id of the cell style format.
 
uint32_t builtinId () const
 Get the built-in id of the cell style.
 
uint32_t outlineStyle () const
 Get the outline style id (attribute iLevel) of the cell style.
 
bool hidden () const
 Get the hidden flag of the cell style.
 
bool customBuiltin () const
 Get the custom buildin flag.
 
XLUnsupportedElement extLst () const
 Unsupported getter.
 
bool setName (std::string_view newName)
 Setter functions for style parameters.
 
bool setXfId (XLStyleIndex newXfId)
 
bool setBuiltinId (uint32_t newBuiltinId)
 
bool setOutlineStyle (uint32_t newOutlineStyle)
 
bool setHidden (bool set=true)
 
bool setCustomBuiltin (bool set=true)
 
bool setExtLst (XLUnsupportedElement const &newExtLst)
 Unsupported setter.
 
std::string summary () const
 Return a string summary of the cell style properties.
 

Friends

class XLCellStyles
 

Detailed Description

An encapsulation of a cell style item.

Constructor & Destructor Documentation

◆ XLCellStyle() [1/4]

XLCellStyle::XLCellStyle ( )

◆ XLCellStyle() [2/4]

XLCellStyle::XLCellStyle ( const XMLNode node)
explicit

Constructor. New items should only be created through an XLStyles object.

Parameters
nodeAn XMLNode object with the cellStyle item. If no input is provided, a null node is used.

◆ XLCellStyle() [3/4]

XLCellStyle::XLCellStyle ( const XLCellStyle other)

Copy Constructor.

Parameters
otherObject to be copied.

◆ XLCellStyle() [4/4]

OpenXLSX::XLCellStyle::XLCellStyle ( XLCellStyle &&  other)
defaultnoexcept

Move Constructor.

Parameters
otherObject to be moved.

◆ ~XLCellStyle()

XLCellStyle::~XLCellStyle ( )
default

Member Function Documentation

◆ builtinId()

uint32_t XLCellStyle::builtinId ( ) const

Get the built-in id of the cell style.

Returns
The built-in id of the cell style
Todo:
need to find a use case for this

◆ customBuiltin()

bool XLCellStyle::customBuiltin ( ) const

Get the custom buildin flag.

Returns
true if this cell style shall customize a built-in style

◆ empty()

bool XLCellStyle::empty ( ) const

Test if this is an empty node.

Returns
true if underlying XMLNode is empty

◆ extLst()

XLUnsupportedElement OpenXLSX::XLCellStyle::extLst ( ) const
inline

Unsupported getter.

◆ hidden()

bool XLCellStyle::hidden ( ) const

Get the hidden flag of the cell style.

Returns
The hidden flag status (true: applications should not show this style)

◆ name()

std::string XLCellStyle::name ( ) const

Get the name of the cell style.

Returns
The name for this cell style entry

◆ operator=() [1/2]

XLCellStyle & XLCellStyle::operator= ( const XLCellStyle other)

Copy assignment operator.

Parameters
otherRight hand side of assignment operation.
Returns
A reference to the lhs object.

◆ operator=() [2/2]

XLCellStyle & OpenXLSX::XLCellStyle::operator= ( XLCellStyle &&  other)
defaultnoexcept

Move assignment operator.

Parameters
otherRight hand side of assignment operation.
Returns
A reference to lhs object.

◆ outlineStyle()

uint32_t XLCellStyle::outlineStyle ( ) const

Get the outline style id (attribute iLevel) of the cell style.

Returns
The outline style id of the cell style
Todo:
need to find a use case for this

◆ setBuiltinId()

bool XLCellStyle::setBuiltinId ( uint32_t  newBuiltinId)

◆ setCustomBuiltin()

bool XLCellStyle::setCustomBuiltin ( bool  set = true)

◆ setExtLst()

bool XLCellStyle::setExtLst ( XLUnsupportedElement const &  newExtLst)

Unsupported setter.

Unsupported setter function.

◆ setHidden()

bool XLCellStyle::setHidden ( bool  set = true)

◆ setName()

bool XLCellStyle::setName ( std::string_view  newName)

Setter functions for style parameters.

Parameters
valuethat shall be set
Returns
true for success, false for failure

◆ setOutlineStyle()

bool XLCellStyle::setOutlineStyle ( uint32_t  newOutlineStyle)

◆ setXfId()

bool XLCellStyle::setXfId ( XLStyleIndex  newXfId)

◆ summary()

std::string XLCellStyle::summary ( ) const

Return a string summary of the cell style properties.

Returns
string with info about the cell style object

◆ xfId()

XLStyleIndex XLCellStyle::xfId ( ) const

Get the id of the cell style format.

Returns
The id referring to an index in cell style formats (cellStyleXfs)

Friends And Related Symbol Documentation

◆ XLCellStyles

friend class XLCellStyles
friend

The documentation for this class was generated from the following files: