11#ifndef OPENXLSX_XLSTYLES_CELLFORMATS_HPP
12#define OPENXLSX_XLSTYLES_CELLFORMATS_HPP
16# pragma warning(disable : 4251)
17# pragma warning(disable : 4275)
27#include <unordered_map>
158 uint32_t newReadingOrder);
167 std::unique_ptr<XMLNode> m_alignmentNode;
230 uint32_t numberFormatId()
const;
262 bool applyNumberFormat()
const;
268 bool applyFont()
const;
274 bool applyFill()
const;
280 bool applyBorder()
const;
286 bool applyAlignment()
const;
292 bool applyProtection()
const;
300 bool quotePrefix()
const;
308 bool pivotButton()
const;
327 XLAlignment alignment(
bool createIfMissing =
false)
const;
363 std::string summary()
const;
366 std::unique_ptr<XMLNode> m_cellFormatNode;
367 bool m_permitXfId{
false};
368 inline static const std::vector<std::string_view> m_nodeOrder = {
"alignment",
"protection"};
424 size_t count()
const;
454 XLStyleIndex findOrCreate(XLCellFormat copyFrom, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
460 void rebuild(
const std::vector<XMLNode>& nodes);
463 std::unique_ptr<XMLNode> m_cellFormatsNode;
464 std::vector<XLCellFormat> m_cellFormats;
465 bool m_permitXfId{
false};
466 mutable std::unordered_map<std::string, XLStyleIndex> m_fingerprintCache;
Definition XLStyles_CellFormats.hpp:34
bool setShrinkToFit(bool set=true)
Definition XLStyles_CellFormats.cpp:112
uint32_t indent() const
Get the indent setting.
Definition XLStyles_CellFormats.cpp:88
bool setRelativeIndent(int32_t newIndent)
Definition XLStyles_CellFormats.cpp:108
XLAlignment()
Definition XLStyles_CellFormats.cpp:66
bool setReadingOrder(uint32_t newReadingOrder)
Definition XLStyles_CellFormats.cpp:114
XLAlignment & operator=(XLAlignment &&other) noexcept=default
Move assignment operator.
uint32_t readingOrder() const
Get the reading order setting.
Definition XLStyles_CellFormats.cpp:96
bool setTextRotation(uint16_t newRotation)
Definition XLStyles_CellFormats.cpp:102
bool wrapText() const
Check whether text wrapping is enabled.
Definition XLStyles_CellFormats.cpp:86
bool shrinkToFit() const
Check whether shrink to fit is enabled.
Definition XLStyles_CellFormats.cpp:94
XLAlignment(XLAlignment &&other) noexcept=default
Move Constructor.
friend class XLStyles
Definition XLStyles_CellFormats.hpp:35
bool setVertical(XLAlignmentStyle newStyle)
Definition XLStyles_CellFormats.cpp:100
bool setIndent(uint32_t newIndent)
Definition XLStyles_CellFormats.cpp:106
bool setWrapText(bool set=true)
Definition XLStyles_CellFormats.cpp:104
bool setHorizontal(XLAlignmentStyle newStyle)
Setter functions for style parameters.
Definition XLStyles_CellFormats.cpp:98
XLAlignmentStyle horizontal() const
Get the horizontal alignment.
Definition XLStyles_CellFormats.cpp:80
int32_t relativeIndent() const
Get the relative indent setting.
Definition XLStyles_CellFormats.cpp:90
XLAlignmentStyle vertical() const
Get the vertical alignment.
Definition XLStyles_CellFormats.cpp:82
bool setJustifyLastLine(bool set=true)
Definition XLStyles_CellFormats.cpp:110
uint16_t textRotation() const
Get text rotation.
Definition XLStyles_CellFormats.cpp:84
bool justifyLastLine() const
Check whether justification of last line is enabled.
Definition XLStyles_CellFormats.cpp:92
std::string summary() const
Return a string summary of the alignment properties.
Definition XLStyles_CellFormats.cpp:117
XLAlignment & operator=(const XLAlignment &other)
Copy assignment operator.
Definition XLStyles_CellFormats.cpp:74
The XLUnsupportedElement class provides a stub implementation that can be used as function parameter ...
Definition XLXmlFile.hpp:42
Definition IXLCellProvider.hpp:24
XLAlignmentStyle
Definition XLStyles_Common.hpp:175
OpenXLSX_xml_node XMLNode
Definition XLXmlParser.hpp:64
size_t XLStyleIndex
Definition XLStyles_Common.hpp:36